| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630 |
- if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
- Promise.prototype.finally = function(callback) {
- const promise = this.constructor;
- return this.then(
- (value) => promise.resolve(callback()).then(() => value),
- (reason) => promise.resolve(callback()).then(() => {
- throw reason;
- })
- );
- };
- }
- ;
- if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
- const global = uni.requireGlobal();
- ArrayBuffer = global.ArrayBuffer;
- Int8Array = global.Int8Array;
- Uint8Array = global.Uint8Array;
- Uint8ClampedArray = global.Uint8ClampedArray;
- Int16Array = global.Int16Array;
- Uint16Array = global.Uint16Array;
- Int32Array = global.Int32Array;
- Uint32Array = global.Uint32Array;
- Float32Array = global.Float32Array;
- Float64Array = global.Float64Array;
- BigInt64Array = global.BigInt64Array;
- BigUint64Array = global.BigUint64Array;
- }
- ;
- if (uni.restoreGlobal) {
- uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
- }
- (function(vue) {
- "use strict";
- function formatAppLog(type, filename, ...args) {
- if (uni.__log__) {
- uni.__log__(type, filename, ...args);
- } else {
- console[type].apply(console, [...args, filename]);
- }
- }
- const BASE_URL = "http://192.168.1.118:8080";
- const CLIENT_ID = "fe63fea7be31b0200b496d08bc6b517d";
- const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
- function uploadGps(data) {
- return request({
- url: "/fulfiller/fulfiller/gps",
- method: "POST",
- data
- });
- }
- let gpsTimer = null;
- function reportGps() {
- uni.getLocation({
- type: "wgs84",
- success: function(res) {
- const data = {
- longitude: res.longitude,
- latitude: res.latitude
- };
- uploadGps(data).then(() => {
- formatAppLog("log", "at utils/gps.js:20", "GPS定位上传成功", data);
- }).catch((err) => {
- formatAppLog("error", "at utils/gps.js:22", "GPS定位上传失败", err);
- });
- },
- fail: function(err) {
- formatAppLog("error", "at utils/gps.js:26", "获取GPS定位失败", err);
- }
- });
- }
- function startGpsTimer() {
- stopGpsTimer();
- reportGps();
- gpsTimer = setInterval(() => {
- reportGps();
- }, 12e5);
- }
- function stopGpsTimer() {
- if (gpsTimer) {
- clearInterval(gpsTimer);
- gpsTimer = null;
- }
- }
- const TOKEN_KEY = "fulfiller_token";
- const USER_INFO_KEY = "fulfiller_user_info";
- function getToken() {
- return uni.getStorageSync(TOKEN_KEY) || "";
- }
- function setToken(token) {
- uni.setStorageSync(TOKEN_KEY, token);
- }
- function removeToken() {
- uni.removeStorageSync(TOKEN_KEY);
- }
- function isLoggedIn() {
- return !!getToken();
- }
- function removeUserInfo() {
- uni.removeStorageSync(USER_INFO_KEY);
- }
- function clearAuth() {
- removeToken();
- removeUserInfo();
- stopGpsTimer();
- }
- function request(options = {}) {
- const {
- url,
- method = "GET",
- data,
- header = {},
- needToken = true
- } = options;
- const headers = {
- "Content-Type": "application/json;charset=utf-8",
- "clientid": CLIENT_ID,
- "X-Platform-Code": PLATFORM_CODE,
- ...header
- };
- if (needToken) {
- const token = getToken();
- if (token) {
- headers["Authorization"] = "Bearer " + token;
- }
- }
- return new Promise((resolve, reject) => {
- uni.request({
- url: BASE_URL + url,
- method: method.toUpperCase(),
- data,
- header: headers,
- success: (res) => {
- formatAppLog("log", "at utils/request.js:50", res);
- const statusCode = res.statusCode;
- const code = res.data.code;
- const msg = res.data.msg;
- res.data.data;
- if (statusCode !== 200) {
- const errorMsg = msg || `请求失败(${statusCode})`;
- uni.showToast({ title: errorMsg, icon: "none" });
- return reject(new Error(errorMsg));
- }
- if (code === 401) {
- clearAuth();
- uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
- setTimeout(() => {
- uni.reLaunch({ url: "/pages/login/login" });
- }, 1500);
- return reject(new Error("未授权"));
- }
- if (code !== void 0 && code !== 200) {
- const errorMsg = msg || "操作失败";
- uni.showToast({ title: errorMsg, icon: "none" });
- return reject(new Error(errorMsg));
- }
- resolve(res.data);
- },
- fail: (err) => {
- uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
- reject(err);
- }
- });
- });
- }
- function loginByPassword(username, password) {
- return request({
- url: "/auth/login",
- method: "POST",
- needToken: false,
- data: {
- // tenantId: TENANT_ID,
- // platformId: PLATFORM_ID,
- userSource: 1,
- username,
- password,
- clientId: CLIENT_ID,
- grantType: "password",
- source: 1
- }
- });
- }
- function logout() {
- return request({
- url: "/auth/logout",
- method: "POST"
- });
- }
- const logic$9 = {
- data() {
- return {
- currentTab: 1,
- // 0: 免密, 1: 密码
- mobile: "",
- code: "",
- password: "",
- showPassword: false,
- isAgreed: false,
- countDown: 0,
- timer: null,
- showAgreementModal: false,
- currentAgreementId: "",
- // 当前显示的协议ID
- loginLoading: false
- };
- },
- methods: {
- /**
- * 显示协议弹窗
- * @param {Number} id 协议ID (1: 用户服务协议, 2: 隐私政策)
- */
- showAgreement(id) {
- this.currentAgreementId = id;
- this.showAgreementModal = true;
- },
- /* async getVerifyCode() {
- if (this.currentTab === 1) return;
- if (this.countDown > 0) return;
- if (!this.mobile || this.mobile.length !== 11) {
- uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
- return;
- }
-
- try {
- const res = await sendSmsCode(this.mobile);
- // 发送成功,启动倒计时
- this.countDown = 60;
- this.timer = setInterval(() => {
- this.countDown--;
- if (this.countDown <= 0) {
- clearInterval(this.timer);
- }
- }, 1000);
- // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
- const devCode = res.data;
- if (devCode) {
- this.code = devCode;
- uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
- } else {
- uni.showToast({ title: '验证码已发送', icon: 'none' });
- }
- } catch (err) {
- __f__('error','at pages/login/logic.js:57','发送验证码失败:', err);
- }
- }, */
- async handleLogin() {
- var _a;
- if (!this.isAgreed) {
- uni.showToast({ title: "请先同意用户协议", icon: "none" });
- return;
- }
- if (!this.mobile) {
- uni.showToast({ title: "请输入手机号", icon: "none" });
- return;
- }
- if (!this.password) {
- uni.showToast({ title: "请输入密码", icon: "none" });
- return;
- }
- if (this.loginLoading)
- return;
- this.loginLoading = true;
- uni.showLoading({
- title: "登录中...",
- mask: true
- });
- try {
- let res;
- res = await loginByPassword(this.mobile, this.password);
- const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
- if (token) {
- setToken(token);
- }
- startGpsTimer();
- uni.showToast({ title: "登录成功", icon: "success" });
- setTimeout(() => {
- uni.switchTab({
- url: "/pages/home/index"
- });
- }, 1e3);
- } catch (err) {
- formatAppLog("error", "at pages/login/logic.js:122", "登录失败:", err);
- } finally {
- this.loginLoading = false;
- uni.hideLoading();
- }
- },
- goToRecruit() {
- uni.navigateTo({
- url: "/pages/recruit/landing"
- });
- },
- goToForgotPwd() {
- uni.navigateTo({
- url: "/pages/login/reset-pwd-verify"
- });
- }
- }
- };
- function getAgreement(id) {
- return request({
- url: "/system/agreement/" + id,
- method: "get"
- });
- }
- const _export_sfc = (sfc, props) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props) {
- target[key] = val;
- }
- return target;
- };
- const _sfc_main$D = {
- name: "Agreement",
- props: {
- visible: {
- type: Boolean,
- default: false
- },
- agreementId: {
- type: [Number, String],
- default: ""
- }
- },
- data() {
- return {
- detail: {
- title: "",
- content: ""
- }
- };
- },
- watch: {
- visible(newVal) {
- if (newVal && this.agreementId) {
- this.fetchAgreementDetail();
- }
- }
- },
- methods: {
- /**
- * 获取协议详情
- */
- async fetchAgreementDetail() {
- try {
- uni.showLoading({ title: "加载中..." });
- const res = await getAgreement(this.agreementId);
- if (res.code === 200) {
- this.detail = res.data;
- } else {
- uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
- }
- } catch (error) {
- formatAppLog("error", "at src/components/agreement/index.vue:67", "获取协议详情失败:", error);
- } finally {
- uni.hideLoading();
- }
- },
- /**
- * 关闭弹窗
- */
- handleClose() {
- this.$emit("close");
- }
- }
- };
- function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
- return $props.visible ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "agreement-mask",
- onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
- }, ["stop", "prevent"]))
- },
- [
- vue.createElementVNode("view", { class: "agreement-container" }, [
- vue.createElementVNode("view", { class: "agreement-header" }, [
- vue.createElementVNode(
- "text",
- { class: "agreement-title" },
- vue.toDisplayString($data.detail.title || "协议详情"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "agreement-body"
- }, [
- vue.createElementVNode("rich-text", {
- nodes: $data.detail.content
- }, null, 8, ["nodes"])
- ]),
- vue.createElementVNode("view", { class: "agreement-footer" }, [
- vue.createElementVNode("button", {
- class: "confirm-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args))
- }, "确 定")
- ])
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true);
- }
- 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"]]);
- const _imports_0$3 = "/static/header.png";
- const _imports_1$8 = "/static/logo.png";
- const _sfc_main$C = {
- ...logic$9,
- components: {
- Agreement
- }
- };
- function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_agreement = vue.resolveComponent("agreement");
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "banner-area" }, [
- vue.createElementVNode("image", {
- class: "banner-img",
- src: _imports_0$3,
- mode: "widthFix"
- })
- ]),
- vue.createElementVNode("view", { class: "content-card" }, [
- vue.createElementVNode("view", { class: "logo-wrapper" }, [
- vue.createElementVNode("image", {
- class: "logo-img",
- src: _imports_1$8,
- mode: "widthFix"
- })
- ]),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createElementVNode("view", { class: "tab-item active" }, [
- vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
- vue.createElementVNode("view", { class: "tab-indicator" })
- ])
- ]),
- vue.createElementVNode("view", { class: "form-area" }, [
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createElementVNode("view", { class: "area-code" }, [
- vue.createElementVNode("text", null, "+86"),
- vue.createElementVNode("text", { class: "arrow" }, "﹀")
- ]),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input",
- type: "number",
- placeholder: "手机号",
- "placeholder-style": "color: #ccc",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
- maxlength: "11"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.mobile]
- ])
- ]),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "input",
- password: !_ctx.showPassword,
- type: "text",
- placeholder: "请输入密码",
- "placeholder-style": "color: #ccc",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
- }, null, 8, ["password"]), [
- [vue.vModelText, _ctx.password]
- ]),
- vue.createElementVNode("view", {
- class: "eye-icon",
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
- }, [
- _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
- key: 0,
- class: "svg-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ])) : (vue.openBlock(), vue.createElementBlock("svg", {
- key: 1,
- class: "svg-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- d: "M12 7C7 7 2.73 10.11 1 14.5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M23 14.5C21.27 10.11 17 7 12 7",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M12 7V4",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M16 8L18 5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M8 8L6 5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M20 10L22 8",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M4 10L2 8",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- })
- ]))
- ])
- ]),
- vue.createElementVNode("button", {
- class: "login-btn",
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
- }, "登 录"),
- vue.createElementVNode("view", { class: "agreement" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
- },
- [
- _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "check-mark"
- }, "✓")) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("text", { class: "agree-text" }, [
- vue.createTextVNode(" 我已经阅读并同意 "),
- vue.createElementVNode("text", {
- class: "link",
- onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
- }, "《用户服务协议》"),
- vue.createTextVNode(" 和 "),
- vue.createElementVNode("text", {
- class: "link",
- onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
- }, "《隐私政策》")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "footer-recruit",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
- }, [
- vue.createElementVNode("view", { class: "recruit-badge" }, [
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "svg-icon flag-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- style: { "width": "30rpx", "height": "30rpx" }
- }, [
- vue.createElementVNode("path", {
- d: "M4 14V4H18L17 9L18 14H4Z",
- stroke: "#FF5722",
- "stroke-width": "2",
- "stroke-linejoin": "round"
- }),
- vue.createElementVNode("path", {
- d: "M4 22V14",
- stroke: "#FF5722",
- "stroke-width": "2",
- "stroke-linecap": "round"
- })
- ])),
- vue.createElementVNode("text", null, " 宠宝履约者招募")
- ])
- ]),
- vue.createVNode(_component_agreement, {
- visible: _ctx.showAgreementModal,
- "agreement-id": _ctx.currentAgreementId,
- onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
- }, null, 8, ["visible", "agreement-id"])
- ])
- ]);
- }
- const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
- const logic$8 = {
- data() {
- return {
- statusBarHeight: 20
- // 默认状态栏高度
- };
- },
- onLoad() {
- const sysInfo = uni.getSystemInfoSync();
- this.statusBarHeight = sysInfo.statusBarHeight || 20;
- },
- methods: {
- goBack() {
- const pages = getCurrentPages();
- if (pages.length > 1) {
- uni.navigateBack();
- } else {
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }
- },
- goToForm() {
- uni.navigateTo({
- url: "/pages/recruit/form"
- });
- }
- }
- };
- const _sfc_main$B = logic$8;
- function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode(
- "view",
- {
- style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "back-icon",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
- }, "‹")
- ]),
- vue.createElementVNode("view", { class: "header-area" }, [
- vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
- vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
- ]),
- vue.createElementVNode("view", { class: "content-card" }, [
- vue.createElementVNode("view", { class: "benefit-item" }, [
- vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
- vue.createElementVNode("text", { class: "icon-text" }, "¥")
- ]),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
- vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
- ])
- ]),
- vue.createElementVNode("view", { class: "benefit-item" }, [
- vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
- vue.createElementVNode("text", { class: "icon-text" }, "📍")
- ]),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
- vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
- ])
- ]),
- vue.createElementVNode("view", { class: "benefit-item" }, [
- vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
- vue.createElementVNode("text", { class: "icon-text" }, "🕒")
- ]),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
- vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "footer-area" }, [
- vue.createElementVNode("button", {
- class: "join-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
- }, "我要加入"),
- vue.createElementVNode("view", { class: "faq" }, [
- vue.createElementVNode("text", { class: "help-icon" }, "?"),
- vue.createTextVNode(" 常见问题 ")
- ])
- ])
- ]);
- }
- const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
- function getMyProfile() {
- return request({
- url: "/fulfiller/fulfiller/my",
- method: "GET"
- });
- }
- function submitAudit(data) {
- return request({
- url: "/fulfiller/app/audit/submit",
- method: "POST",
- needToken: false,
- data
- });
- }
- function getServiceTypes() {
- return request({
- url: "/fulfiller/app/service/list",
- method: "GET",
- needToken: false
- });
- }
- function getAreaChildren(parentId = 0) {
- return request({
- url: "/fulfiller/app/area/children",
- method: "GET",
- needToken: false,
- data: { parentId }
- });
- }
- function uploadFile(filePath) {
- return new Promise((resolve, reject) => {
- const token = uni.getStorageSync("fulfiller_token");
- uni.uploadFile({
- url: BASE_URL + "/fulfiller/app/upload",
- filePath,
- name: "file",
- header: {
- "clientid": CLIENT_ID,
- "X-Platform-Code": PLATFORM_CODE,
- "Authorization": token ? `Bearer ${token}` : ""
- },
- success: (res) => {
- try {
- const data = JSON.parse(res.data);
- if (data.code === 200) {
- resolve(data);
- } else {
- uni.showToast({ title: data.msg || "上传失败", icon: "none" });
- reject(data);
- }
- } catch (e) {
- reject(e);
- }
- },
- fail: (err) => {
- uni.showToast({ title: "上传失败", icon: "none" });
- reject(err);
- }
- });
- });
- }
- function updateAvatar(avatar) {
- return request({
- url: "/fulfiller/fulfiller/my/avatar",
- method: "PUT",
- data: { avatar }
- });
- }
- function updateName(name) {
- return request({
- url: "/fulfiller/fulfiller/my/name",
- method: "PUT",
- data: { name }
- });
- }
- function updateStatus(status) {
- return request({
- url: "/fulfiller/fulfiller/my/status",
- method: "PUT",
- data: { status }
- });
- }
- function updateCity(data) {
- return request({
- url: "/fulfiller/fulfiller/my/city",
- method: "PUT",
- data
- });
- }
- function getAuthInfo() {
- return request({
- url: "/fulfiller/fulfiller/my/auth",
- method: "GET"
- });
- }
- function updatePhone(phone, code) {
- return request({
- url: "/fulfiller/fulfiller/my/phone",
- method: "PUT",
- data: { phone, code }
- });
- }
- function updatePassword(oldPassword, newPassword) {
- return request({
- url: "/fulfiller/fulfiller/my/password",
- method: "PUT",
- data: { oldPassword, newPassword }
- });
- }
- function deleteAccount() {
- return request({
- url: "/fulfiller/fulfiller/my/account",
- method: "DELETE"
- });
- }
- function updateAuthInfo(data) {
- return request({
- url: "/fulfiller/fulfiller/my/auth",
- method: "POST",
- data
- });
- }
- function getPendingOrders(params) {
- return request({
- url: "/order/subOrder/listPendingAccept",
- method: "GET",
- data: params
- });
- }
- function acceptOrder(orderId) {
- return request({
- url: "/order/subOrder/accept",
- method: "PUT",
- data: { orderId }
- });
- }
- function getOrderCount() {
- return request({
- url: "/order/subOrder/count",
- method: "GET"
- });
- }
- function getOrderStats() {
- return request({
- url: "/order/subOrderLog/count",
- method: "GET"
- });
- }
- function getStatisticOrders(params) {
- return request({
- url: "/order/subOrder/listOnStatistic",
- method: "GET",
- data: params
- });
- }
- function getMyOrders(params) {
- return request({
- url: "/order/subOrder/listOnMyOrder",
- method: "GET",
- data: params
- });
- }
- function getOrderInfo(id) {
- return request({
- url: `/order/subOrder/getInfo?id=${id}`,
- method: "GET"
- });
- }
- function getOrderLogs(orderId) {
- return request({
- url: `/order/subOrderLog/list?orderId=${orderId}`,
- method: "GET"
- });
- }
- function clockIn(data) {
- return request({
- url: "/order/subOrder/clockIn",
- method: "PUT",
- data
- });
- }
- function uploadAnamaly(data) {
- return request({
- url: "/fulfiller/anamaly/upload",
- method: "POST",
- data
- });
- }
- function getAnomalyList(orderId) {
- return request({
- url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
- method: "GET"
- });
- }
- function submitNursingSummary(data) {
- return request({
- url: "/order/subOrder/nursingSummary",
- method: "PUT",
- data
- });
- }
- function listAllLevelConfigs() {
- return request({
- url: "/fulfiller/levelConfig/listAll",
- method: "GET"
- });
- }
- function listAllLevelRights() {
- return request({
- url: "/fulfiller/levelRights/listAll",
- method: "GET"
- });
- }
- function listAllService() {
- return request({
- url: "/service/list/listAll",
- method: "GET"
- });
- }
- const logic$7 = {
- data() {
- return {
- formData: {
- mobile: "",
- code: "",
- name: "",
- gender: 1,
- // 1男 2女
- birthday: "",
- password: "",
- serviceType: [],
- city: "",
- station: "",
- stationId: null
- },
- showPwd: false,
- isAgreed: false,
- serviceTypes: [],
- // 验证码倒计时
- countDown: 0,
- timer: null,
- // 日期选择器相关
- showPicker: false,
- years: [],
- months: [],
- days: [],
- pickerValue: [0, 0, 0],
- tempYear: 0,
- tempMonth: 0,
- tempDay: 0,
- // 城市选择器相关(从后端加载)
- showCityPicker: false,
- selectStep: 0,
- selectedPathway: [],
- currentList: [],
- selectedCityId: null,
- // 站点选择器相关(从后端加载)
- showStationPicker: false,
- stationList: [],
- // 协议弹窗
- showPrivacy: false,
- currentAgreementId: ""
- // 当前协议ID
- };
- },
- created() {
- this.initDateData();
- this.loadServiceTypes();
- },
- beforeDestroy() {
- if (this.timer)
- clearInterval(this.timer);
- },
- methods: {
- initDateData() {
- const now = /* @__PURE__ */ new Date();
- const currentYear = now.getFullYear();
- for (let i = 1980; i <= currentYear + 5; i++) {
- this.years.push(i);
- }
- for (let i = 1; i <= 12; i++) {
- this.months.push(i);
- }
- for (let i = 1; i <= 31; i++) {
- this.days.push(i);
- }
- },
- // 打开选择器
- openPicker() {
- const dateStr = this.formData.birthday || "2000-01-01";
- const [y, m, d] = dateStr.split("-").map(Number);
- const yIndex = this.years.indexOf(y);
- const mIndex = this.months.indexOf(m);
- const dIndex = this.days.indexOf(d);
- this.pickerValue = [
- yIndex > -1 ? yIndex : 0,
- mIndex > -1 ? mIndex : 0,
- dIndex > -1 ? dIndex : 0
- ];
- this.tempYear = this.years[this.pickerValue[0]];
- this.tempMonth = this.months[this.pickerValue[1]];
- this.tempDay = this.days[this.pickerValue[2]];
- this.showPicker = true;
- },
- closePicker() {
- this.showPicker = false;
- },
- onPickerChange(e) {
- const val = e.detail.value;
- this.tempYear = this.years[val[0]];
- this.tempMonth = this.months[val[1]];
- this.tempDay = this.days[val[2]];
- },
- confirmPicker() {
- const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
- const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
- this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
- this.closePicker();
- },
- async loadServiceTypes() {
- try {
- const res = await listAllService();
- this.serviceTypes = (res.data || []).map((item) => ({
- id: item.id,
- name: item.name
- }));
- } catch (err) {
- formatAppLog("error", "at pages/recruit/logic.js:133", "加载服务类型失败:", err);
- this.serviceTypes = [];
- }
- },
- toggleService(item) {
- const idx = this.formData.serviceType.indexOf(item.id);
- if (idx > -1) {
- this.formData.serviceType.splice(idx, 1);
- } else {
- this.formData.serviceType.push(item.id);
- }
- },
- // 验证码
- /* async getVerifyCode() {
- if (this.countDown > 0) return;
- if (!this.formData.mobile || this.formData.mobile.length !== 11) {
- uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
- return;
- }
- try {
- const res = await sendSmsCode(this.formData.mobile);
- this.countDown = 60;
- this.timer = setInterval(() => {
- this.countDown--;
- if (this.countDown <= 0) clearInterval(this.timer);
- }, 1000);
- // TODO 【生产环境必须删除】开发模式自动填入验证码
- const devCode = res.data;
- if (devCode) {
- this.formData.code = devCode;
- uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
- } else {
- uni.showToast({ title: '验证码已发送', icon: 'none' });
- }
- } catch (err) {
- __f__('error','at pages/recruit/logic.js:170','发送验证码失败:', err);
- }
- }, */
- // 城市选择器 logic(从后端加载)
- async openCityPicker() {
- this.showCityPicker = true;
- if (this.selectedPathway.length === 0) {
- await this.resetCityPicker();
- }
- },
- async resetCityPicker() {
- this.selectStep = 0;
- this.selectedPathway = [];
- await this.loadAreaChildren(0);
- },
- closeCityPicker() {
- this.showCityPicker = false;
- },
- async loadAreaChildren(parentId) {
- try {
- const res = await getAreaChildren(parentId);
- this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
- id: item.id,
- name: item.name,
- type: item.type,
- parentId: item.parentId
- }));
- } catch (err) {
- formatAppLog("error", "at pages/recruit/logic.js:202", "加载区域数据失败:", err);
- this.currentList = [];
- }
- },
- async selectCityItem(item) {
- this.selectedPathway[this.selectStep] = item;
- if (item.type === 0) {
- this.selectStep++;
- this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
- await this.loadAreaChildren(item.id);
- if (this.currentList.length === 0) {
- this.selectedCityId = item.id;
- this.confirmCity();
- }
- } else {
- this.selectedCityId = item.id;
- this.confirmCity();
- }
- },
- async jumpToStep(step) {
- this.selectStep = step;
- if (step === 0) {
- await this.loadAreaChildren(0);
- } else {
- const parent = this.selectedPathway[step - 1];
- if (parent) {
- await this.loadAreaChildren(parent.id);
- }
- }
- },
- confirmCity() {
- const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
- this.formData.city = fullPath;
- this.formData.station = "";
- this.formData.stationId = null;
- const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
- if (lastSelected) {
- this.loadStations(lastSelected.id);
- }
- this.closeCityPicker();
- },
- // 站点选择器(从后端加载,只取type=2的站点)
- async loadStations(parentId) {
- try {
- const res = await getAreaChildren(parentId);
- this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
- id: item.id,
- name: item.name
- }));
- } catch (err) {
- formatAppLog("error", "at pages/recruit/logic.js:261", "加载站点数据失败:", err);
- this.stationList = [];
- }
- },
- openStationPicker() {
- if (this.stationList.length === 0) {
- uni.showToast({ title: "请先选择工作城市", icon: "none" });
- return;
- }
- this.showStationPicker = true;
- },
- closeStationPicker() {
- this.showStationPicker = false;
- },
- selectStation(item) {
- this.formData.station = item.name;
- this.formData.stationId = item.id;
- this.closeStationPicker();
- },
- openPrivacy() {
- this.currentAgreementId = 3;
- this.showPrivacy = true;
- },
- goToAuth() {
- if (!this.isAgreed) {
- uni.showToast({ title: "请勾选协议", icon: "none" });
- return;
- }
- if (!this.formData.mobile || this.formData.mobile.length !== 11) {
- uni.showToast({ title: "请输入正确的手机号", icon: "none" });
- return;
- }
- if (!this.formData.name) {
- uni.showToast({ title: "请输入姓名", icon: "none" });
- return;
- }
- if (this.formData.serviceType.length === 0) {
- uni.showToast({ title: "请选择服务类型", icon: "none" });
- return;
- }
- uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
- const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
- const services = JSON.stringify(selectedServices);
- uni.navigateTo({
- url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
- });
- }
- }
- };
- const _sfc_main$A = {
- ...logic$7,
- components: {
- Agreement
- }
- };
- function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_agreement = vue.resolveComponent("agreement");
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "手机号"),
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.createElementVNode("view", { class: "prefix-area" }, [
- vue.createElementVNode("text", { class: "prefix" }, "+86"),
- vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
- ]),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input",
- type: "number",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.formData.mobile]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "姓名"),
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input",
- type: "text",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.formData.name]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "性别"),
- vue.createElementVNode("view", { class: "gender-group" }, [
- vue.createElementVNode("view", {
- class: "radio-item",
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
- },
- vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
- },
- " 男",
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", {
- class: "radio-item",
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
- },
- vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
- },
- " 女",
- 2
- /* CLASS */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "生日"),
- vue.createElementVNode("view", {
- class: "input-box",
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
- 1
- /* TEXT */
- ),
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "arrow-right",
- style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ]))
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "密码"),
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "input",
- password: !_ctx.showPwd,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
- placeholder: "设置登录密码"
- }, null, 8, ["password"]), [
- [vue.vModelText, _ctx.formData.password]
- ]),
- vue.createElementVNode("view", {
- class: "monkey-icon",
- onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
- }, [
- _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
- key: 0,
- class: "svg-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ])) : (vue.openBlock(), vue.createElementBlock("svg", {
- key: 1,
- class: "svg-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- d: "M12 7C7 7 2.73 10.11 1 14.5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M23 14.5C21.27 10.11 17 7 12 7",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M12 7V4",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M16 8L18 5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M8 8L6 5",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M20 10L22 8",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- }),
- vue.createElementVNode("path", {
- d: "M4 10L2 8",
- stroke: "#CCCCCC",
- "stroke-width": "2",
- "stroke-linecap": "round"
- })
- ]))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
- vue.createElementVNode("view", { class: "service-types" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.serviceTypes, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
- key: item.id,
- onClick: ($event) => _ctx.toggleService(item)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "工作城市"),
- vue.createElementVNode("view", {
- class: "input-box",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- {
- style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
- },
- vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
- 5
- /* TEXT, STYLE */
- ),
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "arrow-right",
- style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ]))
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "服务站点"),
- vue.createElementVNode("view", {
- class: "input-box",
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- {
- style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
- },
- vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
- 5
- /* TEXT, STYLE */
- ),
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "arrow-right",
- style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ]))
- ])
- ])
- ]),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
- },
- [
- vue.createElementVNode("view", {
- class: "picker-content",
- onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "picker-header" }, [
- vue.createElementVNode("text", {
- class: "picker-btn-cancel",
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
- vue.createElementVNode("text", {
- class: "picker-btn-confirm",
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
- }, "确定")
- ]),
- vue.createElementVNode("view", { class: "picker-body" }, [
- vue.createElementVNode("view", { class: "timeline-area" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.selectedPathway, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "timeline-item",
- key: index,
- onClick: ($event) => _ctx.jumpToStep(index)
- }, [
- vue.createElementVNode("view", { class: "timeline-dot" }),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "timeline-item active"
- }, [
- vue.createElementVNode("view", { class: "timeline-dot" }),
- vue.createElementVNode("text", null, "请选择")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "list-area"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: item.id,
- onClick: ($event) => _ctx.selectCityItem(item)
- }, vue.toDisplayString(item.name), 9, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- style: { "padding": "20rpx", "color": "#999" }
- }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
- onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
- },
- [
- vue.createElementVNode("view", {
- class: "picker-content",
- onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", {
- class: "picker-header",
- style: { "justify-content": "center", "position": "relative" }
- }, [
- vue.createElementVNode("text", {
- class: "picker-btn-cancel",
- style: { "position": "absolute", "left": "30rpx" },
- onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "picker-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.stationList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "station-item",
- key: index,
- onClick: ($event) => _ctx.selectStation(item)
- }, vue.toDisplayString(item.name), 9, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "footer-actions" }, [
- vue.createElementVNode("view", { class: "agreement-row" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
- onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
- },
- [
- _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "check-mark"
- }, "✓")) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("text", { class: "agree-text" }, [
- vue.createTextVNode("我已阅读并同意 "),
- vue.createElementVNode("text", {
- style: { "color": "#2979ff" },
- onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
- }, "《宠宝履约者说明》")
- ])
- ]),
- vue.createElementVNode("view", { class: "footer-btn-area" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
- }, "下一步,实名认证")
- ])
- ]),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
- onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
- },
- [
- vue.createElementVNode("view", {
- class: "picker-content",
- onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "picker-header" }, [
- vue.createElementVNode("text", {
- class: "picker-btn-cancel",
- onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
- vue.createElementVNode("text", {
- class: "picker-btn-confirm",
- onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
- }, "确定")
- ]),
- vue.createElementVNode("picker-view", {
- class: "picker-view",
- "indicator-style": "height: 50px;",
- value: _ctx.pickerValue,
- onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
- }, [
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.years, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "年",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.months, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "月",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.days, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "日",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], 40, ["value"])
- ])
- ],
- 2
- /* CLASS */
- ),
- vue.createVNode(_component_agreement, {
- visible: _ctx.showPrivacy,
- "agreement-id": _ctx.currentAgreementId,
- onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
- }, null, 8, ["visible", "agreement-id"])
- ]);
- }
- const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
- const logic$6 = {
- data() {
- return {
- formData: {
- idType: "居民身份证",
- name: "",
- idNumber: "",
- expiryDate: ""
- },
- idCardFront: "",
- // 身份证正面本地预览路径
- idCardBack: "",
- // 身份证反面本地预览路径
- idCardFrontOssId: "",
- // 身份证正面 OSS ID
- idCardBackOssId: "",
- // 身份证反面 OSS ID
- showPicker: false,
- pickerValue: [0, 0, 0],
- // YYYY-MM-DD
- years: [],
- months: [],
- days: [],
- tempYear: 0,
- tempMonth: 0,
- tempDay: 0,
- serviceType: [],
- // 接收上一页的服务类型
- isChoosingImage: false
- // 标志位:是否正在选择图片中,防止 onShow 重置数据
- };
- },
- onLoad(options) {
- if (options.services) {
- try {
- this.serviceType = JSON.parse(decodeURIComponent(options.services));
- } catch (e) {
- formatAppLog("error", "at pages/recruit/auth_logic.js:33", "Parse services failed", e);
- }
- }
- this.initDateData();
- },
- onShow() {
- if (this.isChoosingImage) {
- this.isChoosingImage = false;
- return;
- }
- this.resetFormData();
- },
- methods: {
- // --- 日期选择器逻辑 ---
- initDateData() {
- const date = /* @__PURE__ */ new Date();
- const year = date.getFullYear();
- for (let i = year; i <= year + 50; i++) {
- this.years.push(i);
- }
- for (let i = 1; i <= 12; i++) {
- this.months.push(i);
- }
- for (let i = 1; i <= 31; i++) {
- this.days.push(i);
- }
- },
- openPicker() {
- const date = /* @__PURE__ */ new Date();
- const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
- const [y, m, d] = dateStr.split("-").map(Number);
- let yIndex = this.years.indexOf(y);
- let mIndex = this.months.indexOf(m);
- let dIndex = this.days.indexOf(d);
- this.pickerValue = [
- yIndex > -1 ? yIndex : 0,
- mIndex > -1 ? mIndex : 0,
- dIndex > -1 ? dIndex : 0
- ];
- this.tempYear = this.years[this.pickerValue[0]];
- this.tempMonth = this.months[this.pickerValue[1]];
- this.tempDay = this.days[this.pickerValue[2]];
- this.showPicker = true;
- },
- closePicker() {
- this.showPicker = false;
- },
- onPickerChange(e) {
- const val = e.detail.value;
- this.tempYear = this.years[val[0]];
- this.tempMonth = this.months[val[1]];
- this.tempDay = this.days[val[2]];
- },
- confirmPicker() {
- const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
- const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
- this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
- this.closePicker();
- },
- // --- 数据持久化(防止返回上一级丢失) ---
- restoreAuthData() {
- try {
- const saved = uni.getStorageSync("recruit_auth_data");
- if (saved) {
- const d = JSON.parse(saved);
- this.formData.name = d.name || "";
- this.formData.idNumber = d.idNumber || "";
- this.formData.expiryDate = d.expiryDate || "";
- this.idCardFront = d.idCardFront || "";
- this.idCardBack = d.idCardBack || "";
- this.idCardFrontOssId = d.idCardFrontOssId || "";
- this.idCardBackOssId = d.idCardBackOssId || "";
- }
- } catch (e) {
- formatAppLog("error", "at pages/recruit/auth_logic.js:115", "恢复认证数据失败", e);
- }
- },
- saveAuthData() {
- try {
- uni.setStorageSync("recruit_auth_data", JSON.stringify({
- name: this.formData.name,
- idNumber: this.formData.idNumber,
- expiryDate: this.formData.expiryDate,
- idCardFront: this.idCardFront,
- idCardBack: this.idCardBack,
- idCardFrontOssId: this.idCardFrontOssId,
- idCardBackOssId: this.idCardBackOssId
- }));
- } catch (e) {
- formatAppLog("error", "at pages/recruit/auth_logic.js:130", "保存认证数据失败", e);
- }
- },
- // --- 重置表单数据 ---
- resetFormData() {
- this.formData.name = "";
- this.formData.idNumber = "";
- this.formData.expiryDate = "";
- this.idCardFront = "";
- this.idCardBack = "";
- this.idCardFrontOssId = "";
- this.idCardBackOssId = "";
- try {
- uni.removeStorageSync("recruit_auth_data");
- } catch (e) {
- formatAppLog("error", "at pages/recruit/auth_logic.js:147", "清除缓存失败", e);
- }
- },
- // --- 图片上传(选择后自动上传到OSS) ---
- chooseImage(side) {
- this.isChoosingImage = true;
- uni.chooseImage({
- count: 1,
- sizeType: ["compressed"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- const tempPath = res.tempFilePaths[0];
- if (side === "front") {
- this.idCardFront = tempPath;
- } else {
- this.idCardBack = tempPath;
- }
- try {
- uni.showLoading({ title: "上传中..." });
- const uploadRes = await uploadFile(tempPath);
- if (side === "front") {
- this.idCardFrontOssId = uploadRes.data.ossId;
- } else {
- this.idCardBackOssId = uploadRes.data.ossId;
- }
- uni.hideLoading();
- this.saveAuthData();
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/recruit/auth_logic.js:178", "上传身份证图片失败:", err);
- }
- }
- });
- },
- // --- 提交 ---
- goToQualifications() {
- this.saveAuthData();
- try {
- const stored = uni.getStorageSync("recruit_form_data");
- if (stored) {
- const data = JSON.parse(stored);
- data.realName = this.formData.name;
- data.idNumber = this.formData.idNumber;
- data.expiryDate = this.formData.expiryDate;
- data.idCardFrontOssId = this.idCardFrontOssId;
- data.idCardBackOssId = this.idCardBackOssId;
- uni.setStorageSync("recruit_form_data", JSON.stringify(data));
- }
- } catch (e) {
- formatAppLog("error", "at pages/recruit/auth_logic.js:215", "保存认证数据失败", e);
- }
- const services = JSON.stringify(this.serviceType);
- uni.navigateTo({
- url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
- });
- }
- }
- };
- const _sfc_main$z = logic$6;
- function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
- vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
- vue.createElementVNode("view", { class: "form-card" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "证件类型"),
- vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "真实姓名"),
- vue.createElementVNode("view", { class: "gray-input-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input-area",
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
- placeholder: "证件姓名",
- "placeholder-class": "input-placeholder"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.formData.name]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "证件号码"),
- vue.createElementVNode("view", { class: "gray-input-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input-area",
- type: "idcard",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
- placeholder: "身份证号",
- "placeholder-class": "input-placeholder"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.formData.idNumber]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "有效日期"),
- vue.createElementVNode("view", {
- class: "gray-input-box",
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
- },
- vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
- 3
- /* TEXT, CLASS */
- ),
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "arrow-right",
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ]))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "upload-card" }, [
- vue.createElementVNode("view", {
- class: "upload-box",
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
- }, [
- _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _ctx.idCardFront,
- class: "preview-img",
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "camera-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#E0E0E0"
- }),
- vue.createElementVNode("circle", {
- cx: "12",
- cy: "12",
- r: "3",
- stroke: "#CCCCCC",
- "stroke-width": "2"
- }),
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ])),
- vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
- ]),
- vue.createElementVNode("view", { class: "upload-card" }, [
- vue.createElementVNode("view", {
- class: "upload-box",
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
- }, [
- _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _ctx.idCardBack,
- class: "preview-img",
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "camera-icon",
- viewBox: "0 0 24 24",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#CCCCCC"
- })
- ])),
- vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
- ]),
- vue.createElementVNode("view", { class: "footer-btn-area" }, [
- vue.createElementVNode("button", {
- class: "next-btn",
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
- }, "下一步,完善资质")
- ]),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
- },
- [
- vue.createElementVNode("view", {
- class: "picker-content",
- onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "picker-header" }, [
- vue.createElementVNode("text", {
- class: "picker-btn-cancel",
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
- vue.createElementVNode("text", {
- class: "picker-btn-confirm",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
- }, "确定")
- ]),
- vue.createElementVNode("picker-view", {
- class: "picker-view",
- "indicator-style": "height: 50px;",
- value: _ctx.pickerValue,
- onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
- }, [
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.years, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "年",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.months, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "月",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.days, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "picker-item",
- key: index
- },
- vue.toDisplayString(item) + "日",
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], 40, ["value"])
- ])
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
- const logic$5 = {
- data() {
- return {
- serviceTypes: [],
- // 从上一页传递过来的服务类型列表
- qualifications: {},
- // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
- qualOssIds: {}
- // 存储OSS ID { '宠物接送': ['id1', ...], ... }
- };
- },
- onLoad(options) {
- if (options.services) {
- try {
- this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
- this.serviceTypes.forEach((item) => {
- this.qualifications[item.name] = [];
- this.qualOssIds[item.name] = [];
- });
- } catch (e) {
- formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
- }
- }
- },
- methods: {
- chooseImage(serviceName) {
- uni.chooseImage({
- count: 9,
- sizeType: ["compressed"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- if (!this.qualifications[serviceName]) {
- this.qualifications[serviceName] = [];
- this.qualOssIds[serviceName] = [];
- }
- for (const tempPath of res.tempFilePaths) {
- this.qualifications[serviceName].push(tempPath);
- this.$forceUpdate();
- try {
- const uploadRes = await uploadFile(tempPath);
- this.qualOssIds[serviceName].push(uploadRes.data.ossId);
- } catch (err) {
- formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
- }
- }
- }
- });
- },
- deleteImage(serviceName, index) {
- this.qualifications[serviceName].splice(index, 1);
- if (this.qualOssIds[serviceName]) {
- this.qualOssIds[serviceName].splice(index, 1);
- }
- this.$forceUpdate();
- },
- goBackToForm() {
- const pages = getCurrentPages();
- if (pages.length > 2) {
- uni.navigateBack({
- delta: 2
- });
- } else {
- uni.reLaunch({
- url: "/pages/recruit/form"
- });
- }
- },
- async submit() {
- let recruitData = {};
- try {
- const stored = uni.getStorageSync("recruit_form_data");
- if (stored) {
- recruitData = JSON.parse(stored);
- }
- } catch (e) {
- formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
- }
- const allQualOssIds = [];
- Object.values(this.qualOssIds).forEach((ids) => {
- allQualOssIds.push(...ids);
- });
- const auditData = {
- name: recruitData.name || "",
- phone: recruitData.mobile || "",
- password: recruitData.password || "",
- gender: recruitData.gender === 1 ? "0" : "1",
- birthday: recruitData.birthday || "",
- serviceTypes: (recruitData.serviceType || []).join(","),
- // 逗号分隔的服务类型ID
- city: recruitData.city || "",
- stationId: recruitData.stationId || null,
- realName: recruitData.realName || "",
- idCard: recruitData.idNumber || "",
- idValidDate: recruitData.expiryDate || "",
- idCardFront: recruitData.idCardFrontOssId || null,
- idCardBack: recruitData.idCardBackOssId || null,
- qualifications: allQualOssIds.join(",")
- // 逗号分隔的资质图片OSS ID
- };
- uni.showLoading({ title: "提交中..." });
- try {
- await submitAudit(auditData);
- uni.hideLoading();
- uni.reLaunch({
- url: "/pages/recruit/success"
- });
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
- }
- }
- }
- };
- const _sfc_main$y = logic$5;
- function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
- vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
- _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "empty-state"
- }, [
- vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
- vue.createElementVNode("button", {
- class: "back-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
- }, "返回选择")
- ])) : vue.createCommentVNode("v-if", true),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.serviceTypes, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "qual-card",
- key: item.id
- }, [
- vue.createElementVNode(
- "view",
- { class: "card-title" },
- vue.toDisplayString(item.name) + "服务资质",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "upload-wrapper" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "img-item",
- key: imgIndex
- }, [
- vue.createElementVNode("image", {
- src: img,
- class: "preview-img",
- mode: "aspectFill",
- onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
- }, null, 8, ["src", "onClick"]),
- vue.createElementVNode("view", {
- class: "delete-btn",
- onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
- }, "×", 8, ["onClick"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", {
- class: "upload-box",
- onClick: ($event) => _ctx.chooseImage(item.name)
- }, [
- vue.createElementVNode("text", { class: "plus-icon" }, "+"),
- vue.createElementVNode("text", { class: "upload-text" }, "上传")
- ], 8, ["onClick"])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "footer-actions" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
- }, "立即提交")
- ])
- ]);
- }
- const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
- const logic$4 = {
- data() {
- return {
- station: "民治街道第一站",
- name: "张三哥",
- phone: "+8613612345678"
- };
- },
- methods: {
- goHome() {
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }
- }
- };
- const _sfc_main$x = logic$4;
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
- vue.createElementVNode("view", { class: "icon-area" }, [
- (vue.openBlock(), vue.createElementBlock("svg", {
- class: "success-icon",
- viewBox: "0 0 1024 1024",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg"
- }, [
- vue.createElementVNode("path", {
- 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",
- fill: "#64D01D"
- }),
- vue.createElementVNode("path", {
- 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",
- fill: "#64D01D"
- })
- ])),
- vue.createElementVNode("text", { class: "main-title" }, "提交成功")
- ]),
- vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
- vue.createElementVNode("view", { class: "info-card" }, [
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "服务站点:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(_ctx.station),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(_ctx.name),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "联系手机:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(_ctx.phone),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", {
- class: "footer-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
- }, "我知道了")
- ]);
- }
- const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
- const _sfc_main$w = {
- data() {
- return {
- mobile: "",
- code: "",
- countDown: 0,
- timer: null
- };
- },
- computed: {
- mobileMask() {
- if (!this.mobile)
- return "";
- return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
- }
- },
- onLoad(options) {
- if (options.mobile) {
- this.mobile = options.mobile;
- } else {
- this.mobile = "13412346783";
- }
- },
- methods: {
- getVerifyCode() {
- if (this.countDown > 0)
- return;
- this.countDown = 60;
- this.timer = setInterval(() => {
- this.countDown--;
- if (this.countDown <= 0) {
- clearInterval(this.timer);
- }
- }, 1e3);
- uni.showToast({ title: "验证码已发送", icon: "none" });
- },
- nextStep() {
- if (!this.code) {
- uni.showToast({ title: "请输入验证码", icon: "none" });
- return;
- }
- uni.navigateTo({
- url: "/pages/login/reset-pwd-set"
- });
- }
- }
- };
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode(
- "view",
- { class: "tip-text" },
- "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createElementVNode("text", { class: "label" }, "验证码"),
- vue.createElementVNode("view", { class: "input-wrapper" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "code-input",
- type: "number",
- maxlength: "6",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.code]
- ]),
- vue.createElementVNode("view", {
- class: "get-code-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "btn-text" },
- vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("button", {
- class: "next-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
- }, "下一步")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$v = {
- data() {
- return {
- pwd1: "",
- pwd2: ""
- };
- },
- methods: {
- confirmReset() {
- if (!this.pwd1 || !this.pwd2) {
- uni.showToast({ title: "请输入密码", icon: "none" });
- return;
- }
- if (this.pwd1 !== this.pwd2) {
- uni.showToast({ title: "两次密码不一致", icon: "none" });
- return;
- }
- uni.showToast({ title: "重置成功", icon: "success" });
- setTimeout(() => {
- uni.navigateBack({
- delta: 2
- // 返回到登录页
- });
- }, 1500);
- }
- }
- };
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
- vue.createElementVNode("view", { class: "input-form" }, [
- vue.createElementVNode("view", { class: "input-row" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "pwd-input",
- type: "text",
- password: "",
- placeholder: "限12-20位字母和数字组合",
- "placeholder-style": "color:#ccc",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.pwd1]
- ])
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", { class: "input-row" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "pwd-input",
- type: "text",
- password: "",
- placeholder: "限12-20位字母和数字组合",
- "placeholder-style": "color:#ccc",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.pwd2]
- ])
- ]),
- vue.createElementVNode("view", { class: "divider" })
- ]),
- vue.createElementVNode("button", {
- class: "confirm-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
- }, "确定")
- ])
- ]);
- }
- 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"]]);
- function cancelOrderApi(data) {
- return request({
- url: "/order/subOrder/cancel",
- method: "PUT",
- data
- });
- }
- function rejectOrderApi(data) {
- return request({
- url: "/order/subOrder/reject",
- method: "PUT",
- data
- });
- }
- const _sfc_main$u = {
- __name: "index",
- props: {
- currentPath: {
- type: String,
- required: true
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props = __props;
- const list = vue.ref([
- {
- pagePath: "pages/home/index",
- text: "任务中心",
- iconPath: "/static/tabbar/home.svg",
- selectedIconPath: "/static/tabbar/home-active.svg"
- },
- {
- pagePath: "pages/orders/index",
- text: "我的订单",
- iconPath: "/static/tabbar/order.svg",
- selectedIconPath: "/static/tabbar/order-active.svg"
- },
- {
- pagePath: "pages/mine/index",
- text: "我的",
- iconPath: "/static/tabbar/mine.svg",
- selectedIconPath: "/static/tabbar/mine-active.svg"
- }
- ]);
- const switchTab = (path) => {
- if (props.currentPath === path)
- return;
- uni.switchTab({
- url: "/" + path
- });
- };
- const __returned__ = { props, list, switchTab, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
- vue.createElementVNode("view", { class: "tabbar-border" }),
- vue.createElementVNode("view", { class: "tabbar-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.list, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tabbar-item",
- key: index,
- onClick: ($event) => $setup.switchTab(item.pagePath)
- }, [
- vue.createElementVNode("image", {
- class: "tabbar-icon",
- src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
- },
- vue.toDisplayString(item.text),
- 3
- /* TEXT, CLASS */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]);
- }
- 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"]]);
- const logic$3 = {
- components: {
- customTabbar
- },
- data() {
- return {
- taskList: [],
- currentFilter: "default",
- // default, distance, time
- filterCondition: "筛选条件",
- sortDistance: "asc",
- // asc, desc
- sortTime: "asc",
- scrollTop: 0,
- // Track scroll position
- isFilterShow: false,
- tempFilter: {
- service: null,
- distance: "全部",
- amount: "全部"
- },
- activeFilter: {
- service: null,
- distance: "全部",
- amount: "全部"
- },
- workStatus: "resting",
- // resting | busy | disabled
- showConfirmModal: false,
- showPetModal: false,
- currentPetInfo: {},
- showRejectModal: false,
- rejectReason: "",
- currentOrder: null,
- showAcceptConfirmModal: false,
- showNavModal: false,
- navTargetItem: null,
- navTargetPointType: "",
- profile: null,
- profileLoading: false,
- serviceList: [],
- orderStats: {
- total: 0,
- reject: 0,
- completed: 0,
- price: 0
- }
- };
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- async onLoad() {
- this.checkWorkStatus();
- await this.loadServiceList();
- this.loadTaskList();
- },
- onShow() {
- uni.hideTabBar();
- this.checkWorkStatus();
- if (isLoggedIn()) {
- this.loadProfile();
- this.loadOrderStats();
- this.loadTaskList();
- this.loadServiceList();
- }
- },
- async onPullDownRefresh() {
- this.checkWorkStatus();
- try {
- await this.loadServiceList();
- const tasks = [
- this.loadTaskList()
- ];
- if (isLoggedIn()) {
- tasks.push(this.loadProfile());
- tasks.push(this.loadOrderStats());
- }
- await Promise.all(tasks);
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:90", "刷新异常:", err);
- } finally {
- uni.stopPullDownRefresh();
- uni.showToast({ title: "刷新成功", icon: "success" });
- }
- },
- methods: {
- async loadProfile() {
- if (this.profileLoading)
- return;
- this.profileLoading = true;
- try {
- const res = await getMyProfile();
- const data = res.data || null;
- this.profile = data;
- if (data && data.status) {
- this.workStatus = data.status;
- uni.setStorageSync("workStatus", data.status);
- }
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:110", "获取个人信息失败:", err);
- } finally {
- this.profileLoading = false;
- }
- },
- async loadServiceList() {
- try {
- const res = await listAllService();
- this.serviceList = res.data || [];
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:120", "获取服务类型失败:", err);
- }
- },
- async loadOrderStats() {
- try {
- const res = await getOrderCount();
- this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:128", "获取订单统计失败:", err);
- }
- },
- checkWorkStatus() {
- const status = uni.getStorageSync("workStatus");
- if (status) {
- this.workStatus = status;
- } else {
- this.workStatus = "resting";
- uni.setStorageSync("workStatus", "resting");
- }
- },
- toggleFilter() {
- if (this.workStatus === "resting")
- return;
- this.isFilterShow = !this.isFilterShow;
- },
- goToWorkStatus() {
- uni.navigateTo({
- url: "/pages/home/work-status"
- });
- },
- startWork() {
- this.showConfirmModal = true;
- },
- confirmStartWork() {
- this.workStatus = "busy";
- uni.setStorageSync("workStatus", "busy");
- this.loadTaskList();
- this.showConfirmModal = false;
- uni.showToast({ title: "已开始接单", icon: "success" });
- },
- closeConfirmModal() {
- this.showConfirmModal = false;
- },
- showPetProfile(item) {
- this.currentPetInfo = item;
- this.showPetModal = true;
- },
- closePetProfile() {
- this.showPetModal = false;
- },
- openRejectModal(item) {
- this.currentOrder = item;
- this.rejectReason = "";
- this.showRejectModal = true;
- },
- closeRejectModal() {
- this.showRejectModal = false;
- this.currentOrder = null;
- },
- async confirmReject() {
- var _a;
- if (!this.rejectReason.trim()) {
- uni.showToast({ title: "请输入拒绝理由", icon: "none" });
- return;
- }
- if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
- return;
- try {
- uni.showLoading({ title: "提交中...", mask: true });
- await rejectOrderApi({
- orderId: this.currentOrder.id,
- rejectReason: this.rejectReason
- });
- uni.showToast({ title: "已拒绝接单", icon: "success" });
- this.showRejectModal = false;
- this.currentOrder = null;
- this.loadTaskList();
- this.loadOrderStats();
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:197", "拒绝接单失败:", err);
- uni.showToast({ title: "操作失败", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- },
- openAcceptModal(item) {
- this.currentOrder = item;
- this.showAcceptConfirmModal = true;
- },
- closeAcceptModal() {
- this.showAcceptConfirmModal = false;
- this.currentOrder = null;
- },
- async confirmAccept() {
- var _a;
- if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
- return;
- try {
- await acceptOrder(this.currentOrder.id);
- uni.showToast({ title: "接单成功", icon: "success" });
- this.showAcceptConfirmModal = false;
- this.currentOrder = null;
- this.loadTaskList();
- this.loadProfile();
- this.loadOrderStats();
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:222", "接单失败:", err);
- uni.showToast({ title: "接单失败", icon: "none" });
- }
- },
- openNavigation(item, pointType) {
- this.navTargetItem = item;
- this.navTargetPointType = pointType;
- this.showNavModal = true;
- },
- closeNavModal() {
- this.showNavModal = false;
- },
- chooseMap(mapType) {
- let item = this.navTargetItem;
- let pointType = this.navTargetPointType;
- let name = pointType === "start" ? item.startLocation : item.endLocation;
- let address = pointType === "start" ? item.startAddress : item.endAddress;
- this.showNavModal = false;
- uni.openLocation({
- latitude: 30.52,
- // Mock lat
- longitude: 114.31,
- // Mock lng
- name: name || "目的地",
- address: address || "默认地址",
- success: function() {
- formatAppLog("log", "at pages/home/logic.js:248", "打开导航成功: " + mapType);
- }
- });
- },
- selectService(type) {
- this.tempFilter.service = type;
- },
- selectDistance(type) {
- this.tempFilter.distance = type;
- },
- selectAmount(type) {
- this.tempFilter.amount = type;
- },
- resetFilter() {
- this.tempFilter = {
- service: null,
- distance: "全部",
- amount: "全部"
- };
- },
- confirmFilter() {
- this.activeFilter = { ...this.tempFilter };
- this.isFilterShow = false;
- this.loadTaskList();
- },
- closeFilter() {
- this.isFilterShow = false;
- },
- goToDetail(item) {
- formatAppLog("log", "at pages/home/logic.js:277", "Go to detail", item);
- },
- async loadTaskList() {
- try {
- const params = {
- service: this.activeFilter.service,
- minPrice: this.getMinPrice(),
- maxPrice: this.getMaxPrice(),
- pageNum: 1,
- pageSize: 20
- };
- const res = await getPendingOrders(params);
- this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
- } catch (err) {
- formatAppLog("error", "at pages/home/logic.js:291", "获取订单列表失败:", err);
- uni.showToast({ title: "加载失败", icon: "none" });
- this.taskList = [];
- }
- },
- getMinPrice() {
- const amount = this.activeFilter.amount;
- if (amount === "100以下")
- return 0;
- if (amount === "100-200")
- return 1e4;
- if (amount === "200-500")
- return 2e4;
- if (amount === "500以上")
- return 5e4;
- return void 0;
- },
- getMaxPrice() {
- const amount = this.activeFilter.amount;
- if (amount === "100以下")
- return 1e4;
- if (amount === "100-200")
- return 2e4;
- if (amount === "200-500")
- return 5e4;
- return void 0;
- },
- transformOrder(item) {
- const service = this.serviceList.find((s) => s.id === item.service);
- const serviceText = (service == null ? void 0 : service.name) || "未知";
- const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
- const mode = (service == null ? void 0 : service.mode) || 0;
- const isRoundTrip = mode === 1;
- return {
- id: item.id,
- type: isRoundTrip ? 1 : item.service,
- typeText: serviceText,
- typeIcon: serviceIcon,
- price: (item.price / 100).toFixed(2),
- timeLabel: "服务时间",
- time: item.serviceTime,
- petAvatar: item.petAvatar || "/static/dog.png",
- petAvatarUrl: item.petAvatarUrl || "",
- petName: item.petName,
- petBreed: item.breed,
- petGender: "M",
- petAge: "",
- petWeight: "",
- petPersonality: "",
- petHobby: "",
- petRemark: "",
- petTags: [],
- petLogs: [],
- startLocation: isRoundTrip ? item.fromAddress : "",
- startAddress: isRoundTrip ? item.fromAddress : "",
- startDistance: "0km",
- endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
- endAddress: item.toAddress,
- endDistance: "0km",
- serviceContent: "",
- remark: item.remark || ""
- };
- },
- setFilter(type) {
- this.currentFilter = type;
- if (type === "distance") {
- this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
- uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
- } else if (type === "time") {
- this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
- uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
- }
- },
- showFilterDropdown() {
- this.toggleFilter();
- }
- }
- };
- const _imports_3$2 = "/static/icons/nav_arrow.svg";
- const _sfc_main$t = {
- ...logic$3
- };
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
- var _a, _b, _c;
- const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- vue.createElementVNode("view", { class: "container" }, [
- vue.createElementVNode(
- "view",
- {
- class: "custom-nav-bar",
- style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
- },
- [
- vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
- ],
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "nav-bg" }, [
- vue.createElementVNode("view", { class: "bg-circle-left" }),
- vue.createElementVNode("view", { class: "bg-circle-right" })
- ]),
- vue.createElementVNode("view", { class: "header-section" }, [
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createElementVNode("image", {
- class: "avatar",
- src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "info-content" }, [
- vue.createElementVNode("view", { class: "top-row" }, [
- vue.createElementVNode(
- "text",
- { class: "name" },
- vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus !== "busy" }]),
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["status-dot-bg", { "busy": _ctx.workStatus === "busy", "disabled": _ctx.workStatus === "disabled" }])
- },
- [
- _ctx.workStatus === "busy" ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "check-mark"
- }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "check-mark",
- style: { "font-size": "16rpx", "line-height": "20rpx" }
- }, "✕"))
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "text",
- { class: "status-text" },
- vue.toDisplayString(_ctx.workStatus === "busy" ? "接单中" : _ctx.workStatus === "resting" ? "正在休息" : "已禁用"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "arrow-down" }, "▼")
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "bottom-row" }, [
- vue.createElementVNode(
- "text",
- { class: "city-label" },
- "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "city-arrow" }, ">")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "stats-card" }, [
- vue.createElementVNode("view", { class: "stat-item" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(_ctx.orderStats.total),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "label" }, "全部订单")
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", { class: "stat-item" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(_ctx.orderStats.reject),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "label" }, "拒接订单")
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", { class: "stat-item" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(_ctx.orderStats.completed),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "label" }, "完成订单")
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", { class: "stat-item" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "label" }, "服务总得")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "task-header" }, [
- vue.createElementVNode(
- "view",
- {
- class: "header-inner",
- style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
- },
- [
- vue.createElementVNode("view", { class: "left-title" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "title" }, "任务大厅"),
- vue.createElementVNode(
- "text",
- { class: "count" },
- "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "filter-options" }, [
- vue.createElementVNode("view", {
- class: "dropdown",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
- }, [
- vue.createElementVNode("text", null, "筛选条件"),
- vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
- ])
- ])
- ],
- 4
- /* STYLE */
- ),
- _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "filter-mask",
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
- },
- [
- vue.createElementVNode("view", { class: "filter-section" }, [
- vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
- vue.createElementVNode("view", { class: "options-grid" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
- },
- "全部",
- 2
- /* CLASS */
- ),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.serviceList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
- key: item.id,
- onClick: ($event) => _ctx.selectService(item.id)
- }, vue.toDisplayString(item.name), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "filter-section" }, [
- vue.createElementVNode("text", { class: "section-title" }, "金额"),
- vue.createElementVNode("view", { class: "options-grid" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
- },
- "全部",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
- },
- "100以下",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
- onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
- },
- "100-200",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
- onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
- },
- "200-500",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
- onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
- },
- "500以上",
- 2
- /* CLASS */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "filter-actions" }, [
- vue.createElementVNode("button", {
- class: "action-btn reset",
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
- }, "重置"),
- vue.createElementVNode("button", {
- class: "action-btn confirm",
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
- }, "确认")
- ])
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "task-list-container" }, [
- vue.createElementVNode("view", { class: "task-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.taskList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "task-card",
- key: item.id,
- onClick: ($event) => _ctx.goToDetail(item)
- }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("view", { class: "type-badge" }, [
- vue.createElementVNode("image", {
- class: "type-icon",
- src: item.typeIcon
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "text",
- { class: "type-text" },
- vue.toDisplayString(item.typeText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "price" },
- "¥" + vue.toDisplayString(item.price),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("view", { class: "time-row" }, [
- vue.createElementVNode(
- "text",
- { class: "label" },
- vue.toDisplayString(item.timeLabel) + ":",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pet-card" }, [
- vue.createElementVNode("image", {
- class: "pet-avatar",
- src: item.petAvatarUrl || item.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pet-info" }, [
- vue.createElementVNode(
- "text",
- { class: "pet-name" },
- vue.toDisplayString(item.petName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pet-breed" },
- "品种: " + vue.toDisplayString(item.petBreed),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "route-info" }, [
- item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
- vue.createElementVNode("view", { class: "route-line-vertical" }),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.startLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.startAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"]),
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"]),
- item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "service-content"
- }, [
- vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.serviceContent),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ]),
- item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "remark-box"
- }, [
- vue.createElementVNode(
- "text",
- null,
- "备注:" + vue.toDisplayString(item.remark),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "action-btns" }, [
- vue.createElementVNode("button", {
- class: "btn reject",
- onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
- }, "拒绝", 8, ["onClick"]),
- vue.createElementVNode("button", {
- class: "btn accept",
- onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
- }, "接单", 8, ["onClick"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { style: { "height": "120rpx" } })
- ])
- ]),
- _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "modal-mask"
- }, [
- vue.createElementVNode("view", { class: "custom-modal" }, [
- vue.createElementVNode("text", { class: "modal-title" }, "提示"),
- vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
- vue.createElementVNode("view", { class: "modal-btns" }, [
- vue.createElementVNode("button", {
- class: "modal-btn cancel",
- onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
- }, "取消"),
- vue.createElementVNode("button", {
- class: "modal-btn confirm",
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
- }, "确定")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "pet-modal-mask",
- onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, [
- vue.createElementVNode("view", {
- class: "pet-modal-content",
- onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "pet-modal-header" }, [
- vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
- vue.createElementVNode("view", {
- class: "close-icon-btn",
- onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, "×")
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "pet-modal-scroll"
- }, [
- vue.createElementVNode("view", { class: "pet-base-info" }, [
- vue.createElementVNode("image", {
- class: "pm-avatar",
- src: _ctx.currentPetInfo.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pm-info-text" }, [
- vue.createElementVNode("view", { class: "pm-name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "pm-name" },
- vue.toDisplayString(_ctx.currentPetInfo.petName),
- 1
- /* TEXT */
- ),
- _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-gender"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
- vue.createElementVNode("text", null, "公")
- ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "pm-gender female"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
- vue.createElementVNode("text", null, "母")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "text",
- { class: "pm-breed" },
- "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "pm-detail-grid" }, [
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "体重"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "性格"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "备注"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
- 1
- /* TEXT */
- )
- ])
- ]),
- _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-tags"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "pm-tag",
- key: index
- },
- vue.toDisplayString(tag),
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "pm-section-title" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", null, "备注日志")
- ]),
- vue.createElementVNode("view", { class: "pm-log-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "pm-log-item",
- key: lIndex
- }, [
- vue.createElementVNode(
- "text",
- { class: "pm-log-date" },
- vue.toDisplayString(log.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pm-log-text" },
- vue.toDisplayString(log.content),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pm-log-recorder" },
- vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { style: { "height": "40rpx" } }),
- vue.createElementVNode("button", {
- class: "pm-bottom-close",
- onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, "关闭"),
- vue.createElementVNode("view", { style: { "height": "20rpx" } })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "modal-mask"
- }, [
- vue.createElementVNode("view", { class: "custom-modal" }, [
- vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "reject-textarea",
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
- placeholder: "请输入拒绝理由(必填)",
- maxlength: "100"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.rejectReason]
- ]),
- vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
- vue.createElementVNode("button", {
- class: "modal-btn cancel",
- onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
- }, "取消"),
- vue.createElementVNode("button", {
- class: "modal-btn confirm",
- onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
- }, "提交")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "modal-mask"
- }, [
- vue.createElementVNode("view", { class: "custom-modal" }, [
- vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
- vue.createElementVNode("view", { class: "modal-content-box" }, [
- vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
- vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
- ]),
- vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
- vue.createElementVNode("button", {
- class: "modal-btn cancel",
- onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
- }, "再想想"),
- vue.createElementVNode("button", {
- class: "modal-btn confirm",
- onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
- }, "确认接单")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "nav-modal-mask",
- onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "nav-action-sheet",
- onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
- }, "高德地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
- }, "腾讯地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
- }, "百度地图"),
- vue.createElementVNode("view", { class: "nav-sheet-gap" }),
- vue.createElementVNode("view", {
- class: "nav-sheet-item cancel",
- onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, "取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
- const _sfc_main$s = {
- data() {
- return {
- status: "resting",
- // resting | busy | disabled
- loading: false
- };
- },
- onShow() {
- const savedStatus = uni.getStorageSync("workStatus");
- if (savedStatus) {
- this.status = savedStatus;
- }
- this.fetchLatestProfile();
- },
- methods: {
- async fetchLatestProfile() {
- try {
- const res = await getMyProfile();
- if (res.data && res.data.status) {
- this.status = res.data.status;
- uni.setStorageSync("workStatus", this.status);
- }
- } catch (err) {
- formatAppLog("error", "at pages/home/work-status.vue:64", "获取状态失败:", err);
- }
- },
- async toggleStatus() {
- if (this.loading)
- return;
- const targetStatus = this.status === "busy" ? "resting" : "busy";
- const actionText = targetStatus === "busy" ? "恢复接单" : "停止接单";
- try {
- uni.showLoading({ title: "处理中...", mask: true });
- this.loading = true;
- await updateStatus(targetStatus);
- await this.fetchLatestProfile();
- uni.hideLoading();
- uni.showToast({ title: actionText + "成功", icon: "success" });
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/home/work-status.vue:88", "切换状态失败:", err);
- uni.showToast({ title: "操作失败,请重试", icon: "none" });
- } finally {
- this.loading = false;
- }
- }
- }
- };
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "signboard-container" }, [
- vue.createElementVNode("view", { class: "rope" }),
- vue.createElementVNode("view", { class: "nail" }),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["board", { "resting": $data.status !== "busy" }])
- },
- [
- vue.createElementVNode("view", { class: "screw top-left" }),
- vue.createElementVNode("view", { class: "screw top-right" }),
- vue.createElementVNode("view", { class: "screw bottom-left" }),
- vue.createElementVNode("view", { class: "screw bottom-right" }),
- vue.createElementVNode("view", { class: "board-inner" }, [
- vue.createElementVNode(
- "text",
- { class: "status-text" },
- vue.toDisplayString($data.status === "busy" ? "接单中" : "休息中"),
- 1
- /* TEXT */
- )
- ])
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "status-desc" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($data.status === "busy" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "action-area" }, [
- vue.createElementVNode(
- "button",
- {
- class: vue.normalizeClass(["action-btn", { "stop": $data.status === "busy", "start": $data.status !== "busy" }]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
- },
- vue.toDisplayString($data.status === "busy" ? "停止接单" : "开始接单"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("view", { class: "tips" }, [
- $data.status === "busy" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
- ])
- ])
- ]);
- }
- 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"]]);
- const logic$2 = {
- components: {
- customTabbar
- },
- data() {
- return {
- currentTab: 0,
- tabs: ["待接送/服务", "配送/服务中", "已完成", "已取消"],
- typeFilterOptions: ["全部类型"],
- currentTypeFilterIdx: 0,
- activeDropdown: 0,
- hasTimeFilter: false,
- currentMonth: "2026年2月",
- weekDays: ["日", "一", "二", "三", "四", "五", "六"],
- calendarDays: [],
- selectedDateRange: [],
- allOrderList: [],
- serviceList: [],
- searchContent: "",
- startServiceTime: "",
- endServiceTime: "",
- showPetModal: false,
- currentPetInfo: {},
- showNavModal: false,
- navTargetItem: null,
- navTargetPointType: "",
- activeCallItem: null,
- showRemarkInput: false,
- remarkText: ""
- };
- },
- created() {
- this.initCalendar();
- },
- async onLoad() {
- await this.loadServiceList();
- await this.loadOrders();
- },
- onShow() {
- uni.hideTabBar();
- this.loadOrders();
- },
- async onPullDownRefresh() {
- try {
- await this.loadServiceList();
- await this.loadOrders();
- } finally {
- uni.stopPullDownRefresh();
- }
- },
- watch: {
- currentTab() {
- this.loadOrders();
- },
- currentTypeFilterIdx() {
- this.loadOrders();
- },
- searchContent() {
- this.loadOrders();
- }
- },
- computed: {
- orderList() {
- return this.allOrderList;
- }
- },
- methods: {
- async loadServiceList() {
- try {
- const res = await listAllService();
- this.serviceList = res.data || [];
- this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
- } catch (err) {
- formatAppLog("error", "at pages/orders/logic.js:83", "获取服务类型失败:", err);
- }
- },
- async loadOrders() {
- var _a;
- try {
- const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
- const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
- const params = {
- status: statusMap[this.currentTab],
- content: this.searchContent || void 0,
- service: serviceId,
- startServiceTime: this.startServiceTime || void 0,
- endServiceTime: this.endServiceTime || void 0
- };
- formatAppLog("log", "at pages/orders/logic.js:97", "订单列表请求参数:", params);
- const res = await getMyOrders(params);
- formatAppLog("log", "at pages/orders/logic.js:99", "订单列表响应:", res);
- const orders = res.rows || [];
- formatAppLog("log", "at pages/orders/logic.js:101", "订单数量:", orders.length);
- this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
- } catch (err) {
- formatAppLog("error", "at pages/orders/logic.js:104", "获取订单列表失败:", err);
- this.allOrderList = [];
- }
- },
- transformOrder(order, tabIndex) {
- const service = this.serviceList.find((s) => s.id === order.service);
- const serviceText = (service == null ? void 0 : service.name) || "未知";
- const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
- const mode = (service == null ? void 0 : service.mode) || 0;
- const isRoundTrip = mode === 1;
- let statusText = "接单";
- if (tabIndex === 0) {
- statusText = "接单";
- } else if (tabIndex === 1) {
- statusText = isRoundTrip ? "出发" : "开始";
- } else if (tabIndex === 2) {
- statusText = "已完成";
- } else if (tabIndex === 3) {
- statusText = "已拒绝";
- }
- return {
- id: order.id,
- status: order.status,
- // 保存原始 status 用于判断权限
- type: isRoundTrip ? 1 : 2,
- typeText: serviceText,
- typeIcon: serviceIcon,
- statusText,
- price: (order.price / 100).toFixed(2),
- timeLabel: "服务时间",
- time: order.serviceTime || "",
- petAvatar: order.petAvatar || "/static/dog.png",
- petAvatarUrl: order.petAvatarUrl || "",
- petName: order.petName || "",
- petBreed: order.breed || "",
- startLocation: order.fromAddress || "",
- startAddress: order.fromAddress || "",
- startDistance: "0km",
- endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
- endAddress: order.toAddress || "",
- customerPhone: order.customerPhone || "",
- endDistance: "0km",
- serviceContent: order.remark || "",
- remark: order.remark || ""
- };
- },
- getDisplayStatus(item) {
- if (item.statusText === "已完成")
- return "已完成";
- if (item.statusText === "已拒绝")
- return "已拒绝";
- if (item.statusText === "接单") {
- return item.type === 1 ? "待接送" : "待服务";
- }
- return item.type === 1 ? "配送中" : "服务中";
- },
- getStatusClass(item) {
- let display = this.getDisplayStatus(item);
- if (display === "已完成")
- return "finish";
- if (display === "已拒绝")
- return "reject";
- if (display === "配送中" || display === "服务中")
- return "processing";
- return "highlight";
- },
- goToDetail(item) {
- uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
- },
- showPetProfile(item) {
- this.currentPetInfo = {
- ...item,
- petGender: "M",
- petAge: "2岁",
- petWeight: "15kg",
- petPersonality: "活泼亲人,精力旺盛",
- petHobby: "喜欢追飞盘,爱吃肉干",
- petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
- petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
- petLogs: [
- { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
- { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
- { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
- ]
- };
- this.showPetModal = true;
- },
- closePetProfile() {
- this.showPetModal = false;
- },
- openNavigation(item, pointType) {
- this.navTargetItem = item;
- this.navTargetPointType = pointType;
- this.showNavModal = true;
- },
- closeNavModal() {
- this.showNavModal = false;
- },
- chooseMap(mapType) {
- let item = this.navTargetItem;
- let pointType = this.navTargetPointType;
- let name = pointType === "start" ? item.startLocation : item.endLocation;
- let address = pointType === "start" ? item.startAddress : item.endAddress;
- this.showNavModal = false;
- uni.openLocation({
- latitude: 30.52,
- longitude: 114.31,
- name: name || "目的地",
- address: address || "默认地址",
- success: function() {
- formatAppLog("log", "at pages/orders/logic.js:210", "打开导航成功: " + mapType);
- }
- });
- },
- toggleCallMenu(item) {
- if (this.activeCallItem === item) {
- this.activeCallItem = null;
- } else {
- this.activeCallItem = item;
- }
- },
- closeCallMenu() {
- this.activeCallItem = null;
- },
- doCall(type, item) {
- let phoneNum = "";
- const targetItem = item || this.activeCallItem;
- if (type === "merchant") {
- phoneNum = "18900008451";
- } else if (type === "customer") {
- phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
- }
- if (phoneNum) {
- uni.makePhoneCall({ phoneNumber: phoneNum });
- }
- this.activeCallItem = null;
- },
- reportAbnormal(item) {
- uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
- },
- toggleDropdown(idx) {
- if (this.activeDropdown === idx) {
- this.activeDropdown = 0;
- } else {
- this.activeDropdown = idx;
- }
- },
- closeDropdown() {
- this.activeDropdown = 0;
- },
- selectType(index) {
- this.currentTypeFilterIdx = index;
- this.closeDropdown();
- },
- initCalendar() {
- let days = [];
- for (let i = 1; i <= 28; i++) {
- days.push(i);
- }
- this.calendarDays = days;
- this.selectedDateRange = [2, 4];
- },
- prevMonth() {
- uni.showToast({ title: "上个月", icon: "none" });
- },
- nextMonth() {
- uni.showToast({ title: "下个月", icon: "none" });
- },
- selectDateItem(day) {
- if (this.selectedDateRange.length === 2) {
- this.selectedDateRange = [day];
- } else if (this.selectedDateRange.length === 1) {
- let start = this.selectedDateRange[0];
- if (day > start) {
- this.selectedDateRange = [start, day];
- } else if (day < start) {
- this.selectedDateRange = [day, start];
- } else {
- this.selectedDateRange = [];
- }
- } else {
- this.selectedDateRange = [day];
- }
- },
- getDateClass(day) {
- if (this.selectedDateRange.length === 0)
- return "";
- if (this.selectedDateRange.length === 1) {
- return day === this.selectedDateRange[0] ? "is-start" : "";
- }
- let start = this.selectedDateRange[0];
- let end = this.selectedDateRange[1];
- if (day === start)
- return "is-start";
- if (day === end)
- return "is-end";
- if (day > start && day < end)
- return "is-between";
- return "";
- },
- resetTimeFilter() {
- this.hasTimeFilter = false;
- this.selectedDateRange = [];
- this.startServiceTime = "";
- this.endServiceTime = "";
- this.closeDropdown();
- this.loadOrders();
- },
- confirmTimeFilter() {
- if (this.selectedDateRange.length === 0) {
- uni.showToast({ title: "请先选择日期", icon: "none" });
- return;
- }
- const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
- const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
- const pad = (n) => String(n).padStart(2, "0");
- if (this.selectedDateRange.length === 2) {
- this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
- this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
- } else {
- this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
- this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
- }
- this.hasTimeFilter = true;
- this.closeDropdown();
- this.loadOrders();
- },
- getMainActionText(item) {
- return "查看详情";
- },
- mainAction(item) {
- uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
- },
- openRemarkInput() {
- this.remarkText = "";
- this.showRemarkInput = true;
- },
- closeRemarkInput() {
- this.showRemarkInput = false;
- this.remarkText = "";
- },
- submitRemark() {
- const text = this.remarkText.trim();
- if (!text) {
- uni.showToast({ title: "备注内容不能为空", icon: "none" });
- return;
- }
- const now = /* @__PURE__ */ new Date();
- 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")}`;
- if (!this.currentPetInfo.petLogs) {
- this.$set(this.currentPetInfo, "petLogs", []);
- }
- this.currentPetInfo.petLogs.unshift({
- date: dateStr,
- content: text,
- recorder: "我"
- });
- uni.showToast({ title: "备注已添加", icon: "success" });
- this.closeRemarkInput();
- },
- /**
- * 取消订单处理逻辑
- * @param {Object} item - 订单项
- */
- handleCancelOrder(item) {
- uni.showModal({
- title: "提示",
- content: "确认是否取消这个订单?",
- success: async (res) => {
- if (res.confirm) {
- try {
- uni.showLoading({ title: "取消中...", mask: true });
- await cancelOrderApi({ orderId: item.id });
- uni.showToast({ title: "订单已取消", icon: "success" });
- setTimeout(() => {
- this.loadOrders();
- }, 1500);
- } catch (err) {
- formatAppLog("error", "at pages/orders/logic.js:372", "取消订单失败:", err);
- uni.showToast({ title: "取消失败", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- }
- }
- });
- }
- }
- };
- const _sfc_main$r = {
- ...logic$2
- };
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- vue.createElementVNode("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "sticky-header" }, [
- vue.createElementVNode("view", { class: "status-tabs" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.tabs, (tab, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
- key: index,
- onClick: ($event) => _ctx.currentTab = index
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(tab),
- 1
- /* TEXT */
- ),
- _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "indicator"
- })) : vue.createCommentVNode("v-if", true)
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "search-bar" }, [
- vue.createElementVNode("view", { class: "search-input-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "search-input",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
- placeholder: "搜索地址/电话/姓名",
- "placeholder-class": "ph-style"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.searchContent]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "filter-wrapper" }, [
- vue.createElementVNode("view", { class: "filter-bar" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
- },
- [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
- },
- vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
- },
- null,
- 2
- /* CLASS */
- )
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
- },
- [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
- },
- "服务时间",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
- },
- null,
- 2
- /* CLASS */
- )
- ],
- 2
- /* CLASS */
- )
- ]),
- _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "dropdown-mask",
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
- })) : vue.createCommentVNode("v-if", true),
- _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "dropdown-panel"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.typeFilterOptions, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
- key: index,
- onClick: ($event) => _ctx.selectType(index)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "dropdown-panel calendar-panel"
- }, [
- vue.createElementVNode("view", { class: "custom-calendar-container" }, [
- vue.createElementVNode("view", { class: "cal-header" }, [
- vue.createElementVNode("text", {
- class: "cal-nav-btn",
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
- }, "‹"),
- vue.createElementVNode(
- "text",
- { class: "cal-title" },
- vue.toDisplayString(_ctx.currentMonth),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", {
- class: "cal-nav-btn",
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
- }, "›")
- ]),
- vue.createElementVNode("view", { class: "cal-weekdays" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.weekDays, (wk, idx) => {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: idx,
- class: "wk-item"
- },
- vue.toDisplayString(wk),
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "cal-body" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.calendarDays, (day, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: idx,
- class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
- onClick: ($event) => _ctx.selectDateItem(day)
- }, [
- vue.createElementVNode(
- "view",
- { class: "cal-day-text" },
- vue.toDisplayString(day),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "calendar-actions" }, [
- vue.createElementVNode("button", {
- class: "cal-btn reset",
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
- }, "重置"),
- vue.createElementVNode("button", {
- class: "cal-btn confirm",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
- }, "确定")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.orderList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-card",
- key: index,
- onClick: ($event) => _ctx.goToDetail(item)
- }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("view", { class: "type-badge" }, [
- vue.createElementVNode("image", {
- class: "type-icon",
- src: item.typeIcon
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "text",
- { class: "type-text" },
- vue.toDisplayString(item.typeText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
- },
- vue.toDisplayString(_ctx.getDisplayStatus(item)),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("view", { class: "time-row" }, [
- vue.createElementVNode("view", { class: "time-col" }, [
- vue.createElementVNode(
- "text",
- { class: "label" },
- vue.toDisplayString(item.timeLabel) + ":",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "price" },
- "¥" + vue.toDisplayString(item.price),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pet-card" }, [
- vue.createElementVNode("image", {
- class: "pet-avatar",
- src: item.petAvatarUrl || item.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pet-info" }, [
- vue.createElementVNode(
- "text",
- { class: "pet-name" },
- vue.toDisplayString(item.petName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pet-breed" },
- "品种: " + vue.toDisplayString(item.petBreed),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "route-info" }, [
- item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
- vue.createElementVNode("view", { class: "route-line-vertical" }),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.startLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.startAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"]),
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createElementVNode("view", {
- class: "route-item",
- onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(item.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(item.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2,
- style: { "flex-shrink": "0", "align-self": "center" }
- })
- ], 8, ["onClick"]),
- item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "service-content"
- }, [
- vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.serviceContent),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ]),
- item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "remark-box"
- }, [
- vue.createElementVNode(
- "text",
- null,
- "备注:" + vue.toDisplayString(item.remark),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "action-btns"
- }, [
- vue.createElementVNode("view", { class: "action-left" }, [
- vue.createElementVNode("button", {
- class: "btn normal",
- onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
- }, "拨号", 8, ["onClick"])
- ]),
- vue.createElementVNode("view", { class: "action-right" }, [
- item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 0,
- class: "btn normal danger",
- onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
- }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("button", {
- class: "btn normal",
- onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
- }, "异常上报", 8, ["onClick"]),
- vue.createElementVNode("button", {
- class: "btn primary",
- onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
- }, "打卡", 8, ["onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
- vue.createElementVNode("view", { style: { "height": "160rpx" } })
- ]),
- _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "call-mask",
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
- })) : vue.createCommentVNode("v-if", true)
- ]),
- _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pet-modal-mask",
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, [
- vue.createElementVNode("view", {
- class: "pet-modal-content",
- onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "pet-modal-header" }, [
- vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
- vue.createElementVNode("view", { class: "pm-header-actions" }, [
- vue.createElementVNode("view", {
- class: "pm-remark-btn",
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
- }, "备注"),
- vue.createElementVNode("view", {
- class: "close-icon-btn",
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, "×")
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "pet-modal-scroll"
- }, [
- vue.createElementVNode("view", { class: "pet-base-info" }, [
- vue.createElementVNode("image", {
- class: "pm-avatar",
- src: _ctx.currentPetInfo.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pm-info-text" }, [
- vue.createElementVNode("view", { class: "pm-name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "pm-name" },
- vue.toDisplayString(_ctx.currentPetInfo.petName),
- 1
- /* TEXT */
- ),
- _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-gender"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
- vue.createElementVNode("text", null, "公")
- ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "pm-gender female"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
- vue.createElementVNode("text", null, "母")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "text",
- { class: "pm-breed" },
- "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "pm-detail-grid" }, [
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "体重"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "性格"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "备注"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
- 1
- /* TEXT */
- )
- ])
- ]),
- _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-tags"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "pm-tag",
- key: index
- },
- vue.toDisplayString(tag),
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "pm-section-title" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", null, "备注日志")
- ]),
- vue.createElementVNode("view", { class: "pm-log-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "pm-log-item",
- key: lIndex
- }, [
- vue.createElementVNode(
- "text",
- { class: "pm-log-date" },
- vue.toDisplayString(log.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pm-log-text" },
- vue.toDisplayString(log.content),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pm-log-recorder" },
- vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { style: { "height": "30rpx" } })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "remark-mask",
- onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
- }, [
- vue.createElementVNode("view", {
- class: "remark-sheet",
- onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "remark-sheet-header" }, [
- vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
- vue.createElementVNode("view", {
- class: "close-icon-btn",
- onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
- }, "×")
- ]),
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "remark-textarea",
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
- placeholder: "请输入备注内容...",
- maxlength: "500",
- "auto-height": ""
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.remarkText]
- ]),
- vue.createElementVNode("view", {
- class: "remark-submit-btn",
- onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
- }, "提交备注")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "nav-modal-mask",
- onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "nav-action-sheet",
- onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
- }, "高德地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
- }, "腾讯地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
- }, "百度地图"),
- vue.createElementVNode("view", { class: "nav-sheet-gap" }),
- vue.createElementVNode("view", {
- class: "nav-sheet-item cancel",
- onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, "取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
- function getDictDataByType(dictType) {
- return request({
- url: `/system/dict/data/type/${dictType}`,
- method: "GET"
- });
- }
- function getPetDetail(id) {
- return request({
- url: `/archieves/pet/${id}`,
- method: "GET"
- });
- }
- function submitPetRemark(data) {
- return request({
- url: "/archieves/pet/remark",
- method: "POST",
- data
- });
- }
- function listChangeLog(params) {
- return request({
- url: "/archieves/changeLog/listAll",
- method: "GET",
- data: params
- });
- }
- const logic$1 = {
- data() {
- return {
- orderId: null,
- pageLoading: true,
- // 页面数据加载中
- orderType: 1,
- orderStatus: 2,
- serviceId: null,
- // 当前订单的服务类型ID
- serviceMode: null,
- // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
- petId: null,
- // 当前订单关联的宠物ID
- petDetail: null,
- // 宠物档案详情
- // 从后端 clockInRemark 解析出的打卡步骤列表
- // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
- clockInSteps: [],
- // 当前应执行的打卡信息(从 clockInSteps 中取出)
- currentClockIn: null,
- currentStep: 0,
- orderDetail: {
- type: 1,
- price: "0.00",
- timeLabel: "服务时间",
- time: "",
- petAvatar: "/static/dog.png",
- petName: "",
- petBreed: "",
- serviceTag: "",
- startLocation: "",
- startAddress: "",
- endAddress: "",
- customerPhone: "",
- serviceContent: "",
- remark: "",
- orderNo: "",
- createTime: "",
- serviceName: "",
- // 服务类型名称
- progressLogs: [],
- nursingSummary: ""
- // 宠护小结
- },
- serviceList: [],
- showPetModal: false,
- currentPetInfo: {},
- showNavModal: false,
- navTargetPointType: "",
- showUploadModal: false,
- modalMediaList: [],
- modalRemark: "",
- showSumModal: false,
- sumContent: "",
- sumDate: "",
- sumSigner: "未知",
- showPetRemarkInput: false,
- petRemarkText: "",
- showAnomalyModal: false,
- anomalyList: [],
- anomalyTypeDict: [],
- // 媒体预览相关
- videoPlayerShow: false,
- videoPlayerUrl: ""
- };
- },
- computed: {
- // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
- steps() {
- if (this.clockInSteps.length > 0) {
- return this.clockInSteps.map((s) => s.title);
- }
- return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
- },
- // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
- progressSteps() {
- return ["已接单", ...this.steps, "订单完成"];
- },
- // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
- progressIndex() {
- return this.currentStep + 1;
- },
- displayStatusText() {
- if (this.currentStep >= this.steps.length)
- return "已完成";
- if (this.currentStep > 0) {
- return this.orderType === 1 ? "配送中" : "服务中";
- }
- return this.orderType === 1 ? "待接送" : "待服务";
- },
- currentStatusText() {
- return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
- },
- // 按钮文本:使用 clockInSteps 中对应步骤的 title
- currentTaskTitle() {
- if (this.currentStep >= this.steps.length)
- return "订单已完成";
- if (this.currentClockIn) {
- return this.currentClockIn.title;
- }
- return this.steps[this.currentStep] || "打卡";
- },
- // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
- currentTaskDesc() {
- if (this.currentStep >= this.steps.length)
- return "感谢您的服务,请注意休息";
- if (this.currentClockIn && this.currentClockIn.remark) {
- return this.currentClockIn.remark;
- }
- return "请按要求提交照片或视频及备注";
- }
- },
- async onLoad(options) {
- if (options.id) {
- this.orderId = options.id;
- }
- this.pageLoading = true;
- try {
- await this.loadAnomalyTypeDict();
- await this.loadServiceList();
- await this.loadOrderDetail();
- } finally {
- this.pageLoading = false;
- }
- },
- methods: {
- async loadServiceList() {
- try {
- const res = await listAllService();
- this.serviceList = res.data || [];
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:152", "获取服务类型失败:", err);
- }
- },
- /**
- * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
- */
- /**
- * 基于已加载的 serviceList 进行前端匹配,解析 clockInRemark 为打卡步骤
- */
- loadServiceDetail(serviceId) {
- formatAppLog("log", "at pages/orders/detail-logic.js:162", "前端匹配服务详情, ID:", serviceId);
- const serviceInfo = (this.serviceList || []).find((s) => s.id === serviceId);
- formatAppLog("log", "at pages/orders/detail-logic.js:164", "匹配到的服务信息:", serviceInfo);
- if (serviceInfo) {
- this.serviceMode = serviceInfo.mode;
- this.orderDetail.serviceName = serviceInfo.name;
- formatAppLog("log", "at pages/orders/detail-logic.js:168", "当前服务模式(mode):", this.serviceMode);
- if (serviceInfo.clockInRemark) {
- try {
- const parsed = JSON.parse(serviceInfo.clockInRemark);
- if (Array.isArray(parsed) && parsed.length > 0) {
- this.clockInSteps = parsed;
- formatAppLog("log", "at pages/orders/detail-logic.js:174", "解析打卡步骤:", this.clockInSteps);
- }
- } catch (parseErr) {
- formatAppLog("error", "at pages/orders/detail-logic.js:177", "解析 clockInRemark 失败:", parseErr);
- }
- }
- }
- },
- async loadOrderDetail() {
- if (!this.orderId) {
- formatAppLog("log", "at pages/orders/detail-logic.js:184", "订单ID缺失");
- uni.showToast({ title: "订单ID缺失", icon: "none" });
- return;
- }
- try {
- formatAppLog("log", "at pages/orders/detail-logic.js:189", "请求订单详情,ID:", this.orderId);
- const res = await getOrderInfo(this.orderId);
- formatAppLog("log", "at pages/orders/detail-logic.js:191", "订单详情响应:", res);
- const order = res.data;
- if (!order) {
- formatAppLog("log", "at pages/orders/detail-logic.js:194", "订单数据为空");
- uni.showToast({ title: "订单不存在", icon: "none" });
- return;
- }
- formatAppLog("log", "at pages/orders/detail-logic.js:198", "订单数据:", order);
- this.serviceId = order.service;
- this.petId = order.usrPet || null;
- this.transformOrderData(order);
- formatAppLog("log", "at pages/orders/detail-logic.js:202", "解析出的 serviceId:", this.serviceId);
- if (this.serviceId) {
- this.loadServiceDetail(this.serviceId);
- } else {
- formatAppLog("warn", "at pages/orders/detail-logic.js:208", "订单中未找到 service 字段,无法加载服务步骤");
- }
- if (this.petId) {
- await this.loadPetDetail(this.petId);
- }
- await this.loadOrderLogs();
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:219", "获取订单详情失败:", err);
- uni.showToast({ title: "加载失败", icon: "none" });
- }
- },
- async loadOrderLogs() {
- try {
- const res = await getOrderLogs(this.orderId);
- const logs = res.data || [];
- formatAppLog("log", "at pages/orders/detail-logic.js:227", "订单日志:", logs);
- const progressLogs = logs.filter((log) => log.logType === 1);
- this.orderDetail.progressLogs = progressLogs.map((log) => ({
- status: log.title || "",
- time: log.createTime || "",
- medias: log.photoUrls || [],
- remark: log.content || ""
- }));
- 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());
- if (validLogs.length > 0) {
- const latestLog = validLogs[0];
- const latestStep = latestLog.step;
- formatAppLog("log", "at pages/orders/detail-logic.js:246", "最新打卡日志 step:", latestStep);
- const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
- if (stepIndex >= 0) {
- this.currentStep = stepIndex + 1;
- } else {
- this.currentStep = Number(latestStep);
- }
- } else {
- this.currentStep = 0;
- }
- this.updateCurrentClockIn();
- formatAppLog("log", "at pages/orders/detail-logic.js:262", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:264", "获取订单日志失败:", err);
- }
- },
- /**
- * 根据 currentStep 更新当前打卡信息
- */
- updateCurrentClockIn() {
- if (this.currentStep < this.clockInSteps.length) {
- this.currentClockIn = this.clockInSteps[this.currentStep];
- } else {
- this.currentClockIn = null;
- }
- },
- transformOrderData(order) {
- const mode = order.mode || 0;
- const isRoundTrip = mode === 1;
- this.orderType = isRoundTrip ? 1 : 2;
- this.orderStatus = order.status || 2;
- this.orderDetail = {
- type: this.orderType,
- price: (order.price / 100).toFixed(2),
- timeLabel: isRoundTrip ? "取货时间" : "服务时间",
- time: order.serviceTime || "",
- petAvatar: "/static/dog.png",
- petName: order.petName || order.contact || "",
- petBreed: order.breed || "",
- serviceTag: order.groupPurchasePackageName || "",
- startLocation: order.fromAddress || "",
- startAddress: order.fromAddress || "",
- endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
- endAddress: order.toAddress || "",
- customerPhone: order.contactPhoneNumber || "",
- ownerName: order.contact || "",
- // 宠主姓名(默认使用客户姓名)
- serviceContent: "",
- remark: "",
- orderNo: order.code || "T" + order.id,
- createTime: order.serviceTime || "",
- nursingSummary: order.nursingSummary || "",
- fulfillerName: order.fulfillerName || "",
- // 履约者/护宠师姓名
- progressLogs: [
- { status: "您已接单", time: order.serviceTime || "" }
- ]
- };
- if (this.orderDetail.fulfillerName) {
- this.sumSigner = this.orderDetail.fulfillerName;
- }
- },
- /**
- * 根据宠物ID获取宠物档案详情
- */
- async loadPetDetail(petId) {
- try {
- const res = await getPetDetail(petId);
- const pet = res.data;
- if (pet) {
- this.petDetail = pet;
- this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
- this.orderDetail.petName = pet.name || this.orderDetail.petName;
- this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
- this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
- formatAppLog("log", "at pages/orders/detail-logic.js:329", "宠物档案:", pet);
- }
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:332", "获取宠物档案失败:", err);
- }
- },
- /**
- * 加载异常记录列表
- */
- async loadAnomalyList() {
- if (!this.orderId)
- return;
- try {
- const res = await getAnomalyList(this.orderId);
- const list = res.data || [];
- this.anomalyList = list.map((item) => {
- const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
- return {
- ...item,
- typeLabel: dict ? dict.label : item.type,
- // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
- photoUrls: item.photoUrls || []
- };
- });
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:355", "获取异常列表失败:", err);
- }
- },
- async loadAnomalyTypeDict() {
- try {
- const res = await getDictDataByType("flf_anamaly_type");
- this.anomalyTypeDict = res.data.map((item) => ({
- label: item.dictLabel,
- value: item.dictValue
- }));
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:366", "获取异常字典失败:", err);
- }
- },
- openAnomalyModal() {
- this.showAnomalyModal = true;
- this.loadAnomalyList();
- },
- closeAnomalyModal() {
- this.showAnomalyModal = false;
- },
- getAnomalyStatusLabel(status) {
- const map = {
- 0: "待审核",
- 1: "已通过",
- 2: "已驳回"
- };
- return map[status] || "未知";
- },
- updateStepByStatus() {
- if (this.orderStatus === 2) {
- this.currentStep = 0;
- } else if (this.orderStatus === 3) {
- this.currentStep = 1;
- } else if (this.orderStatus === 4) {
- this.currentStep = this.steps.length - 1;
- } else {
- this.currentStep = 0;
- }
- },
- showPetProfile() {
- const pet = this.petDetail;
- if (pet) {
- this.currentPetInfo = {
- petAvatar: pet.avatarUrl || "/static/dog.png",
- petName: pet.name || "",
- petBreed: pet.breed || "",
- petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
- petAge: pet.age ? pet.age + "岁" : "未知",
- petWeight: pet.weight ? pet.weight + "kg" : "未知",
- petPersonality: pet.personality || pet.cutePersonality || "无",
- petHobby: "",
- petRemark: pet.remark || "无",
- petTags: (pet.tags || []).map((t) => t.name),
- petLogs: [],
- // 额外信息
- petSize: pet.size || "",
- petIsSterilized: pet.isSterilized,
- petHealthStatus: pet.healthStatus || "",
- petAllergies: pet.allergies || "",
- petMedicalHistory: pet.medicalHistory || "",
- petVaccineStatus: pet.vaccineStatus || "",
- ownerName: pet.ownerName || "",
- ownerPhone: pet.ownerPhone || ""
- };
- this.loadPetChangeLogs(pet.id);
- } else {
- this.currentPetInfo = {
- ...this.orderDetail,
- petGender: "",
- petAge: "未知",
- petWeight: "未知",
- petPersonality: "无",
- petHobby: "",
- petRemark: "无",
- petTags: [],
- petLogs: []
- };
- }
- this.showPetModal = true;
- },
- async loadPetChangeLogs(petId) {
- if (!petId)
- return;
- try {
- const res = await listChangeLog({
- targetId: petId,
- targetType: "pet"
- });
- const logs = res.data || [];
- this.currentPetInfo.petLogs = logs.map((item) => ({
- date: item.createTime || "",
- content: item.content || "",
- recorder: item.operatorName || "未知"
- }));
- } catch (err) {
- formatAppLog("error", "at pages/orders/detail-logic.js:453", "获取宠物备注列表失败:", err);
- }
- },
- closePetProfile() {
- this.showPetModal = false;
- },
- openPetRemarkInput() {
- this.petRemarkText = "";
- this.showPetRemarkInput = true;
- },
- closePetRemarkInput() {
- this.showPetRemarkInput = false;
- },
- async submitPetRemark() {
- if (!this.petRemarkText.trim()) {
- uni.showToast({ title: "备注内容不能为空", icon: "none" });
- return;
- }
- if (!this.petId) {
- uni.showToast({ title: "宠物信息缺失", icon: "none" });
- return;
- }
- uni.showLoading({ title: "提交中...", mask: true });
- try {
- await submitPetRemark({
- petId: this.petId,
- content: this.petRemarkText
- });
- uni.hideLoading();
- uni.showToast({ title: "备注已添加", icon: "success" });
- this.closePetRemarkInput();
- this.loadPetChangeLogs(this.petId);
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/detail-logic.js:491", "提交宠物备注失败:", err);
- }
- },
- goToAnomaly() {
- uni.navigateTo({
- url: "/pages/orders/anomaly?orderId=" + (this.orderId || "")
- });
- },
- callPhone() {
- const phoneNum = this.orderDetail.customerPhone || "18900008451";
- uni.makePhoneCall({ phoneNumber: phoneNum });
- },
- openNavigation(type) {
- this.navTargetPointType = type;
- this.showNavModal = true;
- },
- closeNavModal() {
- this.showNavModal = false;
- },
- chooseMap(mapType) {
- let pointType = this.navTargetPointType;
- let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
- let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
- this.showNavModal = false;
- uni.openLocation({
- latitude: 30.52,
- // Mock lat
- longitude: 114.31,
- // Mock lng
- name: name || "目的地",
- address: address || "默认地址",
- success: function() {
- formatAppLog("log", "at pages/orders/detail-logic.js:524", "打开导航成功: " + mapType);
- }
- });
- },
- openUploadModal() {
- this.modalMediaList = [];
- this.modalRemark = "";
- this.showUploadModal = true;
- },
- closeUploadModal() {
- this.showUploadModal = false;
- },
- handleConfirmUpload() {
- formatAppLog("log", "at pages/orders/detail-logic.js:537", "handleConfirmUpload被调用");
- this.confirmUploadModal();
- },
- async chooseModalMedia() {
- formatAppLog("log", "at pages/orders/detail-logic.js:541", "chooseModalMedia被调用");
- uni.chooseMedia({
- count: 5 - this.modalMediaList.length,
- mediaType: ["image", "video"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- formatAppLog("log", "at pages/orders/detail-logic.js:548", "选择媒体文件成功:", res.tempFiles);
- uni.showLoading({ title: "上传中...", mask: true });
- try {
- for (const file of res.tempFiles) {
- const filePath = file.tempFilePath;
- const fileType = file.fileType;
- formatAppLog("log", "at pages/orders/detail-logic.js:554", "开始上传文件:", filePath, "类型:", fileType);
- const uploadRes = await uploadFile(filePath);
- formatAppLog("log", "at pages/orders/detail-logic.js:557", "服务器响应:", uploadRes);
- if (uploadRes.code === 200) {
- this.modalMediaList.push({
- url: uploadRes.data.url,
- ossId: uploadRes.data.ossId,
- localPath: filePath,
- mediaType: fileType,
- thumb: file.thumbTempFilePath
- // 视频缩略图(如果有)
- });
- formatAppLog("log", "at pages/orders/detail-logic.js:567", "媒体文件添加成功");
- }
- }
- uni.hideLoading();
- uni.showToast({ title: "上传成功", icon: "success" });
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/detail-logic.js:574", "上传失败详情:", err);
- uni.showToast({ title: "上传失败", icon: "none" });
- }
- },
- fail: (err) => {
- formatAppLog("error", "at pages/orders/detail-logic.js:579", "选择媒体文件失败:", err);
- }
- });
- },
- removeModalMedia(index) {
- this.modalMediaList.splice(index, 1);
- },
- getCurrentTime() {
- const now = /* @__PURE__ */ new Date();
- const y = now.getFullYear();
- const m = String(now.getMonth() + 1).padStart(2, "0");
- const d = String(now.getDate()).padStart(2, "0");
- const h = String(now.getHours()).padStart(2, "0");
- const min = String(now.getMinutes()).padStart(2, "0");
- return `${y}/${m}/${d} ${h}:${min}`;
- },
- async confirmUploadModal() {
- formatAppLog("log", "at pages/orders/detail-logic.js:597", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
- if (this.modalMediaList.length === 0) {
- uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
- return;
- }
- try {
- uni.showLoading({ title: "提交中..." });
- const uploadedMedias = this.modalMediaList.map((item) => item.url);
- const ossIds = this.modalMediaList.map((item) => item.ossId);
- formatAppLog("log", "at pages/orders/detail-logic.js:608", "准备打卡,ossIds:", ossIds);
- const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
- const clockInData = {
- orderId: this.orderId,
- photos: ossIds,
- content: this.modalRemark || "",
- step: clockInType,
- title: this.currentTaskTitle,
- startFlag: Number(clockInType) === 1,
- endFlag: Number(this.currentStep) === this.steps.length - 1
- };
- formatAppLog("log", "at pages/orders/detail-logic.js:623", "打卡数据:", clockInData);
- await clockIn(clockInData);
- uni.hideLoading();
- this.closeUploadModal();
- uni.showToast({ title: "打卡成功", icon: "success" });
- await this.loadOrderDetail();
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/detail-logic.js:633", "打卡失败:", err);
- uni.showToast({ title: "打卡失败,请重试", icon: "none" });
- }
- },
- copyOrderNo() {
- uni.setClipboardData({
- data: this.orderDetail.orderNo,
- success: () => {
- uni.showToast({ title: "复制成功", icon: "none" });
- }
- });
- },
- openSumModal() {
- let displayDate = "";
- if (this.orderDetail.time) {
- displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
- } else {
- const now = /* @__PURE__ */ new Date();
- const y = now.getFullYear();
- const m = String(now.getMonth() + 1).padStart(2, "0");
- const d = String(now.getDate()).padStart(2, "0");
- displayDate = `${y}/${m}/${d}`;
- }
- this.sumDate = displayDate;
- if (this.orderDetail.nursingSummary) {
- this.sumContent = this.orderDetail.nursingSummary;
- } else if (!this.sumContent) {
- this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
- }
- this.showSumModal = true;
- },
- closeSumModal() {
- this.showSumModal = false;
- },
- async submitSumModal() {
- if (!this.sumContent.trim()) {
- uni.showToast({ title: "请填写服务内容", icon: "none" });
- return;
- }
- uni.showLoading({ title: "提交中...", mask: true });
- try {
- const res = await submitNursingSummary({
- orderId: this.orderId,
- content: this.sumContent
- });
- uni.hideLoading();
- if (res.code === 200) {
- uni.showToast({ title: "小结已提交", icon: "success" });
- this.closeSumModal();
- await this.loadOrderDetail();
- } else {
- uni.showToast({ title: res.msg || "提交失败", icon: "none" });
- }
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/detail-logic.js:701", "提交宠护小结失败:", err);
- uni.showToast({ title: "提交失败,请重试", icon: "none" });
- }
- },
- /**
- * 检查是否为视频
- */
- isVideo(url) {
- if (!url)
- return false;
- const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
- const lowerUrl = url.toLowerCase();
- return videoExts.some((ext) => lowerUrl.includes(ext));
- },
- /**
- * 获取视频封面图 (第一帧)
- * 兼容阿里云、腾讯云等主流 OSS
- */
- getVideoPoster(url) {
- if (!this.isVideo(url))
- return url;
- if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
- return url;
- }
- const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
- const tencent = `?ci-process=snapshot&time=1`;
- if (url.includes("myqcloud.com")) {
- return url + tencent;
- }
- return url + aliyun;
- },
- /**
- * 统一预览媒体
- */
- previewMedia(medias, currentIdx) {
- const url = medias[currentIdx];
- if (this.isVideo(url)) {
- this.videoPlayerUrl = url;
- this.videoPlayerShow = true;
- } else {
- const imageUrls = medias.filter((m) => !this.isVideo(m));
- const currentImgUrl = url;
- const newIdx = imageUrls.indexOf(currentImgUrl);
- uni.previewImage({
- current: newIdx >= 0 ? newIdx : 0,
- urls: imageUrls
- });
- }
- },
- closeVideoPlayer() {
- this.videoPlayerShow = false;
- this.videoPlayerUrl = "";
- }
- }
- };
- const _imports_13 = "/static/icons/phone_orange.svg";
- const _imports_1$7 = "/static/icons/clock.svg";
- const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
- const _imports_4$1 = "/static/icons/file.svg";
- const _imports_1$6 = "/static/icons/camera_grey.svg";
- const _imports_6$1 = "/static/icons/order_no.svg";
- const _imports_7 = "/static/icons/play_circle.svg";
- const _imports_8$1 = "/static/empty-rest.png";
- const _sfc_main$q = {
- ...logic$1
- };
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
- _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "loading-container"
- }, [
- vue.createElementVNode("view", { class: "skeleton-header" }, [
- vue.createElementVNode("view", {
- class: "skeleton-line skeleton-ani",
- style: { "width": "30%", "height": "36rpx" }
- }),
- vue.createElementVNode("view", {
- class: "skeleton-line skeleton-ani",
- style: { "width": "20%", "height": "36rpx" }
- })
- ]),
- vue.createElementVNode("view", { class: "skeleton-progress" }, [
- (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(4, (i) => {
- return vue.createElementVNode("view", {
- class: "skeleton-circle skeleton-ani",
- key: i
- });
- }),
- 64
- /* STABLE_FRAGMENT */
- ))
- ]),
- (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(3, (j) => {
- return vue.createElementVNode("view", {
- class: "skeleton-card",
- key: "c" + j
- }, [
- vue.createElementVNode("view", {
- class: "skeleton-line skeleton-ani",
- style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
- }),
- vue.createElementVNode("view", {
- class: "skeleton-line skeleton-ani",
- style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
- }),
- vue.createElementVNode("view", {
- class: "skeleton-line skeleton-ani",
- style: { "width": "75%", "height": "24rpx" }
- })
- ]);
- }),
- 64
- /* STABLE_FRAGMENT */
- ))
- ])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createElementVNode("view", { class: "detail-header" }, [
- vue.createElementVNode("view", { class: "status-row" }, [
- vue.createElementVNode(
- "text",
- { class: "status-title" },
- vue.toDisplayString(_ctx.displayStatusText),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "status-price" },
- "¥" + vue.toDisplayString(_ctx.orderDetail.price),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "progress-bar" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.progressSteps, (step, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
- key: index
- },
- [
- vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
- index !== 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
- },
- null,
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- { class: "step-circle" },
- vue.toDisplayString(index + 1),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "step-text" },
- vue.toDisplayString(step),
- 1
- /* TEXT */
- )
- ],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "detail-content"
- }, [
- vue.createElementVNode("view", { class: "white-card pet-bar" }, [
- vue.createElementVNode("image", {
- class: "pb-avatar",
- src: _ctx.orderDetail.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pb-info" }, [
- vue.createElementVNode("view", { class: "pb-name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "pb-name" },
- vue.toDisplayString(_ctx.orderDetail.petName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pb-tags" }, [
- vue.createElementVNode(
- "text",
- { class: "pb-tag" },
- vue.toDisplayString(_ctx.orderDetail.serviceName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "pb-actions" }, [
- vue.createElementVNode("view", {
- class: "pb-btn profile-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
- }, "宠物档案"),
- vue.createElementVNode("view", {
- class: "pb-btn phone-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
- }, [
- vue.createElementVNode("image", {
- class: "phone-icon",
- src: _imports_13
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "white-card service-info-card" }, [
- vue.createElementVNode("view", { class: "si-row time-row" }, [
- vue.createElementVNode("image", {
- class: "si-icon outline",
- src: _imports_1$7
- }),
- vue.createElementVNode("view", { class: "si-content" }, [
- vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
- vue.createElementVNode(
- "text",
- { class: "si-val" },
- vue.toDisplayString(_ctx.orderDetail.time),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "si-action record-btn",
- onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
- }, [
- vue.createElementVNode("text", null, "异常记录"),
- vue.createElementVNode("image", {
- class: "record-arrow",
- src: _imports_0$2
- })
- ])
- ]),
- _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
- vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
- vue.createElementVNode("view", { class: "route-line-vertical" }),
- vue.createElementVNode("view", { class: "si-content" }, [
- vue.createElementVNode(
- "text",
- { class: "si-addr-title" },
- vue.toDisplayString(_ctx.orderDetail.startLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "si-addr-desc" },
- vue.toDisplayString(_ctx.orderDetail.startAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "nav-btn-circle",
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
- }, [
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
- vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
- vue.createElementVNode("view", { class: "si-content" }, [
- vue.createElementVNode(
- "text",
- { class: "si-addr-title" },
- vue.toDisplayString(_ctx.orderDetail.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "si-addr-desc" },
- vue.toDisplayString(_ctx.orderDetail.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "nav-btn-circle",
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
- }, [
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2
- })
- ])
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "si-row addr-row end-addr"
- }, [
- vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
- vue.createElementVNode("view", { class: "si-content" }, [
- vue.createElementVNode(
- "text",
- { class: "si-addr-title" },
- vue.toDisplayString(_ctx.orderDetail.endLocation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "si-addr-desc" },
- vue.toDisplayString(_ctx.orderDetail.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "nav-btn-circle",
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
- }, [
- vue.createElementVNode("image", {
- class: "nav-arrow",
- src: _imports_3$2
- })
- ])
- ])),
- vue.createElementVNode("view", { class: "si-row" }, [
- vue.createElementVNode("image", {
- class: "si-icon outline custom-icon-file",
- src: _imports_4$1
- }),
- vue.createElementVNode("view", { class: "si-content" }, [
- vue.createElementVNode("text", { class: "si-label" }, "备注"),
- vue.createElementVNode(
- "text",
- { class: "si-val" },
- vue.toDisplayString(_ctx.orderDetail.remark || "无"),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "white-card task-card"
- }, [
- vue.createElementVNode(
- "text",
- { class: "tc-title" },
- "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "tc-desc" },
- vue.toDisplayString(_ctx.currentTaskDesc),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "full-media-add",
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
- }, [
- vue.createElementVNode("image", {
- class: "upload-icon-large",
- src: _imports_1$6
- }),
- vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "white-card base-info-card" }, [
- vue.createElementVNode("view", { class: "bi-row" }, [
- vue.createElementVNode("image", {
- class: "si-icon outline",
- src: _imports_6$1
- }),
- vue.createElementVNode("view", { class: "bi-content" }, [
- vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
- vue.createElementVNode("view", { class: "bi-val-row" }, [
- vue.createElementVNode(
- "text",
- { class: "bi-val" },
- vue.toDisplayString(_ctx.orderDetail.orderNo),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", {
- class: "bi-copy",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
- }, "复制")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "bi-row" }, [
- vue.createElementVNode("image", {
- class: "si-icon outline",
- src: _imports_1$7
- }),
- vue.createElementVNode("view", { class: "bi-content" }, [
- vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "bi-val" },
- vue.toDisplayString(_ctx.orderDetail.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "white-card timeline-card" }, [
- vue.createElementVNode("view", { class: "tl-title-row" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
- ]),
- vue.createElementVNode("view", { class: "tl-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tl-item",
- key: idx
- }, [
- vue.createElementVNode("view", { class: "tl-marker active" }, [
- vue.createElementVNode("view", { class: "tl-dot-inner" })
- ]),
- vue.createElementVNode("view", { class: "tl-content-row" }, [
- vue.createElementVNode("view", { class: "tl-header" }, [
- vue.createElementVNode(
- "text",
- { class: "tl-status" },
- vue.toDisplayString(log.status),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "tl-time" },
- vue.toDisplayString(log.time),
- 1
- /* TEXT */
- )
- ]),
- log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tl-medias"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(log.medias, (media, midx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tl-media-item",
- key: midx,
- onClick: ($event) => _ctx.previewMedia(log.medias, midx)
- }, [
- !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "tl-img",
- src: media,
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tl-video-placeholder"
- }, [
- vue.createElementVNode("view", { class: "tl-play-icon" }),
- vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
- ]))
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tl-remark"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(log.remark),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { style: { "height": "140rpx" } })
- ]),
- vue.createElementVNode("view", { class: "bottom-action-bar" }, [
- vue.createElementVNode("view", { class: "action-left" }, [
- vue.createElementVNode("button", {
- class: "action-btn outline grey-outline",
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
- }, "异常上报"),
- _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 0,
- class: "action-btn outline orange-outline",
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
- }, "宠护小结")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "action-right" }, [
- _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
- "button",
- {
- key: 0,
- class: "action-btn primary",
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
- },
- vue.toDisplayString(_ctx.currentTaskTitle),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("button", {
- key: 1,
- class: "action-btn primary grey-bg"
- }, "已完成"))
- ])
- ]),
- _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pet-modal-mask",
- onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, [
- vue.createElementVNode("view", {
- class: "pet-modal-content",
- onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "pet-modal-header" }, [
- vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
- vue.createElementVNode("view", { style: { "flex": "1" } }),
- vue.createElementVNode("view", {
- class: "pm-remark-btn",
- onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
- }, "备注"),
- vue.createElementVNode("view", {
- class: "close-icon-btn",
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
- }, "×")
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "pet-modal-scroll"
- }, [
- vue.createElementVNode("view", { class: "pet-base-info" }, [
- vue.createElementVNode("image", {
- class: "pm-avatar",
- src: _ctx.currentPetInfo.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pm-info-text" }, [
- vue.createElementVNode("view", { class: "pm-name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "pm-name" },
- vue.toDisplayString(_ctx.currentPetInfo.petName),
- 1
- /* TEXT */
- ),
- _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-gender"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
- vue.createElementVNode("text", null, "公")
- ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "pm-gender female"
- }, [
- vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
- vue.createElementVNode("text", null, "母")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "text",
- { class: "pm-breed" },
- "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "pm-detail-grid" }, [
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item half" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "体重"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "性格"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "pm-grid-item full" }, [
- vue.createElementVNode("text", { class: "pm-label" }, "备注"),
- vue.createElementVNode(
- "text",
- { class: "pm-val" },
- vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
- 1
- /* TEXT */
- )
- ])
- ]),
- _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "pm-tags-row"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "pm-tag-chip",
- key: ti
- }, [
- vue.createElementVNode(
- "text",
- { class: "pm-tag-chip-text" },
- vue.toDisplayString(tag),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "pm-log-section" }, [
- vue.createElementVNode("view", { class: "pm-log-header" }, [
- vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
- vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "pm-log-item",
- key: lIndex
- }, [
- vue.createElementVNode(
- "text",
- { class: "pm-log-date" },
- vue.toDisplayString(log.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pm-log-text" },
- vue.toDisplayString(log.content),
- 1
- /* TEXT */
- ),
- log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "pm-log-recorder"
- },
- "记录人:" + vue.toDisplayString(log.recorder),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "pm-log-recorder system"
- }, "系统记录"))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { style: { "height": "30rpx" } })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "upload-modal-mask",
- onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
- }, [
- vue.createElementVNode("view", {
- class: "upload-modal-content",
- onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "um-header" }, [
- vue.createElementVNode("text", { class: "um-title" }, "添加备注")
- ]),
- vue.createElementVNode("view", { class: "um-body" }, [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "um-textarea",
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
- "auto-height": "",
- placeholder: "请输入宠物备注内容...",
- "placeholder-style": "color:#ccc; font-size:26rpx;"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.petRemarkText]
- ])
- ]),
- vue.createElementVNode("view", { class: "um-footer" }, [
- vue.createElementVNode("button", {
- class: "um-submit-btn active",
- onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
- }, "确认提交")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "nav-modal-mask",
- onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "nav-action-sheet",
- onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
- }, "高德地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
- }, "腾讯地图"),
- vue.createElementVNode("view", {
- class: "nav-sheet-item",
- onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
- }, "百度地图"),
- vue.createElementVNode("view", { class: "nav-sheet-gap" }),
- vue.createElementVNode("view", {
- class: "nav-sheet-item cancel",
- onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
- }, "取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "upload-modal-mask",
- onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "upload-modal-content",
- onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "um-header" }, [
- vue.createElementVNode(
- "text",
- { class: "um-title" },
- "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "um-remark-hint" },
- vue.toDisplayString(_ctx.currentTaskDesc),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "um-body" }, [
- vue.createElementVNode("view", { class: "um-grid" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.modalMediaList, (img, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "um-item",
- key: idx
- }, [
- vue.createElementVNode("image", {
- class: "um-preview",
- src: img.thumb || img.url || img.localPath || img,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "um-video-badge"
- }, [
- vue.createElementVNode("image", {
- class: "play-icon-small",
- src: _imports_7
- })
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "um-del",
- onClick: ($event) => _ctx.removeModalMedia(idx)
- }, "×", 8, ["onClick"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "um-add",
- onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
- }, [
- vue.createElementVNode("image", {
- class: "um-add-icon",
- src: _imports_1$6
- }),
- vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "um-textarea",
- "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
- placeholder: "在此输入备注信息...",
- "placeholder-style": "color:#ccc; font-size:26rpx;"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.modalRemark]
- ])
- ]),
- vue.createElementVNode("view", { class: "um-footer" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
- onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
- },
- " 确认提交",
- 2
- /* CLASS */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "sum-modal-mask",
- onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "sum-modal-card",
- onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "sum-modal-scroll"
- }, [
- vue.createElementVNode("view", { class: "sum-modal-inner" }, [
- vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
- vue.createElementVNode("view", { class: "sum-meta-row" }, [
- vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
- vue.createElementVNode(
- "text",
- { class: "sum-meta-val" },
- vue.toDisplayString(_ctx.sumDate),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "sum-meta-row" }, [
- vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
- vue.createElementVNode(
- "text",
- { class: "sum-meta-val" },
- vue.toDisplayString(_ctx.orderDetail.endAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "sum-meta-row" }, [
- vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
- vue.createElementVNode(
- "text",
- { class: "sum-meta-val" },
- vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
- vue.createElementVNode("view", { class: "sum-pet-card" }, [
- vue.createElementVNode("image", {
- class: "sum-pet-avatar",
- src: _ctx.orderDetail.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "sum-pet-info" }, [
- vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "sum-pet-name" },
- vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "sum-pet-breed" },
- "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "sum-pet-remark" },
- vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "sum-textarea",
- "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
- "auto-height": "",
- placeholder: "请填写服务内容...",
- "placeholder-style": "color:#ccc"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.sumContent]
- ]),
- vue.createElementVNode("view", { class: "sum-sign-row" }, [
- vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
- vue.createElementVNode(
- "text",
- { class: "sum-sign-val" },
- vue.toDisplayString(_ctx.sumSigner),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { style: { "height": "20rpx" } })
- ])
- ]),
- vue.createElementVNode("view", { class: "sum-footer" }, [
- vue.createElementVNode("button", {
- class: "sum-submit-btn",
- onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
- }, "提交小结")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "modal-mask",
- onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
- }, [
- vue.createElementVNode("view", {
- class: "anomaly-modal-content",
- onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "am-header" }, [
- vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
- vue.createElementVNode("view", {
- class: "close-icon-btn",
- onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
- }, "×")
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "am-scroll-list"
- }, [
- _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "empty-list"
- }, [
- vue.createElementVNode("image", {
- class: "empty-icon",
- src: _imports_8$1,
- mode: "aspectFit"
- }),
- vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
- ])) : vue.createCommentVNode("v-if", true),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.anomalyList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "am-item",
- key: index
- }, [
- vue.createElementVNode("view", { class: "am-item-header" }, [
- vue.createElementVNode(
- "text",
- { class: "am-item-type" },
- vue.toDisplayString(item.typeLabel),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["am-item-status", "status-" + item.status])
- },
- vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "am-item-content" },
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- ),
- item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "am-item-photos"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "am-photo-item",
- key: pIdx,
- onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
- }, [
- !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "am-photo",
- src: photoUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tl-video-placeholder miniaturized"
- }, [
- vue.createElementVNode("view", { class: "tl-play-icon small" }),
- vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
- ]))
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "am-audit-box"
- }, [
- vue.createElementVNode("view", { class: "am-audit-header" }, [
- vue.createElementVNode(
- "text",
- { class: "am-audit-label" },
- vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "am-audit-time" },
- vue.toDisplayString(item.auditTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "am-audit-remark" },
- vue.toDisplayString(item.auditRemark || "无"),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "video-player-mask",
- onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
- }, [
- vue.createElementVNode("view", {
- class: "video-player-content",
- onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("video", {
- class: "v-player",
- src: _ctx.videoPlayerUrl,
- autoplay: "",
- controls: ""
- }, null, 8, ["src"]),
- vue.createElementVNode("view", {
- class: "v-close",
- onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
- }, "×")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ]);
- }
- const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
- const _sfc_main$p = {
- data() {
- return {
- orderId: "",
- // 已选异常类型(dictValue)
- selectedTypeValue: "",
- // 已选异常类型标签(dictLabel,用于显示)
- selectedTypeLabel: "",
- // 异常描述
- anomalyDesc: "",
- // 照片列表(含 url 和 ossId)
- photoList: [],
- // 是否显示类型选择器
- showTypeSheet: false,
- // 异常类型字典列表(从后端获取)
- anomalyTypes: []
- };
- },
- onLoad(options) {
- if (options.orderId) {
- this.orderId = options.orderId;
- }
- this.loadAnomalyTypes();
- },
- computed: {
- // 当前选中的类型显示文本
- selectedType() {
- return this.selectedTypeLabel || "";
- }
- },
- methods: {
- /**
- * 加载异常类型字典数据
- */
- async loadAnomalyTypes() {
- try {
- const res = await getDictDataByType("flf_anamaly_type");
- if (res.data && Array.isArray(res.data)) {
- this.anomalyTypes = res.data.map((item) => ({
- label: item.dictLabel,
- value: item.dictValue,
- dictCode: item.dictCode
- }));
- formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
- }
- } catch (err) {
- formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
- }
- },
- // 打开类型选择器
- openTypeSheet() {
- this.showTypeSheet = true;
- },
- // 关闭类型选择器
- closeTypeSheet() {
- this.showTypeSheet = false;
- },
- // 选择异常类型
- selectType(type) {
- this.selectedTypeValue = type.value;
- this.selectedTypeLabel = type.label;
- this.closeTypeSheet();
- },
- // 选择照片并上传
- choosePhoto() {
- uni.chooseImage({
- count: 5 - this.photoList.length,
- sizeType: ["compressed"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- uni.showLoading({ title: "上传中..." });
- try {
- for (const filePath of res.tempFilePaths) {
- const uploadRes = await uploadFile(filePath);
- if (uploadRes.code === 200) {
- this.photoList.push({
- url: uploadRes.data.url,
- ossId: uploadRes.data.ossId,
- localPath: filePath
- });
- }
- }
- uni.hideLoading();
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
- uni.showToast({ title: "上传失败", icon: "none" });
- }
- }
- });
- },
- // 删除照片
- removePhoto(idx) {
- this.photoList.splice(idx, 1);
- },
- // 提交上报
- async submitAnomaly() {
- if (!this.selectedTypeValue) {
- uni.showToast({ title: "请选择异常类型", icon: "none" });
- return;
- }
- if (this.photoList.length === 0) {
- uni.showToast({ title: "请上传现场照片", icon: "none" });
- return;
- }
- const data = {
- orderId: this.orderId,
- type: this.selectedTypeValue,
- content: this.anomalyDesc,
- photos: this.photoList.map((p) => p.ossId)
- };
- try {
- uni.showLoading({ title: "提交中..." });
- await uploadAnamaly(data);
- uni.hideLoading();
- uni.showToast({ title: "上报成功", icon: "success" });
- setTimeout(() => {
- uni.navigateBack();
- }, 1500);
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
- uni.showToast({ title: "提交失败,请重试", icon: "none" });
- }
- }
- }
- };
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "anomaly-scroll"
- }, [
- vue.createElementVNode("view", { class: "ano-card" }, [
- vue.createElementVNode("view", { class: "ano-section-title" }, [
- vue.createElementVNode("view", { class: "ano-title-bar" }),
- vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
- ]),
- vue.createElementVNode("view", {
- class: "ano-type-row",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
- },
- vue.toDisplayString($options.selectedType || "请选择异常类型"),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("image", {
- class: "ano-right-arrow",
- src: _imports_0$2
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "ano-card" }, [
- vue.createElementVNode("view", { class: "ano-section-title" }, [
- vue.createElementVNode("view", { class: "ano-title-bar" }),
- vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
- ]),
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "ano-textarea",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
- placeholder: "请详细描述现场异常情况...",
- "placeholder-style": "color:#ccc; font-size:28rpx;",
- maxlength: "500"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.anomalyDesc]
- ])
- ]),
- vue.createElementVNode("view", { class: "ano-card" }, [
- vue.createElementVNode("view", { class: "ano-section-title" }, [
- vue.createElementVNode("view", { class: "ano-title-bar" }),
- vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
- ]),
- vue.createElementVNode("view", { class: "ano-photo-grid" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.photoList, (img, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "ano-photo-item",
- key: idx
- }, [
- vue.createElementVNode("image", {
- class: "ano-photo-preview",
- src: img.url || img.localPath || img,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", {
- class: "ano-photo-del",
- onClick: ($event) => $options.removePhoto(idx)
- }, "×", 8, ["onClick"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "ano-photo-add",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
- }, [
- vue.createElementVNode("image", {
- class: "ano-add-icon",
- src: _imports_1$6
- }),
- vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { style: { "height": "160rpx" } })
- ]),
- vue.createElementVNode("view", { class: "ano-footer" }, [
- vue.createElementVNode("button", {
- class: "ano-submit-btn",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
- }, "提交上报")
- ]),
- $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "ano-sheet-mask",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
- }, [
- vue.createElementVNode("view", {
- class: "ano-sheet",
- onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "ano-sheet-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.anomalyTypes, (type, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "ano-sheet-item",
- key: idx,
- onClick: ($event) => $options.selectType(type)
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
- },
- vue.toDisplayString(type.label),
- 3
- /* TEXT, CLASS */
- ),
- $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "ano-check-icon",
- src: _imports_0$2
- })) : vue.createCommentVNode("v-if", true)
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", {
- class: "ano-sheet-cancel",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
- }, "取消")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
- const _sfc_main$o = {
- data() {
- return {
- tabs: ["全部", "已完成", "已拒绝"],
- activeTab: 0,
- stats: {
- total: 0,
- reject: 0,
- reward: 0,
- punish: 0
- },
- orders: [],
- serviceList: [],
- pageNum: 1,
- pageSize: 10,
- total: 0,
- loading: false
- };
- },
- computed: {
- filteredOrders() {
- return this.orders;
- }
- },
- async onLoad() {
- await this.loadServiceList();
- this.fetchStats();
- this.fetchOrders(true);
- },
- methods: {
- async loadServiceList() {
- try {
- const res = await listAllService();
- this.serviceList = res.data || [];
- } catch (err) {
- formatAppLog("error", "at pages/mine/order-stats.vue:160", "获取服务类型失败:", err);
- }
- },
- async fetchStats() {
- try {
- const res = await getOrderStats();
- if (res.code === 200 && res.data) {
- this.stats = {
- ...this.stats,
- ...res.data
- };
- }
- } catch (err) {
- formatAppLog("error", "at pages/mine/order-stats.vue:173", "获取统计值失败:", err);
- }
- },
- async fetchOrders(reset = false) {
- if (reset) {
- this.pageNum = 1;
- this.orders = [];
- }
- if (this.loading)
- return;
- if (!reset && this.orders.length >= this.total && this.total !== 0)
- return;
- this.loading = true;
- try {
- const statusMap = { 0: void 0, 1: 4, 2: 5 };
- const params = {
- status: statusMap[this.activeTab],
- pageNum: this.pageNum,
- pageSize: this.pageSize
- };
- const res = await getStatisticOrders(params);
- if (res.code === 200) {
- this.total = res.total || 0;
- const rows = res.rows || [];
- const mapped = rows.map((item) => this.transformOrder(item));
- this.orders = this.orders.concat(mapped);
- this.pageNum++;
- }
- } catch (err) {
- formatAppLog("error", "at pages/mine/order-stats.vue:201", "获取订单列表失败:", err);
- } finally {
- this.loading = false;
- }
- },
- transformOrder(order) {
- const service = this.serviceList.find((s) => s.id === order.service);
- const mode = (service == null ? void 0 : service.mode) || 0;
- const isRoundTrip = mode === 1;
- const statusMap = {
- 0: { label: "待派单", color: "#f56c6c" },
- 1: { label: "待接单", color: "#e6a23c" },
- 2: { label: "待服务", color: "#49a3ff" },
- 3: { label: "服务中", color: "#49a3ff" },
- 4: { label: "已完成", color: "#67c23a" },
- 5: { label: "已取消", color: "#909399" }
- };
- const statusInfo = statusMap[order.status] || { label: "未知", color: "#999" };
- return {
- id: order.id,
- orderType: isRoundTrip ? 1 : 2,
- typeName: (service == null ? void 0 : service.name) || "未知",
- typeIcon: (service == null ? void 0 : service.iconUrl) || "",
- statusLabel: statusInfo.label,
- statusColor: statusInfo.color,
- finishTime: order.serviceTime || "",
- serviceTime: order.serviceTime || "",
- petName: order.petName || "未知",
- petBreed: order.breed || "未知",
- petAvatar: order.petAvatarUrl || "/static/dog.png",
- price: (order.price / 100).toFixed(2),
- startName: order.fromAddress || "",
- startAddr: order.fromAddress || "",
- endName: (order.customerName || "") + " " + (order.customerPhone || ""),
- endAddr: order.toAddress || "",
- serviceNote: order.remark || ""
- };
- },
- switchTab(idx) {
- this.activeTab = idx;
- this.fetchOrders(true);
- },
- onReachBottom() {
- this.fetchOrders();
- },
- navBack() {
- uni.navigateBack();
- }
- }
- };
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "stats-banner" }, [
- vue.createElementVNode("view", { class: "banner-item" }, [
- vue.createElementVNode(
- "text",
- { class: "banner-num" },
- vue.toDisplayString($data.stats.total),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
- ]),
- vue.createElementVNode("view", { class: "banner-item" }, [
- vue.createElementVNode(
- "text",
- { class: "banner-num" },
- vue.toDisplayString($data.stats.reject),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
- ]),
- vue.createElementVNode("view", { class: "banner-item" }, [
- vue.createElementVNode(
- "text",
- { class: "banner-num" },
- vue.toDisplayString($data.stats.reward),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
- ]),
- vue.createElementVNode("view", { class: "banner-item" }, [
- vue.createElementVNode(
- "text",
- { class: "banner-num" },
- vue.toDisplayString($data.stats.punish),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
- ])
- ]),
- vue.createElementVNode("view", { class: "tab-bar" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.tabs, (tab, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
- key: idx,
- onClick: ($event) => $options.switchTab(idx)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(tab),
- 1
- /* TEXT */
- ),
- $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode(
- "scroll-view",
- {
- "scroll-y": "",
- class: "order-scroll",
- onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
- },
- [
- vue.createElementVNode("view", { style: { "height": "16rpx" } }),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.filteredOrders, (order, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-card",
- key: idx
- }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("view", { class: "type-badge" }, [
- vue.createElementVNode("image", {
- class: "type-icon",
- src: order.typeIcon
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "text",
- { class: "type-text" },
- vue.toDisplayString(order.typeName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- {
- class: "status-text",
- style: vue.normalizeStyle({ color: order.statusColor })
- },
- vue.toDisplayString(order.statusLabel),
- 5
- /* TEXT, STYLE */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "service-time" },
- "服务时间:" + vue.toDisplayString(order.serviceTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "pet-card" }, [
- vue.createElementVNode("image", {
- class: "pet-avatar",
- src: order.petAvatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "pet-info" }, [
- vue.createElementVNode(
- "text",
- { class: "pet-name" },
- vue.toDisplayString(order.petName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "pet-breed" },
- "品种: " + vue.toDisplayString(order.petBreed),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "pet-price" },
- "¥" + vue.toDisplayString(order.price),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "route-info" }, [
- order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", { class: "route-item" }, [
- vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
- vue.createElementVNode("view", { class: "route-connector" }),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(order.startName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(order.startAddr),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "route-item" }, [
- vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(order.endName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(order.endAddr),
- 1
- /* TEXT */
- )
- ])
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createElementVNode("view", { class: "route-item" }, [
- vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode(
- "text",
- { class: "addr-title" },
- vue.toDisplayString(order.endName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "addr-desc" },
- vue.toDisplayString(order.endAddr),
- 1
- /* TEXT */
- )
- ])
- ]),
- order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "service-note-row"
- }, [
- vue.createElementVNode(
- "text",
- { class: "service-note-text" },
- "服务内容:" + vue.toDisplayString(order.serviceNote),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "empty-state"
- }, [
- vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
- ])) : vue.createCommentVNode("v-if", true),
- $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "loading-more"
- }, [
- vue.createElementVNode("text", null, "加载中...")
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { style: { "height": "40rpx" } })
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]);
- }
- 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"]]);
- function getBalanceOnApp() {
- return request({
- url: "/fulfiller/log/balanceOnApp",
- method: "GET"
- });
- }
- function pageBalanceOnApp(data) {
- return request({
- url: "/fulfiller/log/pageBalanceOnApp",
- method: "GET",
- data
- });
- }
- function listBalanceOnApp(data) {
- return request({
- url: "/fulfiller/log/listBalanceOnApp",
- method: "GET",
- data
- });
- }
- function pointsOnApp() {
- return request({
- url: "/fulfiller/log/pointsOnApp",
- method: "GET"
- });
- }
- function pagePointsOnApp(data) {
- return request({
- url: "/fulfiller/log/pagePointsOnApp",
- method: "GET",
- data
- });
- }
- function listPointsOnApp(data) {
- return request({
- url: "/fulfiller/log/listPointsOnApp",
- method: "GET",
- data
- });
- }
- function countOnAppReward(data) {
- return request({
- url: "/fulfiller/log/countOnAppReward",
- method: "GET",
- data
- });
- }
- function listOnAppReward(data) {
- return request({
- url: "/fulfiller/log/listOnAppReward",
- method: "GET",
- data
- });
- }
- const FlfBalanceBizType = {
- admin_reward: "后台奖励",
- admin_punish: "后台惩罚",
- admin_adjust: "后台调整",
- order_reward: "订单奖励",
- order_punish: "订单惩罚",
- order_finish: "订单完成",
- salary: "工资发放",
- withdraw: "提现"
- };
- const FlfPointsBizType = {
- admin_reward: "后台奖励",
- admin_punish: "后台惩罚",
- admin_adjust: "后台调整",
- order_reward: "订单奖励",
- order_punish: "订单惩罚",
- order_finish: "订单完成"
- };
- const FlfRewardBizType = {
- admin_reward: "后台奖励",
- admin_punish: "后台惩罚",
- order_reward: "订单奖励",
- order_punish: "订单惩罚",
- order_finish: "订单完成"
- };
- const FlfActionType = {
- add: "收入",
- reduce: "支出"
- };
- const fulfillerEnum = {
- FlfBalanceBizType,
- FlfPointsBizType,
- FlfRewardBizType,
- FlfActionType
- };
- const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
- const _sfc_main$n = {
- data() {
- const now = /* @__PURE__ */ new Date();
- return {
- tabs: ["全部", "奖励", "惩罚"],
- activeTab: 0,
- selectedYear: now.getFullYear(),
- selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
- // 默认当前月,处理一下测试数据时间
- // 统计数据
- stats: {
- rewardCount: 0,
- punishCount: 0,
- rewardBalance: 0,
- punishBalance: 0
- },
- // 月份选择器状态
- showMonthPicker: false,
- pickerYear: 2026,
- pickerMonth: 3,
- years: [2024, 2025, 2026],
- months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
- yearScrollTop: 0,
- monthScrollTop: 0,
- // 奖惩记录列表
- records: []
- };
- },
- computed: {
- filteredList() {
- if (this.activeTab === 0)
- return this.records;
- const targetType = this.activeTab === 1 ? "reward" : "penalty";
- return this.records.filter((r) => r.type === targetType);
- }
- },
- onShow() {
- if (this.selectedYear === 2026 && this.selectedMonth === 2)
- ;
- this.fetchData();
- },
- methods: {
- async fetchData() {
- const params = {
- year: this.selectedYear,
- month: this.selectedMonth
- };
- this.fetchStats(params);
- this.fetchList(params);
- },
- async fetchStats(params) {
- try {
- const res = await countOnAppReward(params);
- if (res.code === 200) {
- this.stats = res.data || {
- rewardCount: 0,
- punishCount: 0,
- rewardBalance: 0,
- punishBalance: 0
- };
- }
- } catch (err) {
- formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
- }
- },
- async fetchList(params) {
- try {
- const res = await listOnAppReward(params);
- if (res.code === 200) {
- const list = res.data || [];
- this.records = list.map((item) => {
- const isAdd = item.type === "add";
- const amountVal = Math.abs(item.amount) / 100;
- let dateStr = "";
- if (item.createTime) {
- const datePart = item.createTime.split(" ")[0];
- const parts = datePart.split("-");
- if (parts.length >= 3) {
- dateStr = `${parts[1]}-${parts[2]}`;
- }
- }
- return {
- ...item,
- date: dateStr,
- title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
- desc: item.reason || "",
- amount: isAdd ? amountVal : -amountVal,
- type: isAdd ? "reward" : "penalty",
- status: isAdd ? "已入账" : "已扣款",
- // 简化处理状态
- statusClass: isAdd ? "credited" : "deducted"
- };
- });
- }
- } catch (err) {
- formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
- }
- },
- switchTab(idx) {
- this.activeTab = idx;
- },
- openMonthPicker() {
- this.pickerYear = this.selectedYear;
- this.pickerMonth = this.selectedMonth;
- this.showMonthPicker = true;
- },
- closeMonthPicker() {
- this.showMonthPicker = false;
- },
- confirmMonthPicker() {
- this.selectedYear = this.pickerYear;
- this.selectedMonth = this.pickerMonth;
- this.closeMonthPicker();
- this.fetchData();
- },
- goToAll() {
- uni.navigateTo({ url: "/pages/mine/rewards-all" });
- }
- }
- };
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "top-banner" }, [
- vue.createElementVNode("view", {
- class: "month-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "month-text" },
- vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "stats-grid" }, [
- vue.createElementVNode("view", { class: "stats-cell" }, [
- vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
- vue.createElementVNode("text", { class: "stats-num" }, [
- vue.createTextVNode(
- vue.toDisplayString($data.stats.rewardCount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "stats-unit" }, "单")
- ]),
- vue.createElementVNode("view", { class: "stats-divider" }),
- vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
- ]),
- vue.createElementVNode("view", { class: "stats-cell" }, [
- vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
- vue.createElementVNode("text", { class: "stats-num" }, [
- vue.createTextVNode(
- vue.toDisplayString($data.stats.punishCount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "stats-unit" }, "单")
- ]),
- vue.createElementVNode("view", { class: "stats-divider" }),
- vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
- ]),
- vue.createElementVNode("view", { class: "stats-cell" }, [
- vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
- vue.createElementVNode(
- "text",
- { class: "stats-num reward-num" },
- vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "stats-divider" }),
- vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
- ]),
- vue.createElementVNode("view", { class: "stats-cell" }, [
- vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
- vue.createElementVNode(
- "text",
- { class: "stats-num penalty-num" },
- vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "stats-divider" }),
- vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "list-header" }, [
- vue.createElementVNode("view", { class: "tab-bar" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.tabs, (tab, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
- key: idx,
- onClick: ($event) => $options.switchTab(idx)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(tab),
- 1
- /* TEXT */
- ),
- $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", {
- class: "view-all-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
- }, [
- vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
- ])
- ]),
- vue.createElementVNode("view", { class: "record-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.filteredList, (item, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "record-item",
- key: idx
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
- },
- [
- vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "ri-content" }, [
- vue.createElementVNode("view", { class: "ri-title-row" }, [
- vue.createElementVNode(
- "text",
- { class: "ri-date" },
- vue.toDisplayString(item.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "ri-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "ri-desc" },
- vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "ri-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
- },
- vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ri-status", item.statusClass])
- },
- vue.toDisplayString(item.status),
- 3
- /* TEXT, CLASS */
- )
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
- ]),
- $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "picker-mask",
- onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
- }, [
- vue.createElementVNode("view", {
- class: "picker-sheet",
- onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "picker-header" }, [
- vue.createElementVNode("text", {
- class: "picker-cancel",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
- vue.createElementVNode("text", {
- class: "picker-confirm",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
- }, "确定")
- ]),
- vue.createElementVNode("view", { class: "picker-body" }, [
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "picker-column",
- "scroll-top": $data.yearScrollTop,
- onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
- }, [
- vue.createElementVNode("view", { style: { "height": "80rpx" } }),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.years, (year) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
- key: year,
- onClick: ($event) => $data.pickerYear = year
- }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { style: { "height": "80rpx" } })
- ], 40, ["scroll-top"]),
- vue.createElementVNode("view", { class: "picker-highlight" }),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "picker-column",
- "scroll-top": $data.monthScrollTop,
- onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
- }, [
- vue.createElementVNode("view", { style: { "height": "80rpx" } }),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.months, (month) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
- key: month,
- onClick: ($event) => $data.pickerMonth = month
- }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { style: { "height": "80rpx" } })
- ], 40, ["scroll-top"])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
- const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
- const _sfc_main$m = {
- data() {
- const now = /* @__PURE__ */ new Date();
- return {
- tabs: ["全部", "奖励", "惩罚"],
- activeTab: 0,
- selectedYear: now.getFullYear(),
- selectedMonth: now.getMonth() + 1,
- // 原始分组数据
- allGroups: [],
- loading: false
- };
- },
- computed: {
- currentPickerDate() {
- return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
- },
- filteredGroups() {
- if (this.activeTab === 0)
- return this.allGroups;
- const typeKey = this.activeTab === 1 ? "reward" : "penalty";
- return this.allGroups.map((g) => ({
- ...g,
- items: g.items.filter((i) => i.type === typeKey)
- })).filter((g) => g.items.length > 0);
- }
- },
- onShow() {
- this.fetchMonthData();
- },
- methods: {
- async fetchMonthData() {
- if (this.loading)
- return;
- this.loading = true;
- try {
- const params = {
- year: this.selectedYear,
- month: this.selectedMonth
- };
- const res = await listOnAppReward(params);
- const data = res.data || [];
- if (data.length === 0) {
- this.allGroups = [];
- return;
- }
- let credited = 0;
- const items = data.map((item) => {
- const isAdd = item.type === "add";
- const amountVal = Math.abs(item.amount) / 100;
- if (isAdd)
- credited += amountVal;
- let dateStr = "";
- if (item.createTime) {
- const datePart = item.createTime.split(" ")[0];
- const parts = datePart.split("-");
- if (parts.length >= 3) {
- dateStr = `${parts[1]}-${parts[2]}`;
- }
- }
- return {
- ...item,
- date: dateStr,
- title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
- desc: item.reason || "",
- amount: isAdd ? amountVal : -amountVal,
- type: isAdd ? "reward" : "penalty",
- status: isAdd ? "已入账" : "已扣款",
- statusClass: isAdd ? "credited" : "deducted"
- };
- });
- this.allGroups = [{
- month: this.selectedMonth,
- year: this.selectedYear,
- credited,
- pending: 0,
- items
- }];
- } catch (err) {
- formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
- } finally {
- this.loading = false;
- }
- },
- onDateChange(e) {
- const val = e.detail.value;
- const parts = val.split("-");
- this.selectedYear = parseInt(parts[0]);
- this.selectedMonth = parseInt(parts[1]);
- this.fetchMonthData();
- },
- switchTab(idx) {
- this.activeTab = idx;
- }
- }
- };
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "filter-header" }, [
- vue.createElementVNode("view", { class: "tab-bar" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.tabs, (tab, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
- key: idx,
- onClick: ($event) => $options.switchTab(idx)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(tab),
- 1
- /* TEXT */
- ),
- $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "date-filter" }, [
- vue.createElementVNode("picker", {
- mode: "date",
- fields: "month",
- value: $options.currentPickerDate,
- onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
- }, [
- vue.createElementVNode("view", { class: "picker-trigger" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
- ])
- ], 40, ["value"])
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "main-scroll"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.filteredGroups, (group, gIdx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: gIdx,
- class: "month-group"
- }, [
- vue.createElementVNode("view", { class: "month-header" }, [
- vue.createElementVNode(
- "text",
- { class: "month-title" },
- vue.toDisplayString(group.month) + "月",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "month-summary" }, [
- vue.createElementVNode(
- "text",
- { class: "month-sum-text" },
- "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "month-sum-text" },
- " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(group.items, (item, rIdx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "record-item",
- key: rIdx
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
- },
- [
- vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "ri-content" }, [
- vue.createElementVNode("view", { class: "ri-title-row" }, [
- vue.createElementVNode(
- "text",
- { class: "ri-date" },
- vue.toDisplayString(item.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "ri-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "text",
- { class: "ri-desc" },
- vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "ri-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
- },
- vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["ri-status", item.statusClass])
- },
- vue.toDisplayString(item.status),
- 3
- /* TEXT, CLASS */
- )
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { style: { "height": "40rpx" } })
- ])
- ]);
- }
- 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"]]);
- const logic = {
- components: {
- customTabbar
- },
- data() {
- return {
- showServicePopup: false,
- showLogoutPopup: false,
- profile: null,
- profileLoading: false,
- levelConfigs: []
- // 等级配置列表
- };
- },
- computed: {
- // 根据 profile.level 匹配对应的等级名称
- displayLevelName() {
- if (!this.profile || !this.levelConfigs.length)
- return "普通履约者";
- const config = this.levelConfigs.find((c) => c.lvNo === this.profile.level);
- return config ? config.name : this.profile.levelName || "普通履约者";
- }
- },
- onShow() {
- uni.hideTabBar();
- if (isLoggedIn()) {
- this.loadProfile();
- this.loadLevelConfigs();
- }
- },
- methods: {
- async loadProfile() {
- if (this.profileLoading)
- return;
- this.profileLoading = true;
- try {
- const res = await getMyProfile();
- this.profile = res.data || null;
- } catch (err) {
- formatAppLog("error", "at pages/mine/logic.js:42", "获取个人信息失败:", err);
- } finally {
- this.profileLoading = false;
- }
- },
- async loadLevelConfigs() {
- try {
- const res = await listAllLevelConfigs();
- this.levelConfigs = res.data || [];
- } catch (err) {
- formatAppLog("error", "at pages/mine/logic.js:52", "加载等级配置失败:", err);
- }
- },
- navToSettings() {
- uni.navigateTo({
- url: "/pages/mine/settings/index"
- });
- },
- navToProfile() {
- uni.navigateTo({
- url: "/pages/mine/settings/profile/index"
- });
- },
- navToLevel() {
- uni.navigateTo({
- url: "/pages/mine/level/index"
- });
- },
- navToNotification() {
- uni.navigateTo({
- url: "/pages/mine/message/index"
- });
- },
- navToWallet() {
- uni.navigateTo({
- url: "/pages/mine/wallet/index"
- });
- },
- navToPoints() {
- uni.navigateTo({
- url: "/pages/mine/points/index"
- });
- },
- navToOrderStats() {
- uni.navigateTo({
- url: "/pages/mine/order-stats"
- });
- },
- navToRewards() {
- uni.navigateTo({
- url: "/pages/mine/rewards"
- });
- },
- openServicePopup() {
- this.showServicePopup = true;
- },
- closeServicePopup() {
- this.showServicePopup = false;
- },
- previewQRCode() {
- uni.previewImage({
- urls: ["/static/logo.png"]
- });
- },
- openOnlineService() {
- uni.showToast({
- title: "正在跳转企业微信客服...",
- icon: "none"
- });
- },
- callServicePhone() {
- uni.makePhoneCall({
- phoneNumber: "400-123-4567"
- });
- },
- logout() {
- this.showLogoutPopup = true;
- },
- cancelLogout() {
- this.showLogoutPopup = false;
- },
- async confirmLogout() {
- this.showLogoutPopup = false;
- try {
- await logout();
- } catch (e) {
- }
- clearAuth();
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }
- }
- };
- const _imports_0$1 = "/static/icons/motorbike.svg";
- const _imports_1$5 = "/static/icons/location.svg";
- const _imports_0 = "/static/icons/chevron_right_dark.svg";
- const _imports_3$1 = "/static/icons/calendar.svg";
- const _imports_4 = "/static/icons/settings.svg";
- const _imports_1$4 = "/static/icons/crown.svg";
- const _imports_6 = "/static/icons/chevron_right_gold.svg";
- const _imports_3 = "/static/icons/chevron_right.svg";
- const _imports_8 = "/static/icons/money_linear.svg";
- const _imports_9 = "/static/icons/headset_linear.svg";
- const _imports_10 = "/static/icons/close_gray.svg";
- const _imports_12 = "/static/icons/headset_green.svg";
- const _imports_14 = "/static/icons/phone_green.svg";
- const _sfc_main$l = {
- ...logic
- };
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
- const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- vue.createElementVNode("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bg" }, [
- vue.createElementVNode("view", { class: "bg-circle-1" }),
- vue.createElementVNode("view", { class: "bg-circle-2" })
- ]),
- vue.createElementVNode("view", { class: "header-section" }, [
- vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
- vue.createElementVNode("view", {
- class: "user-card",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
- }, [
- vue.createElementVNode("image", {
- class: "avatar",
- src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "info-content" }, [
- vue.createElementVNode("view", { class: "name-row" }, [
- vue.createElementVNode(
- "text",
- { class: "name" },
- vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "tags" }, [
- ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag green"
- }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tag green"
- }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "tag",
- style: { "background": "#eee", "color": "#999" }
- }, "已禁用")) : vue.createCommentVNode("v-if", true),
- ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "tag blue"
- }, "全职")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("image", {
- class: "bike-icon",
- src: _imports_0$1
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode("image", {
- class: "small-icon",
- src: _imports_1$5
- }),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_0
- })
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode("image", {
- class: "small-icon",
- src: _imports_3$1
- }),
- vue.createElementVNode(
- "text",
- null,
- "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("image", {
- class: "settings-icon",
- src: _imports_4,
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
- })
- ]),
- vue.createElementVNode("view", { class: "vip-card" }, [
- vue.createElementVNode("view", { class: "vip-left" }, [
- vue.createElementVNode("image", {
- class: "vip-icon",
- src: _imports_1$4
- }),
- vue.createElementVNode("view", { class: "vip-text" }, [
- vue.createElementVNode(
- "text",
- { class: "vip-title" },
- vue.toDisplayString(_ctx.displayLevelName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "vip-desc" }, "完成更多订单即可升级")
- ])
- ]),
- vue.createElementVNode("view", {
- class: "vip-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
- }, [
- vue.createElementVNode("text", null, "查看权益"),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_6
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "stats-panel" }, [
- vue.createElementVNode("view", {
- class: "stat-item",
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
- }, [
- vue.createElementVNode("view", { class: "stat-header" }, [
- vue.createElementVNode("view", { class: "red-bar" }),
- vue.createElementVNode("text", { class: "label" }, "我的钱包"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "stat-value" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "unit" }, "元")
- ]),
- vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", {
- class: "stat-item",
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
- }, [
- vue.createElementVNode("view", { class: "stat-header" }, [
- vue.createElementVNode("view", { class: "green-bar" }),
- vue.createElementVNode("text", { class: "label" }, "订单统计"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "stat-value" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.orderCount) || 0),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "unit" }, "单")
- ]),
- vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
- ]),
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("view", {
- class: "stat-item",
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
- }, [
- vue.createElementVNode("view", { class: "stat-header" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "label" }, "我的积分"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "stat-value" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.points) || 0),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "unit" }, "分")
- ]),
- vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
- ])
- ]),
- vue.createElementVNode("view", { class: "menu-list" }, [
- vue.createElementVNode("view", {
- class: "menu-item",
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
- }, [
- vue.createElementVNode("image", {
- class: "menu-icon",
- src: _imports_8
- }),
- vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", {
- class: "menu-item",
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
- }, [
- vue.createElementVNode("image", {
- class: "menu-icon",
- src: _imports_9
- }),
- vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", {
- class: "logout-btn",
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.logout && _ctx.logout(...args))
- }, "退出登录"),
- vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
- _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "service-popup-mask",
- onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
- }, [
- vue.createElementVNode("view", {
- class: "service-popup",
- onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "service-header" }, [
- vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
- vue.createElementVNode("image", {
- class: "close-icon",
- src: _imports_10,
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
- })
- ]),
- vue.createElementVNode("view", { class: "qr-section" }, [
- vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
- vue.createElementVNode("image", {
- class: "qr-img",
- src: _imports_1$8,
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
- }),
- vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
- ]),
- vue.createElementVNode("view", { class: "service-list" }, [
- vue.createElementVNode("view", {
- class: "service-row",
- onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
- }, [
- vue.createElementVNode("image", {
- class: "service-row-icon",
- src: _imports_12
- }),
- vue.createElementVNode("view", { class: "service-info" }, [
- vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
- vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
- ]),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "service-row" }, [
- vue.createElementVNode("image", {
- class: "service-row-icon",
- src: _imports_13
- }),
- vue.createElementVNode("view", { class: "service-info" }, [
- vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
- vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
- ]),
- vue.createElementVNode("view", {
- class: "call-btn",
- onClick: _cache[12] || (_cache[12] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
- }, [
- vue.createElementVNode("image", {
- class: "phone-icon-small",
- src: _imports_14
- }),
- vue.createElementVNode("text", null, "拨打")
- ])
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
- onClick: _cache[18] || (_cache[18] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
- onTouchmove: _cache[19] || (_cache[19] = vue.withModifiers(() => {
- }, ["stop", "prevent"]))
- },
- [
- vue.createElementVNode("view", {
- class: "popup-modal",
- onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
- vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
- vue.createElementVNode("view", { class: "popup-actions" }, [
- vue.createElementVNode("view", {
- class: "popup-btn cancel",
- onClick: _cache[15] || (_cache[15] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
- }, "取消"),
- vue.createElementVNode("view", {
- class: "popup-btn confirm",
- onClick: _cache[16] || (_cache[16] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
- }, "确定")
- ])
- ])
- ],
- 34
- /* CLASS, NEED_HYDRATION */
- )
- ]),
- vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
- const _sfc_main$k = {
- data() {
- return {};
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- navTo(type) {
- let url = "";
- switch (type) {
- case "profile":
- url = "/pages/mine/settings/profile/index";
- break;
- case "auth":
- url = "/pages/mine/settings/auth/index";
- break;
- case "bank":
- url = "/pages/mine/settings/bank/index";
- break;
- case "security":
- url = "/pages/mine/settings/security/index";
- break;
- case "push":
- url = "/pages/mine/settings/notification/index";
- break;
- case "about":
- url = "/pages/mine/settings/about/index";
- break;
- default:
- formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
- return;
- }
- uni.navigateTo({ url });
- },
- clearCache() {
- uni.showToast({ title: "缓存已清理", icon: "none" });
- }
- }
- };
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "设置"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", {
- class: "list-item no-border",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "list-item" }, [
- vue.createElementVNode("view", { class: "item-row-left" }, [
- vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
- vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
- ]),
- vue.createElementVNode("switch", {
- checked: "",
- color: "#FF5722",
- style: { "transform": "scale(0.8)" }
- })
- ]),
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", {
- class: "list-item no-border",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- function getAreaStationList() {
- return request({
- url: "/system/areaStation/list",
- method: "GET"
- });
- }
- const _sfc_main$j = {
- data() {
- return {
- userInfo: {
- name: "",
- workType: "",
- workStatus: "",
- city: "",
- avatar: "/static/touxiang.png",
- stationName: "",
- stationFullName: ""
- },
- isStatusPickerShow: false,
- isCityPickerShow: false,
- // 城市站点级联选择器
- selectStep: 0,
- selectedPathway: [],
- currentCityList: [],
- selectedCityId: null,
- fullTree: []
- // 树形结构数据
- };
- },
- onLoad() {
- this.loadUserInfo();
- uni.$on("updateName", (newName) => {
- this.userInfo.name = newName;
- });
- },
- onUnload() {
- uni.$off("updateName");
- },
- methods: {
- // 加载用户信息 @author steelwei
- async loadUserInfo() {
- uni.showLoading({ title: "加载中..." });
- try {
- const res = await getMyProfile();
- if (res.code === 200) {
- const data = res.data;
- this.userInfo = {
- name: data.realName || data.name,
- workType: data.workType === "full_time" ? "全职" : "兼职",
- workStatus: this.formatStatus(data.status),
- city: data.cityName || "",
- avatar: data.avatarUrl || "/static/touxiang.png",
- stationName: data.stationName || "",
- stationFullName: data.cityName && data.stationName ? `${data.cityName}/${data.stationName}` : data.stationName || "未分配站点"
- };
- } else {
- uni.showToast({ title: res.msg || "加载失败", icon: "none" });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/profile/index.vue:171", "加载用户信息失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- },
- // 格式化状态 @author steelwei
- formatStatus(status) {
- const statusMap = {
- "busy": "接单中",
- "resting": "休息中",
- "disabled": "已禁用"
- };
- return statusMap[status] || status;
- },
- navBack() {
- uni.navigateBack({ delta: 1 });
- },
- // 修改头像 @author steelwei
- changeAvatar() {
- uni.chooseImage({
- count: 1,
- success: async (res) => {
- const tempFilePath = res.tempFilePaths[0];
- uni.showLoading({ title: "上传中..." });
- try {
- const uploadRes = await uploadFile(tempFilePath);
- if (uploadRes.code === 200) {
- const { url, ossId } = uploadRes.data;
- const result = await updateAvatar(ossId);
- if (result.code === 200) {
- this.userInfo.avatar = url;
- uni.showToast({ title: "修改成功", icon: "success" });
- } else {
- uni.showToast({ title: result.msg || "修改失败", icon: "none" });
- }
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/profile/index.vue:216", "修改头像失败:", error);
- uni.showToast({ title: "上传失败", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- }
- });
- },
- editName() {
- uni.navigateTo({
- url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
- });
- },
- showStatusPicker() {
- this.isStatusPickerShow = true;
- },
- closeStatusPicker() {
- this.isStatusPickerShow = false;
- },
- // 选择状态 @author steelwei
- async selectStatus(statusText) {
- const statusMap = {
- "接单中": "busy",
- "休息中": "resting"
- };
- const status = statusMap[statusText];
- try {
- const res = await updateStatus(status);
- if (res.code === 200) {
- this.userInfo.workStatus = statusText;
- uni.showToast({ title: "状态已更新", icon: "success" });
- } else {
- uni.showToast({ title: res.msg || "修改失败", icon: "none" });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/profile/index.vue:256", "修改状态失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- } finally {
- this.closeStatusPicker();
- }
- },
- // 城市和站点级联选择器 @author steelwei
- async showCityPicker() {
- this.isCityPickerShow = true;
- if (this.fullTree.length === 0) {
- await this.loadAreaStationTree();
- }
- if (this.selectedPathway.length === 0) {
- this.resetCityPicker();
- }
- },
- async loadAreaStationTree() {
- try {
- uni.showLoading({ title: "加载中..." });
- const res = await getAreaStationList();
- const list = res.data || [];
- let map = {};
- let roots = [];
- list.forEach((node) => {
- map[node.id] = { ...node, children: [] };
- });
- list.forEach((node) => {
- if (node.parentId === 0 || !map[node.parentId]) {
- roots.push(map[node.id]);
- } else {
- map[node.parentId].children.push(map[node.id]);
- }
- });
- this.fullTree = roots;
- } catch (err) {
- formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载站点数据失败:", err);
- this.fullTree = [];
- } finally {
- uni.hideLoading();
- }
- },
- resetCityPicker() {
- this.selectStep = 0;
- this.selectedPathway = [];
- this.currentCityList = this.fullTree;
- },
- closeCityPicker() {
- this.isCityPickerShow = false;
- },
- selectCityItem(item) {
- this.selectedPathway[this.selectStep] = item;
- if (item.children && item.children.length > 0) {
- this.selectStep++;
- this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
- this.currentCityList = item.children;
- } else {
- this.selectedCityId = item.id;
- this.confirmCity();
- }
- },
- jumpToStep(step) {
- this.selectStep = step;
- if (step === 0) {
- this.currentCityList = this.fullTree;
- } else {
- const parent = this.selectedPathway[step - 1];
- this.currentCityList = parent ? parent.children : [];
- }
- },
- // 确认城市与站点选择 @author steelwei
- async confirmCity() {
- if (this.selectedPathway.length === 0) {
- uni.showToast({ title: "请选择站点", icon: "none" });
- return;
- }
- let stationNode = this.selectedPathway[this.selectedPathway.length - 1];
- const fullName = this.selectedPathway.map((i) => i.name).join("/");
- const reqData = {
- stationId: stationNode.id
- };
- try {
- const res = await updateCity(reqData);
- if (res.code === 200) {
- this.userInfo.stationFullName = fullName;
- uni.showToast({ title: "修改成功", icon: "success" });
- this.closeCityPicker();
- this.selectedPathway = [];
- } else {
- uni.showToast({ title: res.msg || "修改失败", icon: "none" });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/profile/index.vue:358", "修改失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- }
- }
- }
- };
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "头像"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("image", {
- class: "user-avatar",
- src: $data.userInfo.avatar,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- { class: "item-value" },
- vue.toDisplayString($data.userInfo.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- { class: "item-value-black" },
- vue.toDisplayString($data.userInfo.workStatus),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item no-border",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- { class: "item-value" },
- vue.toDisplayString($data.userInfo.stationFullName || "未分配站点"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]),
- $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "popup-mask",
- onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
- }, [
- vue.createElementVNode("view", {
- class: "popup-content",
- onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
- vue.createElementVNode("view", {
- class: "popup-item",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
- }, "接单中"),
- vue.createElementVNode("view", {
- class: "popup-item",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
- }, "休息中"),
- vue.createElementVNode("view", {
- class: "popup-cancel",
- onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
- }, "取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "popup-mask",
- onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
- }, [
- vue.createElementVNode("view", {
- class: "popup-content",
- onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "popup-header-row" }, [
- vue.createElementVNode("text", {
- class: "popup-btn-cancel",
- onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
- }, "取消"),
- vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市和站点"),
- vue.createElementVNode("text", {
- class: "popup-btn-confirm",
- onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
- }, "确定")
- ]),
- vue.createElementVNode("view", { class: "picker-body" }, [
- vue.createElementVNode("view", { class: "timeline-area" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.selectedPathway, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "timeline-item",
- key: index,
- onClick: ($event) => $options.jumpToStep(index)
- }, [
- vue.createElementVNode("view", { class: "timeline-dot" }),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "timeline-item active"
- }, [
- vue.createElementVNode("view", { class: "timeline-dot" }),
- vue.createElementVNode("text", null, "请选择")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "list-area"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.currentCityList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: item.id,
- onClick: ($event) => $options.selectCityItem(item)
- }, vue.toDisplayString(item.name), 9, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- style: { "padding": "20rpx", "color": "#999" }
- }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$i = {
- data() {
- return {
- authInfo: {
- realName: "",
- idCard: "",
- idCardFront: "",
- idCardBack: "",
- serviceTypes: [],
- authId: false,
- authQual: false,
- pendingAudit: false,
- qualImages: []
- }
- };
- },
- onLoad() {
- this.loadAuthInfo();
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- async loadAuthInfo() {
- try {
- const res = await getAuthInfo();
- if (res.code === 200 && res.data) {
- this.authInfo = {
- realName: res.data.realName || "",
- idCard: res.data.idCard || "",
- idCardFront: res.data.idCardFrontUrl || "",
- idCardBack: res.data.idCardBackUrl || "",
- serviceTypes: res.data.serviceTypeList || [],
- authId: res.data.authId || false,
- authQual: res.data.authQual || false,
- pendingAudit: res.data.pendingAudit || false,
- qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
- };
- }
- } catch (e) {
- formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
- uni.showToast({ title: "加载失败", icon: "none" });
- }
- },
- maskIdCard(idCard) {
- if (!idCard || idCard.length < 8)
- return idCard;
- return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
- },
- editAuth() {
- uni.showModal({
- title: "提示",
- content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
- success: (res) => {
- if (res.confirm) {
- uni.navigateTo({
- url: "/pages/mine/settings/auth/edit"
- });
- }
- }
- });
- }
- }
- };
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "section-header" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
- $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag-orange"
- }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tag-green"
- }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "tag-gray"
- }, "未认证"))
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "真实姓名"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($data.authInfo.realName || "未设置"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "证件号码"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "id-card-row" }, [
- $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "id-card-box green-bg"
- }, [
- vue.createElementVNode("image", {
- class: "id-card-img",
- src: $data.authInfo.idCardFront,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "id-card-box green-bg"
- }, [
- vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
- vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
- ])),
- $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "id-card-box green-bg"
- }, [
- vue.createElementVNode("image", {
- class: "id-card-img",
- src: $data.authInfo.idCardBack,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "id-card-box green-bg"
- }, [
- vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
- vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
- ]))
- ])
- ]),
- vue.createElementVNode("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "section-header" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "section-title" }, "服务类型")
- ]),
- vue.createElementVNode("view", { class: "tags-row" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.authInfo.serviceTypes, (type, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "service-tag",
- key: index
- },
- vue.toDisplayString(type),
- 1
- /* TEXT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "empty-text"
- }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "section-header" }, [
- vue.createElementVNode("view", { class: "orange-bar" }),
- vue.createElementVNode("text", { class: "section-title" }, "资质证书")
- ]),
- vue.createElementVNode(
- "text",
- { class: "sub-title" },
- vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "cert-row" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.authInfo.qualImages, (img, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "cert-box yellow-bg",
- key: index
- }, [
- vue.createElementVNode("image", {
- class: "cert-img",
- src: img,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "empty-text"
- }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "bottom-btn-area" }, [
- $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 0,
- class: "action-btn disabled",
- disabled: ""
- }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
- key: 1,
- class: "action-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
- }, "修改认证信息")),
- $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 2,
- class: "tips"
- }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
- key: 3,
- class: "tips"
- }, "修改认证信息需要重新审核,审核期间无法接单"))
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$h = {
- data() {
- return {
- idCardFront: "",
- idCardBack: "",
- idCardFrontOssId: "",
- idCardBackOssId: "",
- serviceOptions: [],
- selectedServices: [],
- qualifications: {},
- qualOssIds: {}
- };
- },
- async onLoad() {
- await this.loadServiceOptions();
- this.loadAuthInfo();
- },
- methods: {
- async loadServiceOptions() {
- try {
- const res = await getServiceTypes();
- this.serviceOptions = (res.data || []).map((item) => ({
- id: String(item.id),
- name: item.name
- }));
- } catch (e) {
- formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
- }
- },
- async loadAuthInfo() {
- try {
- uni.showLoading({ title: "加载中..." });
- const res = await getAuthInfo();
- if (res.code === 200 && res.data) {
- this.idCardFront = res.data.idCardFrontUrl || "";
- this.idCardBack = res.data.idCardBackUrl || "";
- this.idCardFrontOssId = res.data.idCardFront || "";
- this.idCardBackOssId = res.data.idCardBack || "";
- let serviceIds = [];
- if (res.data.serviceTypes) {
- serviceIds = [...new Set(
- String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
- )];
- }
- this.selectedServices = serviceIds;
- const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
- const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
- const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
- validNames.forEach((name, idx) => {
- const start = Math.floor(idx * qualUrlList.length / validNames.length);
- const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
- this.$set(this.qualifications, name, qualUrlList.slice(start, end));
- this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
- });
- }
- uni.hideLoading();
- } catch (e) {
- uni.hideLoading();
- formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
- uni.showToast({ title: "加载失败", icon: "none" });
- }
- },
- navBack() {
- uni.navigateBack({ delta: 1 });
- },
- chooseImage(side) {
- uni.chooseImage({
- count: 1,
- sizeType: ["compressed"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- const tempPath = res.tempFilePaths[0];
- if (side === "front") {
- this.idCardFront = tempPath;
- } else {
- this.idCardBack = tempPath;
- }
- try {
- uni.showLoading({ title: "上传中..." });
- const uploadRes = await uploadFile(tempPath);
- if (side === "front") {
- this.idCardFrontOssId = uploadRes.data.ossId;
- } else {
- this.idCardBackOssId = uploadRes.data.ossId;
- }
- uni.hideLoading();
- uni.showToast({ title: "上传成功", icon: "success" });
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
- uni.showToast({ title: "上传失败", icon: "none" });
- }
- }
- });
- },
- deleteImage(side) {
- if (side === "front") {
- this.idCardFront = "";
- this.idCardFrontOssId = "";
- } else {
- this.idCardBack = "";
- this.idCardBackOssId = "";
- }
- },
- getServiceName(serviceId) {
- const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
- return found ? found.name : "";
- },
- toggleService(service) {
- const index = this.selectedServices.indexOf(service.id);
- if (index > -1) {
- this.selectedServices.splice(index, 1);
- this.$delete(this.qualifications, service.name);
- this.$delete(this.qualOssIds, service.name);
- } else {
- this.selectedServices.push(service.id);
- this.$set(this.qualifications, service.name, []);
- this.$set(this.qualOssIds, service.name, []);
- }
- this.$forceUpdate();
- },
- chooseQualImage(service) {
- uni.chooseImage({
- count: 9,
- sizeType: ["compressed"],
- sourceType: ["album", "camera"],
- success: async (res) => {
- if (!this.qualifications[service]) {
- this.qualifications[service] = [];
- this.qualOssIds[service] = [];
- }
- for (const tempPath of res.tempFilePaths) {
- this.qualifications[service].push(tempPath);
- this.$forceUpdate();
- try {
- uni.showLoading({ title: "上传中..." });
- const uploadRes = await uploadFile(tempPath);
- this.qualOssIds[service].push(uploadRes.data.ossId);
- uni.hideLoading();
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
- }
- }
- }
- });
- },
- deleteQualImage(service, index) {
- this.qualifications[service].splice(index, 1);
- if (this.qualOssIds[service]) {
- this.qualOssIds[service].splice(index, 1);
- }
- this.$forceUpdate();
- },
- previewImage(service, index) {
- uni.previewImage({
- urls: this.qualifications[service],
- current: index
- });
- },
- async submitAuth() {
- if (!this.idCardFront || !this.idCardBack) {
- uni.showToast({ title: "请上传身份证正反面", icon: "none" });
- return;
- }
- if (this.selectedServices.length === 0) {
- uni.showToast({ title: "请选择服务类型", icon: "none" });
- return;
- }
- for (const serviceId of this.selectedServices) {
- const name = this.getServiceName(serviceId);
- if (!this.qualifications[name] || this.qualifications[name].length === 0) {
- uni.showToast({ title: `请上传${name}资质`, icon: "none" });
- return;
- }
- }
- uni.showModal({
- title: "提示",
- content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
- success: (res) => {
- if (res.confirm) {
- this.doSubmit();
- }
- }
- });
- },
- async doSubmit() {
- const allQualOssIds = [];
- Object.values(this.qualOssIds).forEach((ids) => {
- allQualOssIds.push(...ids);
- });
- const submitData = {
- idCardFront: this.idCardFrontOssId,
- idCardBack: this.idCardBackOssId,
- serviceTypes: this.selectedServices.join(","),
- // 逗号分隔的服务类型ID
- qualifications: allQualOssIds.join(",")
- // 逗号分隔的资质图片OSS ID
- };
- try {
- uni.showLoading({ title: "提交中..." });
- await updateAuthInfo(submitData);
- uni.hideLoading();
- uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 1500);
- } catch (err) {
- uni.hideLoading();
- formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
- uni.showToast({ title: "提交失败", icon: "none" });
- }
- }
- }
- };
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "warning-tip" }, [
- vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
- vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
- ]),
- vue.createElementVNode("view", { class: "section-card" }, [
- vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
- vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
- vue.createElementVNode("view", { class: "id-card-row" }, [
- vue.createElementVNode("view", {
- class: "id-card-upload",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
- }, [
- $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: $data.idCardFront,
- class: "id-card-img",
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "id-card-placeholder"
- }, [
- vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
- ])),
- $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "delete-btn",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
- }, "×")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
- ]),
- vue.createElementVNode("view", {
- class: "id-card-upload",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
- }, [
- $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: $data.idCardBack,
- class: "id-card-img",
- mode: "aspectFill"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "id-card-placeholder"
- }, [
- vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
- ])),
- $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "delete-btn",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
- }, "×")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "section-card" }, [
- vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
- vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
- vue.createElementVNode("view", { class: "service-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.serviceOptions, (service, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "service-item",
- key: service.id,
- onClick: ($event) => $options.toggleService(service)
- }, [
- vue.createElementVNode(
- "text",
- { class: "service-name" },
- vue.toDisplayString(service.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
- },
- [
- $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "section-card" }, [
- vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
- vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.selectedServices, (serviceId, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: serviceId,
- class: "qual-section"
- }, [
- vue.createElementVNode(
- "text",
- { class: "qual-title" },
- vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "qual-upload-row" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "qual-item",
- key: imgIndex,
- onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
- }, [
- vue.createElementVNode("image", {
- src: img,
- class: "qual-img",
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", {
- class: "delete-btn",
- onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
- }, "×", 8, ["onClick"])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", {
- class: "qual-upload-btn",
- onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
- }, [
- vue.createElementVNode("text", { class: "plus-icon" }, "+")
- ], 8, ["onClick"])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "empty-hint"
- }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "bottom-btn-area" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
- }, "提交审核")
- ])
- ]);
- }
- 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"]]);
- const _imports_1$3 = "/static/icons/shield.svg";
- const _sfc_main$g = {
- data() {
- return {
- hasShieldIcon: false
- // 如果没有盾牌图标资源,暂时隐藏或用文字代替
- };
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- editBank() {
- uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
- }
- }
- };
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "bank-card" }, [
- vue.createElementVNode("view", { class: "card-top" }, [
- vue.createElementVNode("view", { class: "bank-info" }, [
- vue.createElementVNode("view", { class: "bank-icon-circle" }, [
- vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
- ]),
- vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
- ]),
- vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
- ]),
- vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
- vue.createElementVNode("view", { class: "card-bg-circle" })
- ]),
- vue.createElementVNode("button", {
- class: "action-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
- }, "修改银行卡信息"),
- vue.createElementVNode("view", { class: "security-tip" }, [
- $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "shield-icon",
- src: _imports_1$3
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$f = {
- data() {
- return {
- phone: "",
- hasPassword: false
- };
- },
- onLoad() {
- this.loadProfile();
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- async loadProfile() {
- try {
- const res = await getMyProfile();
- if (res.code === 200 && res.data) {
- this.phone = res.data.phone || "";
- this.hasPassword = !!res.data.hasPassword;
- }
- } catch (e) {
- formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
- }
- },
- maskPhone(phone) {
- if (!phone || phone.length < 11)
- return phone;
- return phone.substring(0, 3) + "****" + phone.substring(7);
- },
- changeMobile() {
- uni.navigateTo({
- url: "/pages/mine/settings/security/change-phone"
- });
- },
- changePassword() {
- uni.navigateTo({
- url: "/pages/mine/settings/security/change-password"
- });
- },
- async deleteAccount() {
- uni.showModal({
- title: "警示",
- content: "注销账号后将无法恢复,确定要继续吗?",
- success: async (res) => {
- if (res.confirm) {
- try {
- const result = await deleteAccount();
- if (result.code === 200) {
- uni.showToast({ title: "账号已注销", icon: "success" });
- setTimeout(() => {
- uni.reLaunch({ url: "/pages/login/login" });
- }, 1500);
- } else {
- uni.showToast({ title: result.msg || "注销失败", icon: "none" });
- }
- } catch (e) {
- formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
- uni.showToast({ title: "注销失败", icon: "none" });
- }
- }
- }
- });
- }
- }
- };
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "手机号"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- { class: "item-value" },
- vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", {
- class: "list-item",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- { class: "item-value" },
- vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", {
- class: "list-item no-border",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
- }, [
- vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$e = {
- data() {
- return {
- name: ""
- };
- },
- onLoad(options) {
- if (options.name) {
- this.name = decodeURIComponent(options.name);
- }
- },
- methods: {
- navBack() {
- uni.navigateBack({ delta: 1 });
- },
- // 提交修改 @author steelwei
- async submitChange() {
- if (!this.name || !this.name.trim()) {
- uni.showToast({ title: "请输入姓名", icon: "none" });
- return;
- }
- if (this.name.trim().length < 2) {
- uni.showToast({ title: "姓名至少2个字符", icon: "none" });
- return;
- }
- uni.showLoading({ title: "提交中..." });
- try {
- const res = await updateName(this.name.trim());
- if (res.code === 200) {
- uni.showToast({
- title: "修改成功",
- icon: "success",
- duration: 2e3
- });
- uni.$emit("updateName", this.name.trim());
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 2e3);
- } else {
- uni.showToast({
- title: res.msg || "修改失败",
- icon: "none"
- });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- }
- }
- };
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "form-card" }, [
- vue.createElementVNode("view", { class: "form-item no-border" }, [
- vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "text",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
- placeholder: "请输入真实姓名",
- "placeholder-class": "placeholder",
- maxlength: "20"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.name]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-area" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
- }, "确认修改")
- ]),
- vue.createElementVNode("view", { class: "tips" }, [
- vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
- vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$d = {
- data() {
- return {
- oldPassword: "",
- newPassword: "",
- confirmPassword: ""
- };
- },
- methods: {
- navBack() {
- uni.navigateBack({ delta: 1 });
- },
- // 提交修改 @author steelwei
- async submitChange() {
- if (!this.oldPassword) {
- uni.showToast({ title: "请输入旧密码", icon: "none" });
- return;
- }
- if (!this.newPassword) {
- uni.showToast({ title: "请输入新密码", icon: "none" });
- return;
- }
- if (this.newPassword.length < 6 || this.newPassword.length > 20) {
- uni.showToast({ title: "密码长度为6-20位", icon: "none" });
- return;
- }
- if (this.newPassword !== this.confirmPassword) {
- uni.showToast({ title: "两次密码输入不一致", icon: "none" });
- return;
- }
- uni.showLoading({ title: "提交中..." });
- try {
- const res = await updatePassword(this.oldPassword, this.newPassword);
- if (res.code === 200) {
- uni.showToast({
- title: "修改成功",
- icon: "success",
- duration: 2e3
- });
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 2e3);
- } else {
- uni.showToast({
- title: res.msg || "修改失败",
- icon: "none"
- });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- }
- }
- };
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "form-card" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "password",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
- placeholder: "请输入旧密码",
- "placeholder-class": "placeholder"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.oldPassword]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "form-label" }, "新密码"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "password",
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
- placeholder: "请输入新密码(6-20位)",
- "placeholder-class": "placeholder"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.newPassword]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item no-border" }, [
- vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "password",
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
- placeholder: "请再次输入新密码",
- "placeholder-class": "placeholder"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.confirmPassword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-area" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
- }, "确认修改")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$c = {
- data() {
- return {
- phone: "",
- code: "",
- countdown: 0,
- timer: null
- };
- },
- onUnload() {
- if (this.timer) {
- clearInterval(this.timer);
- }
- },
- methods: {
- navBack() {
- uni.navigateBack({ delta: 1 });
- },
- // 发送验证码 @author steelwei
- sendCode() {
- if (!this.phone) {
- uni.showToast({ title: "请输入手机号", icon: "none" });
- return;
- }
- if (!/^1[3-9]\d{9}$/.test(this.phone)) {
- uni.showToast({ title: "手机号格式不正确", icon: "none" });
- return;
- }
- uni.showToast({ title: "验证码已发送", icon: "success" });
- this.countdown = 60;
- this.timer = setInterval(() => {
- this.countdown--;
- if (this.countdown <= 0) {
- clearInterval(this.timer);
- }
- }, 1e3);
- },
- // 提交修改 @author steelwei
- async submitChange() {
- if (!this.phone) {
- uni.showToast({ title: "请输入手机号", icon: "none" });
- return;
- }
- if (!/^1[3-9]\d{9}$/.test(this.phone)) {
- uni.showToast({ title: "手机号格式不正确", icon: "none" });
- return;
- }
- if (!this.code) {
- uni.showToast({ title: "请输入验证码", icon: "none" });
- return;
- }
- uni.showLoading({ title: "提交中..." });
- try {
- const res = await updatePhone(this.phone, this.code);
- if (res.code === 200) {
- uni.showToast({
- title: "修改成功",
- icon: "success",
- duration: 2e3
- });
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 2e3);
- } else {
- uni.showToast({
- title: res.msg || "修改失败",
- icon: "none"
- });
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
- uni.showToast({ title: "网络错误", icon: "none" });
- } finally {
- uni.hideLoading();
- }
- }
- }
- };
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "form-card" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "number",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
- placeholder: "请输入新手机号",
- "placeholder-class": "placeholder",
- maxlength: "11"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.phone]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item no-border" }, [
- vue.createElementVNode("text", { class: "form-label" }, "验证码"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "form-input",
- type: "number",
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
- placeholder: "请输入验证码",
- "placeholder-class": "placeholder",
- maxlength: "6"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.code]
- ]),
- vue.createElementVNode("button", {
- class: "code-btn",
- disabled: $data.countdown > 0,
- onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
- }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-area" }, [
- vue.createElementVNode("button", {
- class: "submit-btn",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
- }, "确认修改")
- ]),
- vue.createElementVNode("view", { class: "tips" }, [
- vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
- vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$b = {
- data() {
- return {};
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- },
- switchChange(type, e) {
- formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
- }
- }
- };
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", { class: "list-item" }, [
- vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
- vue.createElementVNode(
- "switch",
- {
- checked: "",
- color: "#FF5722",
- style: { "transform": "scale(0.8)" },
- onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
- },
- null,
- 32
- /* NEED_HYDRATION */
- )
- ]),
- vue.createElementVNode("view", { class: "list-item no-border" }, [
- vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
- vue.createElementVNode(
- "switch",
- {
- checked: "",
- color: "#FF5722",
- style: { "transform": "scale(0.8)" },
- onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
- },
- null,
- 32
- /* NEED_HYDRATION */
- )
- ])
- ]),
- vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
- ]);
- }
- 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"]]);
- const _sfc_main$a = {
- data() {
- return {};
- },
- methods: {
- navBack() {
- uni.navigateBack({
- delta: 1
- });
- }
- }
- };
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- vue.createElementVNode("view", { class: "logo-area" }, [
- vue.createElementVNode("image", {
- class: "app-logo",
- src: _imports_1$8,
- mode: "aspectFit"
- }),
- vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
- vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
- ]),
- vue.createElementVNode("view", { class: "group-card" }, [
- vue.createElementVNode("view", { class: "list-item" }, [
- vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "list-item" }, [
- vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ]),
- vue.createElementVNode("view", { class: "list-item no-border" }, [
- vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _imports_1$2 = "/static/icons/wallet_white.svg";
- const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
- const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
- const _sfc_main$9 = {
- data() {
- return {
- balance: "0.00",
- pendingBalance: "0.00",
- currentTab: 0,
- list: [],
- pageNum: 1,
- pageSize: 10,
- total: 0,
- loading: false
- };
- },
- computed: {
- displayList() {
- if (this.currentTab === 0)
- return this.list;
- if (this.currentTab === 1)
- return this.list.filter((item) => item.type === "income");
- if (this.currentTab === 2)
- return this.list.filter((item) => item.type === "expense");
- return [];
- }
- },
- onShow() {
- this.fetchData();
- this.fetchList(true);
- },
- onReachBottom() {
- this.fetchList();
- },
- methods: {
- async fetchData() {
- try {
- const res = await getBalanceOnApp();
- if (res.code === 200 && res.data) {
- this.balance = (res.data.balance / 100).toFixed(2);
- this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
- }
- },
- async fetchList(reset = false) {
- if (reset) {
- this.pageNum = 1;
- this.list = [];
- this.total = 0;
- }
- if (this.loading)
- return;
- if (!reset && this.list.length >= this.total && this.total !== 0)
- return;
- this.loading = true;
- try {
- const res = await pageBalanceOnApp({
- pageNum: this.pageNum,
- pageSize: this.pageSize
- });
- if (res.code === 200) {
- this.total = res.total || 0;
- const rows = res.rows || [];
- const mappedRows = rows.map((item) => {
- const isAdd = item.type === "add";
- const uiType = isAdd ? "income" : "expense";
- const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
- let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
- if (!isAdd) {
- amountStr = "-" + amountStr;
- }
- return {
- ...item,
- title,
- desc: item.reason || "",
- time: item.createTime || "",
- amount: amountStr,
- type: uiType,
- // 'income' or 'expense' for template class
- tag: title
- };
- });
- this.list = this.list.concat(mappedRows);
- this.pageNum++;
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
- } finally {
- this.loading = false;
- }
- },
- navBack() {
- uni.navigateBack();
- },
- navToBill() {
- uni.navigateTo({
- url: "/pages/mine/wallet/bill"
- });
- },
- switchTab(index) {
- this.currentTab = index;
- }
- }
- };
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "wallet-card" }, [
- vue.createElementVNode("view", { class: "bg-circle big" }),
- vue.createElementVNode("view", { class: "bg-circle small" }),
- vue.createElementVNode("view", { class: "card-content" }, [
- vue.createElementVNode("view", { class: "card-top" }, [
- vue.createElementVNode("view", { class: "app-info" }, [
- vue.createElementVNode("image", {
- class: "app-logo",
- src: _imports_1$2,
- mode: "aspectFit"
- }),
- vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
- ]),
- vue.createElementVNode("view", {
- class: "bill-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
- }, [
- vue.createElementVNode("text", null, "账单")
- ])
- ]),
- vue.createElementVNode("view", { class: "balance-container" }, [
- vue.createElementVNode("view", { class: "balance-main" }, [
- vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
- vue.createElementVNode(
- "text",
- { class: "balance-num" },
- vue.toDisplayString($data.balance),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "balance-pending" }, [
- vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
- vue.createElementVNode(
- "text",
- { class: "pending-num" },
- vue.toDisplayString($data.pendingBalance),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "record-container" }, [
- vue.createElementVNode("view", { class: "record-header" }, [
- vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
- vue.createElementVNode("view", {
- class: "header-more",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
- }, [
- vue.createElementVNode("text", null, "查看全部"),
- vue.createElementVNode("image", {
- class: "more-icon",
- src: _imports_2$2
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "tabs-row" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
- },
- [
- vue.createElementVNode("text", null, "全部"),
- $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
- onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
- },
- [
- vue.createElementVNode("text", null, "收入"),
- $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
- onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
- },
- [
- vue.createElementVNode("text", null, "支出"),
- $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "record-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.displayList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: index
- }, [
- vue.createElementVNode("view", { class: "item-left" }, [
- vue.createElementVNode(
- "text",
- { class: "item-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-desc" },
- vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-time" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
- },
- vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("view", { class: "item-tag" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.tag),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]);
- }
- 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"]]);
- const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
- const _sfc_main$8 = {
- data() {
- const d = /* @__PURE__ */ new Date();
- return {
- currentTab: 0,
- year: d.getFullYear(),
- month: d.getMonth() + 1,
- groups: []
- };
- },
- computed: {
- currentDate() {
- return `${this.year}-${String(this.month).padStart(2, "0")}`;
- },
- displayGroups() {
- if (this.currentTab === 0)
- return this.groups;
- return this.groups.map((group) => {
- const filteredItems = group.items.filter((item) => {
- const type = this.currentTab === 1 ? "income" : "expense";
- return item.type === type;
- });
- return {
- ...group,
- items: filteredItems
- };
- }).filter((group) => group.items.length > 0);
- }
- },
- onShow() {
- this.fetchData();
- },
- methods: {
- async fetchData() {
- try {
- const res = await listBalanceOnApp({
- year: this.year,
- month: this.month
- });
- if (res.code === 200) {
- const list = res.data || [];
- let incomeTotal = 0;
- let expenseTotal = 0;
- const items = list.map((item) => {
- const isAdd = item.type === "add";
- const uiType = isAdd ? "income" : "expense";
- const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
- let amountVal = Math.abs(item.amount) / 100;
- if (isAdd) {
- incomeTotal += amountVal;
- } else {
- expenseTotal += amountVal;
- }
- let amountStr = amountVal.toFixed(2);
- if (!isAdd)
- amountStr = "-" + amountStr;
- let timeStr = item.createTime || "";
- if (timeStr.length >= 16) {
- timeStr = timeStr.substring(5, 16);
- }
- return {
- ...item,
- title,
- desc: item.reason || "",
- time: timeStr,
- amount: amountStr,
- type: uiType,
- tag: title
- };
- });
- this.groups = [
- {
- month: `${this.month}月 ${this.year}`,
- income: incomeTotal.toFixed(2),
- expense: expenseTotal.toFixed(2),
- items
- }
- ];
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
- }
- },
- onDateChange(e) {
- const val = e.detail.value;
- const [y, m] = val.split("-");
- this.year = parseInt(y, 10);
- this.month = parseInt(m, 10);
- this.fetchData();
- },
- navBack() {
- uni.navigateBack();
- },
- switchTab(index) {
- this.currentTab = index;
- }
- }
- };
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "content-area" }, [
- vue.createElementVNode("view", { class: "filter-area" }, [
- vue.createElementVNode("view", { class: "tabs-row" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
- },
- [
- vue.createElementVNode("text", null, "全部"),
- $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
- },
- [
- vue.createElementVNode("text", null, "收入"),
- $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
- },
- [
- vue.createElementVNode("text", null, "支出"),
- $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "date-picker-wrap" }, [
- vue.createElementVNode("picker", {
- mode: "date",
- fields: "month",
- value: $options.currentDate,
- onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
- }, [
- vue.createElementVNode("view", { class: "date-picker" }, [
- vue.createElementVNode(
- "text",
- { class: "date-text" },
- vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
- ])
- ], 40, ["value"])
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "bill-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.displayGroups, (group, gIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: gIndex,
- class: "month-group"
- }, [
- vue.createElementVNode("view", { class: "group-header" }, [
- vue.createElementVNode(
- "text",
- { class: "month-title" },
- vue.toDisplayString(group.month),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "month-summary" },
- "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
- 1
- /* TEXT */
- )
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(group.items, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: index
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["item-icon-box", item.type])
- },
- [
- vue.createElementVNode(
- "text",
- { class: "item-icon-symbol" },
- vue.toDisplayString(item.type === "income" ? "+" : "-"),
- 1
- /* TEXT */
- )
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "item-center" }, [
- vue.createElementVNode(
- "text",
- { class: "item-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-desc" },
- vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
- },
- vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("view", { class: "item-tag" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.tag),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "list-padding-bottom" })
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$7 = {
- data() {
- return {
- currentIndex: 0,
- profile: null,
- levels: [],
- // 从后端获取的等级配置
- rightsList: [],
- // 从后端获取的所有权益列表
- isPopupShow: false,
- currentBenefit: null,
- pageLoading: true
- };
- },
- computed: {
- currentLevel() {
- return this.processedLevels[this.currentIndex];
- },
- // 合并等级与对应的权益详细信息
- processedLevels() {
- if (!this.levels.length)
- return [];
- return this.levels.map((lvl) => {
- const benefits = (lvl.rights || []).map((rightId) => {
- return this.rightsList.find((r) => r.id === rightId);
- }).filter(Boolean);
- return {
- ...lvl,
- isCurrent: this.profile && this.profile.level === lvl.lvNo,
- benefits
- };
- }).sort((a, b) => a.lvNo - b.lvNo);
- }
- },
- async onLoad() {
- await this.initData();
- },
- methods: {
- async initData() {
- this.pageLoading = true;
- uni.showLoading({ title: "加载中..." });
- try {
- const [profileRes, levelsRes, rightsRes] = await Promise.all([
- getMyProfile(),
- listAllLevelConfigs(),
- listAllLevelRights()
- ]);
- this.profile = profileRes.data;
- this.levels = levelsRes.data || [];
- this.rightsList = rightsRes.data || [];
- if (this.profile) {
- const idx = this.processedLevels.findIndex((lvl) => lvl.lvNo === this.profile.level);
- if (idx !== -1) {
- this.currentIndex = idx;
- }
- }
- } catch (err) {
- formatAppLog("error", "at pages/mine/level/index.vue:155", "初始化等级页面失败:", err);
- uni.showToast({ title: "数据加载失败", icon: "none" });
- } finally {
- this.pageLoading = false;
- uni.hideLoading();
- }
- },
- navBack() {
- uni.navigateBack();
- },
- swiperChange(e) {
- this.currentIndex = e.detail.current;
- },
- changeLevel(index) {
- this.currentIndex = index;
- },
- showBenefitDetail(benefit) {
- this.currentBenefit = benefit;
- this.isPopupShow = true;
- },
- closePopup() {
- this.isPopupShow = false;
- }
- }
- };
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "custom-header" }, [
- vue.createElementVNode("view", {
- class: "header-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
- vue.createElementVNode("view", { class: "header-right" })
- ]),
- vue.createElementVNode("view", { class: "header-placeholder" }),
- !$data.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "swiper-container"
- }, [
- vue.createElementVNode("swiper", {
- class: "level-swiper",
- "previous-margin": "80rpx",
- "next-margin": "80rpx",
- current: $data.currentIndex,
- onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.processedLevels, (level, index) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", {
- key: index,
- onClick: ($event) => $options.changeLevel(index)
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "level-card",
- style: vue.normalizeStyle({
- transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)",
- backgroundImage: "url(" + level.backgroundUrl + ")",
- backgroundSize: "cover",
- backgroundPosition: "center"
- })
- },
- [
- vue.createElementVNode("view", { class: "card-content" }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode(
- "view",
- { class: "level-badge" },
- "L" + vue.toDisplayString(index + 1),
- 1
- /* TEXT */
- ),
- level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "current-badge"
- }, "当前等级")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "text",
- { class: "level-name" },
- vue.toDisplayString(level.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "level-score" },
- "所需积分: " + vue.toDisplayString(level.upgradePoints || 0),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "crown-overlay",
- src: _imports_1$4,
- mode: "aspectFit"
- })
- ])
- ],
- 4
- /* STYLE */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 40, ["current"]),
- vue.createElementVNode("view", { class: "swiper-dots" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.processedLevels, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
- key: index
- },
- null,
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "benefits-title-row"
- }, [
- vue.createElementVNode("text", { class: "benefits-title" }, "专属权益"),
- vue.createElementVNode(
- "text",
- { class: "benefits-count" },
- "(" + vue.toDisplayString($options.currentLevel.benefits ? $options.currentLevel.benefits.length : 0) + ")",
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "benefits-grid"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.currentLevel.benefits, (benefit, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "benefit-item",
- key: index,
- onClick: ($event) => $options.showBenefitDetail(benefit)
- }, [
- vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
- benefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "benefit-icon",
- src: benefit.iconUrl,
- mode: "aspectFit"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "benefit-icon-placeholder"
- },
- vue.toDisplayString(benefit.name[0]),
- 1
- /* TEXT */
- ))
- ]),
- vue.createElementVNode(
- "text",
- { class: "benefit-name" },
- vue.toDisplayString(benefit.name),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- !$options.currentLevel.benefits || $options.currentLevel.benefits.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "empty-benefits"
- }, [
- vue.createElementVNode("text", null, "该等级暂无特殊权益")
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
- onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
- onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
- }, ["stop", "prevent"]))
- },
- [
- vue.createElementVNode("view", {
- class: "popup-modal",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
- }, ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
- $data.currentBenefit && $data.currentBenefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "benefit-icon-large",
- src: $data.currentBenefit.iconUrl,
- mode: "aspectFit"
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "benefit-icon-placeholder-large"
- },
- vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
- 1
- /* TEXT */
- ))
- ]),
- vue.createElementVNode(
- "text",
- { class: "popup-title" },
- vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "popup-desc" },
- vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.statement : ""),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("button", {
- class: "popup-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
- }, "我知道了")
- ])
- ],
- 34
- /* CLASS, NEED_HYDRATION */
- )
- ]);
- }
- 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"]]);
- const _imports_1$1 = "/static/icons/icon_order_msg.svg";
- const _imports_2$1 = "/static/icons/icon_system_msg.svg";
- const _sfc_main$6 = {
- data() {
- return {};
- },
- methods: {
- navBack() {
- uni.navigateBack();
- },
- navToOrderMsg() {
- uni.navigateTo({
- url: "/pages/mine/message/order"
- });
- },
- navToSystemMsg() {
- uni.navigateTo({
- url: "/pages/mine/message/system"
- });
- }
- }
- };
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
- vue.createElementVNode("view", { class: "nav-right" }, [
- vue.createElementVNode("view", { class: "more-dots" }, [
- vue.createElementVNode("view", { class: "dot" }),
- vue.createElementVNode("view", { class: "dot" }),
- vue.createElementVNode("view", { class: "dot" })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "nav-placeholder" }),
- vue.createElementVNode("view", { class: "message-list" }, [
- vue.createElementVNode("view", {
- class: "message-item",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
- }, [
- vue.createElementVNode("view", { class: "icon-wrapper" }, [
- vue.createElementVNode("image", {
- class: "msg-icon",
- src: _imports_1$1
- }),
- vue.createElementVNode("view", { class: "red-dot-badge" })
- ]),
- vue.createElementVNode("view", { class: "content-wrapper" }, [
- vue.createElementVNode("view", { class: "top-row" }, [
- vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
- vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
- ]),
- vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
- ])
- ]),
- vue.createElementVNode("view", {
- class: "message-item",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
- }, [
- vue.createElementVNode("view", { class: "icon-wrapper" }, [
- vue.createElementVNode("image", {
- class: "msg-icon",
- src: _imports_2$1
- })
- ]),
- vue.createElementVNode("view", { class: "content-wrapper" }, [
- vue.createElementVNode("view", { class: "top-row" }, [
- vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
- vue.createElementVNode("text", { class: "msg-time" }, "7天前")
- ]),
- vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$5 = {
- methods: {
- navBack() {
- uni.navigateBack();
- }
- }
- };
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "nav-placeholder" }),
- vue.createElementVNode("view", { class: "msg-group" }, [
- vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
- vue.createElementVNode("view", { class: "msg-card" }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
- vue.createElementVNode("view", { class: "red-dot" })
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
- ]),
- vue.createElementVNode("view", { class: "card-footer" }, [
- vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "msg-card" }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
- ]),
- vue.createElementVNode("view", { class: "card-footer" }, [
- vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "msg-group" }, [
- vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
- vue.createElementVNode("view", { class: "msg-card" }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
- ]),
- vue.createElementVNode("view", { class: "card-footer" }, [
- vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
- vue.createElementVNode("image", {
- class: "arrow-icon",
- src: _imports_3
- })
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$4 = {
- methods: {
- navBack() {
- uni.navigateBack();
- },
- navToDetail() {
- uni.navigateTo({
- url: "/pages/mine/message/detail"
- });
- }
- }
- };
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "nav-placeholder" }),
- vue.createElementVNode("view", { class: "sys-msg-list" }, [
- vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
- vue.createElementVNode("view", {
- class: "sys-card",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
- }, [
- vue.createElementVNode("view", { class: "sys-header" }, [
- vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
- vue.createElementVNode("view", { class: "red-dot" })
- ]),
- vue.createElementVNode("view", { class: "sys-content" }, [
- vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
- ]),
- vue.createElementVNode("view", { class: "sys-footer" }, [
- vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
- vue.createElementVNode("view", { class: "check-more" }, [
- vue.createElementVNode("text", null, "查看详情"),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "sys-card" }, [
- vue.createElementVNode("view", { class: "sys-header" }, [
- vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
- ]),
- vue.createElementVNode("view", { class: "sys-content" }, [
- vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
- ]),
- vue.createElementVNode("view", { class: "sys-footer" }, [
- vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
- vue.createElementVNode("view", { class: "check-more" }, [
- vue.createElementVNode("text", null, "查看详情"),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_3
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
- vue.createElementVNode("view", { class: "sys-card" }, [
- vue.createElementVNode("view", { class: "sys-header" }, [
- vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
- ]),
- vue.createElementVNode("view", { class: "sys-content" }, [
- vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
- ]),
- vue.createElementVNode("view", { class: "sys-footer" }, [
- vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
- vue.createElementVNode("view", { class: "check-more" }, [
- vue.createElementVNode("text", null, "查看详情"),
- vue.createElementVNode("image", {
- class: "arrow-icon-small",
- src: _imports_3
- })
- ])
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$3 = {
- methods: {
- navBack() {
- uni.navigateBack();
- }
- }
- };
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0,
- style: { "transform": "rotate(180deg)" }
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "nav-placeholder" }),
- vue.createElementVNode("view", { class: "detail-content" }, [
- vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
- vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
- vue.createElementVNode("view", { class: "detail-body" }, [
- vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
- ]),
- vue.createElementVNode("view", { class: "detail-footer" }, [
- vue.createElementVNode("view", { class: "divider" }),
- vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
- ])
- ])
- ]);
- }
- 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"]]);
- const _imports_1 = "/static/icons/diamond_white.svg";
- const _imports_2 = "/static/icons/star_decor.svg";
- const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
- const _sfc_main$2 = {
- data() {
- return {
- points: 0,
- currentTab: 0,
- list: [],
- pageNum: 1,
- pageSize: 10,
- total: 0,
- loading: false
- };
- },
- computed: {
- displayList() {
- if (this.currentTab === 0)
- return this.list;
- const type = this.currentTab === 1 ? "income" : "expense";
- return this.list.filter((item) => item.type === type);
- }
- },
- onShow() {
- this.fetchPoints();
- this.fetchList(true);
- },
- onReachBottom() {
- this.fetchList();
- },
- methods: {
- async fetchPoints() {
- try {
- const res = await pointsOnApp();
- if (res.code === 200) {
- this.points = res.data || 0;
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
- }
- },
- async fetchList(reset = false) {
- if (reset) {
- this.pageNum = 1;
- this.list = [];
- this.total = 0;
- }
- if (this.loading)
- return;
- if (!reset && this.list.length >= this.total && this.total !== 0)
- return;
- this.loading = true;
- try {
- const res = await pagePointsOnApp({
- pageNum: this.pageNum,
- pageSize: this.pageSize
- });
- if (res.code === 200) {
- this.total = res.total || 0;
- const rows = res.rows || [];
- const mappedRows = rows.map((item) => {
- const isAdd = item.type === "add";
- const uiType = isAdd ? "income" : "expense";
- const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
- let amountStr = Math.abs(item.amount);
- if (!isAdd) {
- amountStr = "-" + amountStr;
- }
- return {
- ...item,
- title,
- desc: item.reason || "",
- time: item.createTime || "",
- amount: amountStr,
- type: uiType,
- tag: title
- };
- });
- this.list = this.list.concat(mappedRows);
- this.pageNum++;
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
- } finally {
- this.loading = false;
- }
- },
- navBack() {
- uni.navigateBack();
- },
- navToDetail() {
- uni.navigateTo({
- url: "/pages/mine/points/detail"
- });
- },
- navToEquity() {
- },
- switchTab(index) {
- this.currentTab = index;
- }
- }
- };
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "points-card" }, [
- vue.createElementVNode("view", { class: "card-header" }, [
- vue.createElementVNode("view", {
- class: "equity-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
- }, [
- vue.createElementVNode("image", {
- class: "equity-icon",
- src: _imports_1
- }),
- vue.createElementVNode("text", null, "积分权益")
- ]),
- vue.createElementVNode("view", {
- class: "detail-link",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
- }, [
- vue.createElementVNode("text", null, "明细")
- ])
- ]),
- vue.createElementVNode("view", { class: "card-body" }, [
- vue.createElementVNode("text", { class: "label" }, "当前积分"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($data.points),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("image", {
- class: "bg-decor",
- src: _imports_2,
- mode: "aspectFit"
- })
- ]),
- vue.createElementVNode("view", { class: "record-container" }, [
- vue.createElementVNode("view", { class: "record-header" }, [
- vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
- vue.createElementVNode("view", {
- class: "header-more",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
- }, [
- vue.createElementVNode("text", null, "查看全部"),
- vue.createElementVNode("image", {
- class: "more-icon",
- src: _imports_3
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "tabs-row" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
- onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
- },
- [
- vue.createElementVNode("text", null, "全部"),
- $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
- onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
- },
- [
- vue.createElementVNode("text", null, "获取"),
- $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
- onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
- },
- [
- vue.createElementVNode("text", null, "扣减"),
- $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "record-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.displayList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: index
- }, [
- vue.createElementVNode("view", { class: "item-left" }, [
- vue.createElementVNode(
- "text",
- { class: "item-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-desc" },
- vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-time" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
- },
- vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("view", { class: "item-tag" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.tag),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]);
- }
- 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"]]);
- const bizTypeMap = fulfillerEnum.FlfPointsBizType;
- const _sfc_main$1 = {
- data() {
- const d = /* @__PURE__ */ new Date();
- return {
- currentTab: 0,
- year: d.getFullYear(),
- month: d.getMonth() + 1,
- groups: []
- };
- },
- computed: {
- currentDate() {
- return `${this.year}-${String(this.month).padStart(2, "0")}`;
- },
- displayGroups() {
- if (this.currentTab === 0)
- return this.groups;
- return this.groups.map((group) => {
- const filteredItems = group.items.filter((item) => {
- const type = this.currentTab === 1 ? "income" : "expense";
- return item.type === type;
- });
- return {
- ...group,
- items: filteredItems
- };
- }).filter((group) => group.items.length > 0);
- }
- },
- onShow() {
- this.fetchData();
- },
- methods: {
- async fetchData() {
- try {
- const res = await listPointsOnApp({
- year: this.year,
- month: this.month
- });
- if (res.code === 200) {
- const list = res.data || [];
- let incomeTotal = 0;
- let expenseTotal = 0;
- const items = list.map((item) => {
- const isAdd = item.type === "add";
- const uiType = isAdd ? "income" : "expense";
- const title = bizTypeMap[item.bizType] || item.bizType || "其他";
- let amountVal = Math.abs(item.amount);
- if (isAdd) {
- incomeTotal += amountVal;
- } else {
- expenseTotal += amountVal;
- }
- let amountStr = String(amountVal);
- if (!isAdd)
- amountStr = "-" + amountStr;
- let timeStr = item.createTime || "";
- if (timeStr.length >= 16) {
- timeStr = timeStr.substring(5, 16);
- }
- return {
- ...item,
- title,
- desc: item.reason || "",
- time: timeStr,
- amount: amountStr,
- type: uiType,
- tag: title
- };
- });
- this.groups = [
- {
- month: `${this.month}月 ${this.year}`,
- income: String(incomeTotal),
- expense: String(expenseTotal),
- items
- }
- ];
- }
- } catch (error) {
- formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
- }
- },
- onDateChange(e) {
- const val = e.detail.value;
- const [y, m] = val.split("-");
- this.year = parseInt(y, 10);
- this.month = parseInt(m, 10);
- this.fetchData();
- },
- navBack() {
- uni.navigateBack();
- },
- switchTab(index) {
- this.currentTab = index;
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "nav-bar" }, [
- vue.createElementVNode("view", {
- class: "nav-left",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
- }, [
- vue.createElementVNode("image", {
- class: "back-icon",
- src: _imports_0
- })
- ]),
- vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
- vue.createElementVNode("view", { class: "nav-right" })
- ]),
- vue.createElementVNode("view", { class: "content-area" }, [
- vue.createElementVNode("view", { class: "filter-area" }, [
- vue.createElementVNode("view", { class: "tabs-row" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
- },
- [
- vue.createElementVNode("text", null, "全部"),
- $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
- },
- [
- vue.createElementVNode("text", null, "获取"),
- $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
- },
- [
- vue.createElementVNode("text", null, "扣减"),
- $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tab-line"
- })) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "date-picker-wrap" }, [
- vue.createElementVNode("picker", {
- mode: "date",
- fields: "month",
- value: $options.currentDate,
- onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
- }, [
- vue.createElementVNode("view", { class: "date-picker" }, [
- vue.createElementVNode(
- "text",
- { class: "date-text" },
- vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
- ])
- ], 40, ["value"])
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "bill-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.displayGroups, (group, gIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: gIndex,
- class: "month-group"
- }, [
- vue.createElementVNode("view", { class: "group-header" }, [
- vue.createElementVNode(
- "text",
- { class: "month-title" },
- vue.toDisplayString(group.month),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "month-summary" },
- "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
- 1
- /* TEXT */
- )
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(group.items, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "list-item",
- key: index
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["item-icon-box", item.type])
- },
- [
- vue.createElementVNode(
- "text",
- { class: "item-icon-symbol" },
- vue.toDisplayString(item.type === "income" ? "+" : "-"),
- 1
- /* TEXT */
- )
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "item-center" }, [
- vue.createElementVNode(
- "text",
- { class: "item-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "item-desc" },
- vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
- },
- vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode("view", { class: "item-tag" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.tag),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "list-padding-bottom" })
- ])
- ])
- ]);
- }
- const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
- __definePage("pages/login/login", PagesLoginLogin);
- __definePage("pages/recruit/landing", PagesRecruitLanding);
- __definePage("pages/recruit/form", PagesRecruitForm);
- __definePage("pages/recruit/auth", PagesRecruitAuth);
- __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
- __definePage("pages/recruit/success", PagesRecruitSuccess);
- __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
- __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
- __definePage("pages/home/index", PagesHomeIndex);
- __definePage("pages/home/work-status", PagesHomeWorkStatus);
- __definePage("pages/orders/index", PagesOrdersIndex);
- __definePage("pages/orders/detail", PagesOrdersDetail);
- __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
- __definePage("pages/mine/order-stats", PagesMineOrderStats);
- __definePage("pages/mine/rewards", PagesMineRewards);
- __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
- __definePage("pages/mine/index", PagesMineIndex);
- __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
- __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
- __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
- __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
- __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
- __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
- __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
- __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
- __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
- __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
- __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
- __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
- __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
- __definePage("pages/mine/level/index", PagesMineLevelIndex);
- __definePage("pages/mine/message/index", PagesMineMessageIndex);
- __definePage("pages/mine/message/order", PagesMineMessageOrder);
- __definePage("pages/mine/message/system", PagesMineMessageSystem);
- __definePage("pages/mine/message/detail", PagesMineMessageDetail);
- __definePage("pages/mine/points/index", PagesMinePointsIndex);
- __definePage("pages/mine/points/detail", PagesMinePointsDetail);
- const _sfc_main = {
- onLaunch: function() {
- formatAppLog("log", "at App.vue:7", "App Launch");
- if (isLoggedIn()) {
- startGpsTimer();
- uni.switchTab({
- url: "/pages/home/index"
- });
- }
- },
- onShow: function() {
- formatAppLog("log", "at App.vue:17", "App Show");
- },
- onHide: function() {
- formatAppLog("log", "at App.vue:20", "App Hide");
- }
- };
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
- function createApp() {
- const app = vue.createVueApp(App);
- return {
- app
- };
- }
- const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
- uni.Vuex = __Vuex__;
- uni.Pinia = __Pinia__;
- __app__.provide("__globalStyles", __uniConfig.styles);
- __app__._component.mpType = "app";
- __app__._component.render = () => {
- };
- __app__.mount("#app");
- })(Vue);
|