app-service.js 472 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal();
  15. ArrayBuffer = global.ArrayBuffer;
  16. Int8Array = global.Int8Array;
  17. Uint8Array = global.Uint8Array;
  18. Uint8ClampedArray = global.Uint8ClampedArray;
  19. Int16Array = global.Int16Array;
  20. Uint16Array = global.Uint16Array;
  21. Int32Array = global.Int32Array;
  22. Uint32Array = global.Uint32Array;
  23. Float32Array = global.Float32Array;
  24. Float64Array = global.Float64Array;
  25. BigInt64Array = global.BigInt64Array;
  26. BigUint64Array = global.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. const _export_sfc = (sfc, props) => {
  35. const target = sfc.__vccOpts || sfc;
  36. for (const [key, val] of props) {
  37. target[key] = val;
  38. }
  39. return target;
  40. };
  41. const _sfc_main$D = {
  42. name: "privacy-popup",
  43. props: {
  44. visible: {
  45. type: Boolean,
  46. default: false
  47. },
  48. title: {
  49. type: String,
  50. default: "协议标题"
  51. },
  52. content: {
  53. type: String,
  54. // 备用,主要用 slot
  55. default: ""
  56. }
  57. },
  58. methods: {
  59. close() {
  60. this.$emit("close");
  61. }
  62. }
  63. };
  64. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  65. return $props.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  66. key: 0,
  67. class: "popup-mask",
  68. onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  69. }, ["stop"]))
  70. }, [
  71. vue.createElementVNode("view", { class: "popup-content" }, [
  72. vue.createElementVNode("view", { class: "popup-header" }, [
  73. vue.createElementVNode(
  74. "text",
  75. { class: "popup-title" },
  76. vue.toDisplayString($props.title),
  77. 1
  78. /* TEXT */
  79. ),
  80. vue.createElementVNode("view", {
  81. class: "close-icon",
  82. onClick: _cache[0] || (_cache[0] = (...args) => $options.close && $options.close(...args))
  83. }, "×")
  84. ]),
  85. vue.createElementVNode("scroll-view", {
  86. "scroll-y": "",
  87. class: "popup-body"
  88. }, [
  89. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  90. vue.createElementVNode(
  91. "text",
  92. { class: "default-text" },
  93. vue.toDisplayString($props.content),
  94. 1
  95. /* TEXT */
  96. )
  97. ], true)
  98. ]),
  99. vue.createElementVNode("view", { class: "popup-footer" }, [
  100. vue.createElementVNode("button", {
  101. class: "confirm-btn",
  102. onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args))
  103. }, "我知道了")
  104. ])
  105. ])
  106. ])) : vue.createCommentVNode("v-if", true);
  107. }
  108. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-af3fbef1"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/privacy-popup/privacy-popup.vue"]]);
  109. function formatAppLog(type, filename, ...args) {
  110. if (uni.__log__) {
  111. uni.__log__(type, filename, ...args);
  112. } else {
  113. console[type].apply(console, [...args, filename]);
  114. }
  115. }
  116. function resolveEasycom(component, easycom) {
  117. return typeof component === "string" ? easycom : component;
  118. }
  119. const BASE_URL = "http://192.168.1.118:8080";
  120. const CLIENT_ID = "3";
  121. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  122. const PLATFORM_ID = 2;
  123. const TENANT_ID = "000000";
  124. const TOKEN_KEY = "fulfiller_token";
  125. const USER_INFO_KEY = "fulfiller_user_info";
  126. function getToken() {
  127. return uni.getStorageSync(TOKEN_KEY) || "";
  128. }
  129. function setToken(token) {
  130. uni.setStorageSync(TOKEN_KEY, token);
  131. }
  132. function removeToken() {
  133. uni.removeStorageSync(TOKEN_KEY);
  134. }
  135. function isLoggedIn() {
  136. return !!getToken();
  137. }
  138. function removeUserInfo() {
  139. uni.removeStorageSync(USER_INFO_KEY);
  140. }
  141. function clearAuth() {
  142. removeToken();
  143. removeUserInfo();
  144. }
  145. function request(options = {}) {
  146. const {
  147. url,
  148. method = "GET",
  149. data,
  150. header = {},
  151. needToken = true
  152. } = options;
  153. const headers = {
  154. "Content-Type": "application/json;charset=utf-8",
  155. "clientid": CLIENT_ID,
  156. "X-Platform-Code": PLATFORM_CODE,
  157. ...header
  158. };
  159. if (needToken) {
  160. const token = getToken();
  161. if (token) {
  162. headers["Authorization"] = "Bearer " + token;
  163. }
  164. }
  165. return new Promise((resolve, reject) => {
  166. uni.request({
  167. url: BASE_URL + url,
  168. method: method.toUpperCase(),
  169. data,
  170. header: headers,
  171. success: (res) => {
  172. formatAppLog("log", "at utils/request.js:50", res);
  173. const statusCode = res.statusCode;
  174. const code = res.data.code;
  175. res.data.msg;
  176. res.data.data;
  177. if (statusCode !== 200) {
  178. const msg = msg || `请求失败(${statusCode})`;
  179. uni.showToast({ title: msg, icon: "none" });
  180. return reject(new Error(msg));
  181. }
  182. if (code === 401) {
  183. clearAuth();
  184. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  185. setTimeout(() => {
  186. uni.reLaunch({ url: "/pages/login/login" });
  187. }, 1500);
  188. return reject(new Error("未授权"));
  189. }
  190. resolve(res.data);
  191. },
  192. fail: (err) => {
  193. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  194. reject(err);
  195. }
  196. });
  197. });
  198. }
  199. function loginByPassword(username, password) {
  200. return request({
  201. url: "/auth/login",
  202. method: "POST",
  203. needToken: false,
  204. data: {
  205. tenantId: TENANT_ID,
  206. platformId: PLATFORM_ID,
  207. username,
  208. password,
  209. clientId: CLIENT_ID,
  210. grantType: "fulfiller_password"
  211. // 使用履约者专用认证策略
  212. }
  213. });
  214. }
  215. function loginBySms(phonenumber, smsCode) {
  216. return request({
  217. url: "/auth/login",
  218. method: "POST",
  219. needToken: false,
  220. data: {
  221. tenantId: TENANT_ID,
  222. platformId: PLATFORM_ID,
  223. phonenumber,
  224. smsCode,
  225. clientId: CLIENT_ID,
  226. grantType: "fulfiller_sms"
  227. // 使用履约者专用认证策略
  228. }
  229. });
  230. }
  231. function sendSmsCode(phonenumber) {
  232. return request({
  233. url: "/resource/sms/code",
  234. method: "GET",
  235. needToken: false,
  236. data: { phonenumber }
  237. });
  238. }
  239. function logout() {
  240. return request({
  241. url: "/auth/logout",
  242. method: "POST"
  243. });
  244. }
  245. const logic$9 = {
  246. data() {
  247. return {
  248. currentTab: 0,
  249. // 0: 免密, 1: 密码
  250. mobile: "",
  251. code: "",
  252. password: "",
  253. showPassword: false,
  254. isAgreed: false,
  255. countDown: 0,
  256. timer: null,
  257. showAgreementModal: false,
  258. agreementTitle: "",
  259. agreementContent: "",
  260. loginLoading: false
  261. };
  262. },
  263. methods: {
  264. showAgreement(type) {
  265. this.agreementTitle = type === 1 ? "用户服务协议" : "隐私政策";
  266. if (type === 1) {
  267. this.agreementContent = "1. 服务条款\n欢迎使用宠宝平台。您在使用本服务时需遵守以下条款...\n\n2. 用户责任\n用户需对自己的行为负责...\n\n3. 账号管理\n请妥善保管您的账号密码...";
  268. } else {
  269. this.agreementContent = "1. 信息收集\n为了提供服务,我们需要收集您的手机号、地理位置、设备信息等必要数据。\n\n2. 信息使用\n您的位置信息将用于订单匹配和路径规划;您的联系方式将用于接单通知和客户沟通。\n\n3. 信息保护\n我们将采取严格的安全措施保护您的个人信息,未经授权不会向第三方披露。";
  270. }
  271. this.showAgreementModal = true;
  272. },
  273. async getVerifyCode() {
  274. if (this.currentTab === 1)
  275. return;
  276. if (this.countDown > 0)
  277. return;
  278. if (!this.mobile || this.mobile.length !== 11) {
  279. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  280. return;
  281. }
  282. try {
  283. const res = await sendSmsCode(this.mobile);
  284. this.countDown = 60;
  285. this.timer = setInterval(() => {
  286. this.countDown--;
  287. if (this.countDown <= 0) {
  288. clearInterval(this.timer);
  289. }
  290. }, 1e3);
  291. const devCode = res.data;
  292. if (devCode) {
  293. this.code = devCode;
  294. uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
  295. } else {
  296. uni.showToast({ title: "验证码已发送", icon: "none" });
  297. }
  298. } catch (err) {
  299. formatAppLog("error", "at pages/login/logic.js:60", "发送验证码失败:", err);
  300. }
  301. },
  302. async handleLogin() {
  303. var _a;
  304. if (!this.isAgreed) {
  305. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  306. return;
  307. }
  308. if (!this.mobile) {
  309. uni.showToast({ title: "请输入手机号", icon: "none" });
  310. return;
  311. }
  312. if (this.currentTab === 0) {
  313. if (!this.code) {
  314. uni.showToast({ title: "请输入验证码", icon: "none" });
  315. return;
  316. }
  317. } else {
  318. if (!this.password) {
  319. uni.showToast({ title: "请输入密码", icon: "none" });
  320. return;
  321. }
  322. }
  323. if (this.loginLoading)
  324. return;
  325. this.loginLoading = true;
  326. try {
  327. let res;
  328. if (this.currentTab === 0) {
  329. res = await loginBySms(this.mobile, this.code);
  330. } else {
  331. res = await loginByPassword(this.mobile, this.password);
  332. }
  333. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  334. if (token) {
  335. setToken(token);
  336. }
  337. uni.showToast({ title: "登录成功", icon: "success" });
  338. setTimeout(() => {
  339. uni.switchTab({
  340. url: "/pages/home/index"
  341. });
  342. }, 1e3);
  343. } catch (err) {
  344. formatAppLog("error", "at pages/login/logic.js:114", "登录失败:", err);
  345. } finally {
  346. this.loginLoading = false;
  347. }
  348. },
  349. goToRecruit() {
  350. uni.navigateTo({
  351. url: "/pages/recruit/landing"
  352. });
  353. },
  354. goToForgotPwd() {
  355. uni.navigateTo({
  356. url: "/pages/login/reset-pwd-verify"
  357. });
  358. }
  359. }
  360. };
  361. const _imports_0$4 = "/static/header.png";
  362. const _imports_1$8 = "/static/logo.png";
  363. const _sfc_main$C = {
  364. ...logic$9,
  365. components: {
  366. PrivacyPopup: __easycom_0
  367. }
  368. };
  369. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  370. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  371. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  372. vue.createElementVNode("view", { class: "banner-area" }, [
  373. vue.createElementVNode("image", {
  374. class: "banner-img",
  375. src: _imports_0$4,
  376. mode: "widthFix"
  377. })
  378. ]),
  379. vue.createElementVNode("view", { class: "content-card" }, [
  380. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  381. vue.createElementVNode("image", {
  382. class: "logo-img",
  383. src: _imports_1$8,
  384. mode: "widthFix"
  385. })
  386. ]),
  387. vue.createElementVNode("view", { class: "tabs" }, [
  388. vue.createElementVNode(
  389. "view",
  390. {
  391. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 0 }]),
  392. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.currentTab = 0)
  393. },
  394. [
  395. vue.createElementVNode("text", { class: "tab-text" }, "免密登录"),
  396. _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  397. key: 0,
  398. class: "tab-indicator"
  399. })) : vue.createCommentVNode("v-if", true)
  400. ],
  401. 2
  402. /* CLASS */
  403. ),
  404. vue.createElementVNode("view", { class: "divider" }),
  405. vue.createElementVNode(
  406. "view",
  407. {
  408. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 1 }]),
  409. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.currentTab = 1)
  410. },
  411. [
  412. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  413. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  414. key: 0,
  415. class: "tab-indicator"
  416. })) : vue.createCommentVNode("v-if", true)
  417. ],
  418. 2
  419. /* CLASS */
  420. )
  421. ]),
  422. vue.createElementVNode("view", { class: "form-area" }, [
  423. vue.createElementVNode("view", { class: "input-group" }, [
  424. vue.createElementVNode("view", { class: "area-code" }, [
  425. vue.createElementVNode("text", null, "+86"),
  426. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  427. ]),
  428. vue.withDirectives(vue.createElementVNode(
  429. "input",
  430. {
  431. class: "input",
  432. type: "number",
  433. placeholder: "手机号",
  434. "placeholder-style": "color: #ccc",
  435. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.mobile = $event),
  436. maxlength: "11"
  437. },
  438. null,
  439. 512
  440. /* NEED_PATCH */
  441. ), [
  442. [vue.vModelText, _ctx.mobile]
  443. ])
  444. ]),
  445. _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  446. key: 0,
  447. class: "input-group"
  448. }, [
  449. vue.withDirectives(vue.createElementVNode(
  450. "input",
  451. {
  452. class: "input",
  453. type: "number",
  454. placeholder: "验证码",
  455. "placeholder-style": "color: #ccc",
  456. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.code = $event),
  457. maxlength: "6"
  458. },
  459. null,
  460. 512
  461. /* NEED_PATCH */
  462. ), [
  463. [vue.vModelText, _ctx.code]
  464. ]),
  465. vue.createElementVNode("view", {
  466. class: "get-code-btn",
  467. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
  468. }, [
  469. vue.createElementVNode(
  470. "text",
  471. { class: "code-text" },
  472. vue.toDisplayString(_ctx.countDown > 0 ? `${_ctx.countDown}s后重试` : "获取验证码"),
  473. 1
  474. /* TEXT */
  475. )
  476. ])
  477. ])) : vue.createCommentVNode("v-if", true),
  478. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  479. key: 1,
  480. class: "input-group"
  481. }, [
  482. vue.withDirectives(vue.createElementVNode("input", {
  483. class: "input",
  484. password: !_ctx.showPassword,
  485. type: "text",
  486. placeholder: "请输入密码",
  487. "placeholder-style": "color: #ccc",
  488. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.password = $event)
  489. }, null, 8, ["password"]), [
  490. [vue.vModelText, _ctx.password]
  491. ]),
  492. vue.createElementVNode("view", {
  493. class: "eye-icon",
  494. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  495. }, [
  496. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  497. key: 0,
  498. class: "svg-icon",
  499. viewBox: "0 0 24 24",
  500. fill: "none",
  501. xmlns: "http://www.w3.org/2000/svg"
  502. }, [
  503. vue.createElementVNode("path", {
  504. 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",
  505. fill: "#CCCCCC"
  506. })
  507. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  508. key: 1,
  509. class: "svg-icon",
  510. viewBox: "0 0 24 24",
  511. fill: "none",
  512. xmlns: "http://www.w3.org/2000/svg"
  513. }, [
  514. vue.createElementVNode("path", {
  515. d: "M12 7C7 7 2.73 10.11 1 14.5",
  516. stroke: "#CCCCCC",
  517. "stroke-width": "2",
  518. "stroke-linecap": "round"
  519. }),
  520. vue.createElementVNode("path", {
  521. d: "M23 14.5C21.27 10.11 17 7 12 7",
  522. stroke: "#CCCCCC",
  523. "stroke-width": "2",
  524. "stroke-linecap": "round"
  525. }),
  526. vue.createElementVNode("path", {
  527. d: "M12 7V4",
  528. stroke: "#CCCCCC",
  529. "stroke-width": "2",
  530. "stroke-linecap": "round"
  531. }),
  532. vue.createElementVNode("path", {
  533. d: "M16 8L18 5",
  534. stroke: "#CCCCCC",
  535. "stroke-width": "2",
  536. "stroke-linecap": "round"
  537. }),
  538. vue.createElementVNode("path", {
  539. d: "M8 8L6 5",
  540. stroke: "#CCCCCC",
  541. "stroke-width": "2",
  542. "stroke-linecap": "round"
  543. }),
  544. vue.createElementVNode("path", {
  545. d: "M20 10L22 8",
  546. stroke: "#CCCCCC",
  547. "stroke-width": "2",
  548. "stroke-linecap": "round"
  549. }),
  550. vue.createElementVNode("path", {
  551. d: "M4 10L2 8",
  552. stroke: "#CCCCCC",
  553. "stroke-width": "2",
  554. "stroke-linecap": "round"
  555. })
  556. ]))
  557. ])
  558. ])) : vue.createCommentVNode("v-if", true),
  559. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  560. key: 2,
  561. class: "forgot-pwd"
  562. }, [
  563. vue.createElementVNode("text", {
  564. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToForgotPwd && _ctx.goToForgotPwd(...args))
  565. }, "忘记密码?")
  566. ])) : vue.createCommentVNode("v-if", true),
  567. vue.createElementVNode("button", {
  568. class: "login-btn",
  569. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  570. }, "登 录"),
  571. vue.createElementVNode("view", { class: "agreement" }, [
  572. vue.createElementVNode(
  573. "view",
  574. {
  575. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  576. onClick: _cache[9] || (_cache[9] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  577. },
  578. [
  579. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  580. key: 0,
  581. class: "check-mark"
  582. }, "✓")) : vue.createCommentVNode("v-if", true)
  583. ],
  584. 2
  585. /* CLASS */
  586. ),
  587. vue.createElementVNode("text", { class: "agree-text" }, [
  588. vue.createTextVNode(" 我已经阅读并同意 "),
  589. vue.createElementVNode("text", {
  590. class: "link",
  591. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  592. }, "《用户服务协议》"),
  593. vue.createTextVNode(" 和 "),
  594. vue.createElementVNode("text", {
  595. class: "link",
  596. onClick: _cache[11] || (_cache[11] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  597. }, "《隐私政策》")
  598. ])
  599. ])
  600. ]),
  601. vue.createElementVNode("view", {
  602. class: "footer-recruit",
  603. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  604. }, [
  605. vue.createElementVNode("view", { class: "recruit-badge" }, [
  606. (vue.openBlock(), vue.createElementBlock("svg", {
  607. class: "svg-icon flag-icon",
  608. viewBox: "0 0 24 24",
  609. fill: "none",
  610. xmlns: "http://www.w3.org/2000/svg",
  611. style: { "width": "30rpx", "height": "30rpx" }
  612. }, [
  613. vue.createElementVNode("path", {
  614. d: "M4 14V4H18L17 9L18 14H4Z",
  615. stroke: "#FF5722",
  616. "stroke-width": "2",
  617. "stroke-linejoin": "round"
  618. }),
  619. vue.createElementVNode("path", {
  620. d: "M4 22V14",
  621. stroke: "#FF5722",
  622. "stroke-width": "2",
  623. "stroke-linecap": "round"
  624. })
  625. ])),
  626. vue.createElementVNode("text", null, " 宠宝履约者招募")
  627. ])
  628. ]),
  629. vue.createVNode(_component_privacy_popup, {
  630. visible: _ctx.showAgreementModal,
  631. title: _ctx.agreementTitle,
  632. content: _ctx.agreementContent,
  633. onClose: _cache[13] || (_cache[13] = ($event) => _ctx.showAgreementModal = false)
  634. }, null, 8, ["visible", "title", "content"])
  635. ])
  636. ]);
  637. }
  638. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  639. const logic$8 = {
  640. data() {
  641. return {
  642. statusBarHeight: 20
  643. // 默认状态栏高度
  644. };
  645. },
  646. onLoad() {
  647. const sysInfo = uni.getSystemInfoSync();
  648. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  649. },
  650. methods: {
  651. goBack() {
  652. const pages = getCurrentPages();
  653. if (pages.length > 1) {
  654. uni.navigateBack();
  655. } else {
  656. uni.reLaunch({
  657. url: "/pages/login/login"
  658. });
  659. }
  660. },
  661. goToForm() {
  662. uni.navigateTo({
  663. url: "/pages/recruit/form"
  664. });
  665. }
  666. }
  667. };
  668. const _sfc_main$B = logic$8;
  669. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  670. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  671. vue.createElementVNode(
  672. "view",
  673. {
  674. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  675. },
  676. null,
  677. 4
  678. /* STYLE */
  679. ),
  680. vue.createElementVNode("view", { class: "nav-bar" }, [
  681. vue.createElementVNode("view", {
  682. class: "back-icon",
  683. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  684. }, "‹")
  685. ]),
  686. vue.createElementVNode("view", { class: "header-area" }, [
  687. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  688. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  689. ]),
  690. vue.createElementVNode("view", { class: "content-card" }, [
  691. vue.createElementVNode("view", { class: "benefit-item" }, [
  692. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  693. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  694. ]),
  695. vue.createElementVNode("view", { class: "info" }, [
  696. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  697. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  698. ])
  699. ]),
  700. vue.createElementVNode("view", { class: "benefit-item" }, [
  701. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  702. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  703. ]),
  704. vue.createElementVNode("view", { class: "info" }, [
  705. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  706. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  707. ])
  708. ]),
  709. vue.createElementVNode("view", { class: "benefit-item" }, [
  710. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  711. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  712. ]),
  713. vue.createElementVNode("view", { class: "info" }, [
  714. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  715. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  716. ])
  717. ])
  718. ]),
  719. vue.createElementVNode("view", { class: "footer-area" }, [
  720. vue.createElementVNode("button", {
  721. class: "join-btn",
  722. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  723. }, "我要加入"),
  724. vue.createElementVNode("view", { class: "faq" }, [
  725. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  726. vue.createTextVNode(" 常见问题 ")
  727. ])
  728. ])
  729. ]);
  730. }
  731. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  732. function getMyProfile() {
  733. return request({
  734. url: "/fulfiller/fulfiller/my",
  735. method: "GET"
  736. });
  737. }
  738. function submitAudit(data) {
  739. return request({
  740. url: "/fulfiller/app/audit/submit",
  741. method: "POST",
  742. needToken: false,
  743. data
  744. });
  745. }
  746. function getServiceTypes() {
  747. return request({
  748. url: "/fulfiller/app/service/list",
  749. method: "GET",
  750. needToken: false
  751. });
  752. }
  753. function getAreaChildren(parentId = 0) {
  754. return request({
  755. url: "/fulfiller/app/area/children",
  756. method: "GET",
  757. needToken: false,
  758. data: { parentId }
  759. });
  760. }
  761. function uploadFile(filePath) {
  762. return new Promise((resolve, reject) => {
  763. const token = uni.getStorageSync("fulfiller_token");
  764. uni.uploadFile({
  765. url: BASE_URL + "/fulfiller/app/upload",
  766. filePath,
  767. name: "file",
  768. header: {
  769. "clientid": CLIENT_ID,
  770. "X-Platform-Code": PLATFORM_CODE,
  771. "Authorization": token ? `Bearer ${token}` : ""
  772. },
  773. success: (res) => {
  774. try {
  775. const data = JSON.parse(res.data);
  776. if (data.code === 200) {
  777. resolve(data);
  778. } else {
  779. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  780. reject(data);
  781. }
  782. } catch (e) {
  783. reject(e);
  784. }
  785. },
  786. fail: (err) => {
  787. uni.showToast({ title: "上传失败", icon: "none" });
  788. reject(err);
  789. }
  790. });
  791. });
  792. }
  793. function updateAvatar(avatar) {
  794. return request({
  795. url: "/fulfiller/fulfiller/my/avatar",
  796. method: "PUT",
  797. data: { avatar }
  798. });
  799. }
  800. function updateName(name) {
  801. return request({
  802. url: "/fulfiller/fulfiller/my/name",
  803. method: "PUT",
  804. data: { name }
  805. });
  806. }
  807. function updateStatus(status) {
  808. return request({
  809. url: "/fulfiller/fulfiller/my/status",
  810. method: "PUT",
  811. data: { status }
  812. });
  813. }
  814. function updateCity(cityCode, cityName) {
  815. return request({
  816. url: "/fulfiller/fulfiller/my/city",
  817. method: "PUT",
  818. data: { cityCode, cityName }
  819. });
  820. }
  821. function getAuthInfo() {
  822. return request({
  823. url: "/fulfiller/fulfiller/my/auth",
  824. method: "GET"
  825. });
  826. }
  827. function updatePhone(phone, code) {
  828. return request({
  829. url: "/fulfiller/fulfiller/my/phone",
  830. method: "PUT",
  831. data: { phone, code }
  832. });
  833. }
  834. function updatePassword(oldPassword, newPassword) {
  835. return request({
  836. url: "/fulfiller/fulfiller/my/password",
  837. method: "PUT",
  838. data: { oldPassword, newPassword }
  839. });
  840. }
  841. function deleteAccount() {
  842. return request({
  843. url: "/fulfiller/fulfiller/my/account",
  844. method: "DELETE"
  845. });
  846. }
  847. function updateAuthInfo(data) {
  848. return request({
  849. url: "/fulfiller/fulfiller/my/auth",
  850. method: "POST",
  851. data
  852. });
  853. }
  854. function getPendingOrders(params) {
  855. return request({
  856. url: "/order/subOrder/listPendingAccept",
  857. method: "GET",
  858. data: params
  859. });
  860. }
  861. function acceptOrder(orderId) {
  862. return request({
  863. url: "/order/subOrder/accept",
  864. method: "PUT",
  865. data: { orderId }
  866. });
  867. }
  868. function getOrderCount() {
  869. return request({
  870. url: "/order/subOrder/count",
  871. method: "GET"
  872. });
  873. }
  874. function getMyOrders(params) {
  875. return request({
  876. url: "/order/subOrder/listOnMyOrder",
  877. method: "GET",
  878. data: params
  879. });
  880. }
  881. function getOrderInfo(id) {
  882. return request({
  883. url: `/order/subOrder/getInfo?id=${id}`,
  884. method: "GET"
  885. });
  886. }
  887. function getOrderLogs(orderId) {
  888. return request({
  889. url: `/order/subOrderLog/list?orderId=${orderId}`,
  890. method: "GET"
  891. });
  892. }
  893. function clockIn(data) {
  894. return request({
  895. url: "/order/subOrder/clockIn",
  896. method: "PUT",
  897. data
  898. });
  899. }
  900. function uploadAnamaly(data) {
  901. return request({
  902. url: "/fulfiller/anamaly/upload",
  903. method: "POST",
  904. data
  905. });
  906. }
  907. function getAnomalyList(orderId) {
  908. return request({
  909. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  910. method: "GET"
  911. });
  912. }
  913. function submitNursingSummary(data) {
  914. return request({
  915. url: "/order/subOrder/nursingSummary",
  916. method: "PUT",
  917. data
  918. });
  919. }
  920. const logic$7 = {
  921. data() {
  922. return {
  923. formData: {
  924. mobile: "",
  925. code: "",
  926. name: "",
  927. gender: 1,
  928. // 1男 2女
  929. birthday: "",
  930. password: "",
  931. serviceType: [],
  932. city: "",
  933. station: "",
  934. stationId: null
  935. },
  936. showPwd: false,
  937. isAgreed: false,
  938. serviceTypes: [],
  939. // 验证码倒计时
  940. countDown: 0,
  941. timer: null,
  942. // 日期选择器相关
  943. showPicker: false,
  944. years: [],
  945. months: [],
  946. days: [],
  947. pickerValue: [0, 0, 0],
  948. tempYear: 0,
  949. tempMonth: 0,
  950. tempDay: 0,
  951. // 城市选择器相关(从后端加载)
  952. showCityPicker: false,
  953. selectStep: 0,
  954. selectedPathway: [],
  955. currentList: [],
  956. selectedCityId: null,
  957. // 站点选择器相关(从后端加载)
  958. showStationPicker: false,
  959. stationList: [],
  960. // 协议弹窗
  961. showPrivacy: false,
  962. privacyTitle: "",
  963. privacyContent: ""
  964. };
  965. },
  966. created() {
  967. this.initDateData();
  968. this.loadServiceTypes();
  969. },
  970. beforeDestroy() {
  971. if (this.timer)
  972. clearInterval(this.timer);
  973. },
  974. methods: {
  975. initDateData() {
  976. const now = /* @__PURE__ */ new Date();
  977. const currentYear = now.getFullYear();
  978. for (let i = 1980; i <= currentYear + 5; i++) {
  979. this.years.push(i);
  980. }
  981. for (let i = 1; i <= 12; i++) {
  982. this.months.push(i);
  983. }
  984. for (let i = 1; i <= 31; i++) {
  985. this.days.push(i);
  986. }
  987. },
  988. // 打开选择器
  989. openPicker() {
  990. const dateStr = this.formData.birthday || "2000-01-01";
  991. const [y, m, d] = dateStr.split("-").map(Number);
  992. const yIndex = this.years.indexOf(y);
  993. const mIndex = this.months.indexOf(m);
  994. const dIndex = this.days.indexOf(d);
  995. this.pickerValue = [
  996. yIndex > -1 ? yIndex : 0,
  997. mIndex > -1 ? mIndex : 0,
  998. dIndex > -1 ? dIndex : 0
  999. ];
  1000. this.tempYear = this.years[this.pickerValue[0]];
  1001. this.tempMonth = this.months[this.pickerValue[1]];
  1002. this.tempDay = this.days[this.pickerValue[2]];
  1003. this.showPicker = true;
  1004. },
  1005. closePicker() {
  1006. this.showPicker = false;
  1007. },
  1008. onPickerChange(e) {
  1009. const val = e.detail.value;
  1010. this.tempYear = this.years[val[0]];
  1011. this.tempMonth = this.months[val[1]];
  1012. this.tempDay = this.days[val[2]];
  1013. },
  1014. confirmPicker() {
  1015. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1016. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1017. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  1018. this.closePicker();
  1019. },
  1020. async loadServiceTypes() {
  1021. try {
  1022. const res = await getServiceTypes();
  1023. this.serviceTypes = (res.data || []).map((item) => ({
  1024. id: item.id,
  1025. name: item.name
  1026. }));
  1027. } catch (err) {
  1028. formatAppLog("error", "at pages/recruit/logic.js:131", "加载服务类型失败:", err);
  1029. this.serviceTypes = [];
  1030. }
  1031. },
  1032. toggleService(item) {
  1033. const idx = this.formData.serviceType.indexOf(item.id);
  1034. if (idx > -1) {
  1035. this.formData.serviceType.splice(idx, 1);
  1036. } else {
  1037. this.formData.serviceType.push(item.id);
  1038. }
  1039. },
  1040. // 验证码
  1041. async getVerifyCode() {
  1042. if (this.countDown > 0)
  1043. return;
  1044. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1045. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1046. return;
  1047. }
  1048. try {
  1049. const res = await sendSmsCode(this.formData.mobile);
  1050. this.countDown = 60;
  1051. this.timer = setInterval(() => {
  1052. this.countDown--;
  1053. if (this.countDown <= 0)
  1054. clearInterval(this.timer);
  1055. }, 1e3);
  1056. const devCode = res.data;
  1057. if (devCode) {
  1058. this.formData.code = devCode;
  1059. uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
  1060. } else {
  1061. uni.showToast({ title: "验证码已发送", icon: "none" });
  1062. }
  1063. } catch (err) {
  1064. formatAppLog("error", "at pages/recruit/logic.js:168", "发送验证码失败:", err);
  1065. }
  1066. },
  1067. // 城市选择器 logic(从后端加载)
  1068. async openCityPicker() {
  1069. this.showCityPicker = true;
  1070. if (this.selectedPathway.length === 0) {
  1071. await this.resetCityPicker();
  1072. }
  1073. },
  1074. async resetCityPicker() {
  1075. this.selectStep = 0;
  1076. this.selectedPathway = [];
  1077. await this.loadAreaChildren(0);
  1078. },
  1079. closeCityPicker() {
  1080. this.showCityPicker = false;
  1081. },
  1082. async loadAreaChildren(parentId) {
  1083. try {
  1084. const res = await getAreaChildren(parentId);
  1085. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  1086. id: item.id,
  1087. name: item.name,
  1088. type: item.type,
  1089. parentId: item.parentId
  1090. }));
  1091. } catch (err) {
  1092. formatAppLog("error", "at pages/recruit/logic.js:200", "加载区域数据失败:", err);
  1093. this.currentList = [];
  1094. }
  1095. },
  1096. async selectCityItem(item) {
  1097. this.selectedPathway[this.selectStep] = item;
  1098. if (item.type === 0) {
  1099. this.selectStep++;
  1100. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1101. await this.loadAreaChildren(item.id);
  1102. if (this.currentList.length === 0) {
  1103. this.selectedCityId = item.id;
  1104. this.confirmCity();
  1105. }
  1106. } else {
  1107. this.selectedCityId = item.id;
  1108. this.confirmCity();
  1109. }
  1110. },
  1111. async jumpToStep(step) {
  1112. this.selectStep = step;
  1113. if (step === 0) {
  1114. await this.loadAreaChildren(0);
  1115. } else {
  1116. const parent = this.selectedPathway[step - 1];
  1117. if (parent) {
  1118. await this.loadAreaChildren(parent.id);
  1119. }
  1120. }
  1121. },
  1122. confirmCity() {
  1123. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1124. this.formData.city = fullPath;
  1125. this.formData.station = "";
  1126. this.formData.stationId = null;
  1127. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1128. if (lastSelected) {
  1129. this.loadStations(lastSelected.id);
  1130. }
  1131. this.closeCityPicker();
  1132. },
  1133. // 站点选择器(从后端加载,只取type=2的站点)
  1134. async loadStations(parentId) {
  1135. try {
  1136. const res = await getAreaChildren(parentId);
  1137. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1138. id: item.id,
  1139. name: item.name
  1140. }));
  1141. } catch (err) {
  1142. formatAppLog("error", "at pages/recruit/logic.js:259", "加载站点数据失败:", err);
  1143. this.stationList = [];
  1144. }
  1145. },
  1146. openStationPicker() {
  1147. if (this.stationList.length === 0) {
  1148. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1149. return;
  1150. }
  1151. this.showStationPicker = true;
  1152. },
  1153. closeStationPicker() {
  1154. this.showStationPicker = false;
  1155. },
  1156. selectStation(item) {
  1157. this.formData.station = item.name;
  1158. this.formData.stationId = item.id;
  1159. this.closeStationPicker();
  1160. },
  1161. openPrivacy() {
  1162. this.privacyTitle = "宠宝履约者说明";
  1163. this.privacyContent = "1. 履约职责\n作为宠宝履约者,您需要按照平台标准完成宠物接送、喂遛或洗护服务,确保宠物安全与健康。\n\n2. 结算方式\n服务费用将根据订单类型和距离计算,定期结算至您的账户。具体结算周期请查看钱包说明。\n\n3. 行为规范\n请在这个过程中保持专业,穿着整洁,礼貌待人。严禁虐待宠物,违反者将承担法律责任。";
  1164. this.showPrivacy = true;
  1165. },
  1166. goToAuth() {
  1167. if (!this.isAgreed) {
  1168. uni.showToast({ title: "请勾选协议", icon: "none" });
  1169. return;
  1170. }
  1171. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1172. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1173. return;
  1174. }
  1175. if (!this.formData.name) {
  1176. uni.showToast({ title: "请输入姓名", icon: "none" });
  1177. return;
  1178. }
  1179. if (this.formData.serviceType.length === 0) {
  1180. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1181. return;
  1182. }
  1183. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1184. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1185. const services = JSON.stringify(selectedServices);
  1186. uni.navigateTo({
  1187. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1188. });
  1189. }
  1190. }
  1191. };
  1192. const _sfc_main$A = {
  1193. ...logic$7,
  1194. components: {
  1195. PrivacyPopup: __easycom_0
  1196. }
  1197. };
  1198. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1199. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  1200. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1201. vue.createElementVNode("view", { class: "card" }, [
  1202. vue.createElementVNode("view", { class: "form-item" }, [
  1203. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1204. vue.createElementVNode("view", { class: "input-box" }, [
  1205. vue.createElementVNode("view", { class: "prefix-area" }, [
  1206. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1207. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1208. ]),
  1209. vue.withDirectives(vue.createElementVNode(
  1210. "input",
  1211. {
  1212. class: "input",
  1213. type: "number",
  1214. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1215. },
  1216. null,
  1217. 512
  1218. /* NEED_PATCH */
  1219. ), [
  1220. [vue.vModelText, _ctx.formData.mobile]
  1221. ])
  1222. ])
  1223. ]),
  1224. vue.createElementVNode("view", { class: "form-item" }, [
  1225. vue.createElementVNode("text", { class: "label" }, "验证码"),
  1226. vue.createElementVNode("view", { class: "input-box" }, [
  1227. vue.withDirectives(vue.createElementVNode(
  1228. "input",
  1229. {
  1230. class: "input",
  1231. type: "number",
  1232. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.code = $event),
  1233. placeholder: "验证码"
  1234. },
  1235. null,
  1236. 512
  1237. /* NEED_PATCH */
  1238. ), [
  1239. [vue.vModelText, _ctx.formData.code]
  1240. ]),
  1241. vue.createElementVNode(
  1242. "text",
  1243. {
  1244. class: "get-code-text",
  1245. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
  1246. },
  1247. vue.toDisplayString(_ctx.countDown > 0 ? _ctx.countDown + "s" : "获取验证码"),
  1248. 1
  1249. /* TEXT */
  1250. )
  1251. ])
  1252. ]),
  1253. vue.createElementVNode("view", { class: "form-item" }, [
  1254. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1255. vue.createElementVNode("view", { class: "input-box" }, [
  1256. vue.withDirectives(vue.createElementVNode(
  1257. "input",
  1258. {
  1259. class: "input",
  1260. type: "text",
  1261. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.formData.name = $event)
  1262. },
  1263. null,
  1264. 512
  1265. /* NEED_PATCH */
  1266. ), [
  1267. [vue.vModelText, _ctx.formData.name]
  1268. ])
  1269. ])
  1270. ]),
  1271. vue.createElementVNode("view", { class: "form-item" }, [
  1272. vue.createElementVNode("text", { class: "label" }, "性别"),
  1273. vue.createElementVNode("view", { class: "gender-group" }, [
  1274. vue.createElementVNode("view", {
  1275. class: "radio-item",
  1276. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.formData.gender = 1)
  1277. }, [
  1278. vue.createElementVNode(
  1279. "text",
  1280. {
  1281. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1282. },
  1283. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1284. 3
  1285. /* TEXT, CLASS */
  1286. ),
  1287. vue.createElementVNode(
  1288. "text",
  1289. {
  1290. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1291. },
  1292. " 男",
  1293. 2
  1294. /* CLASS */
  1295. )
  1296. ]),
  1297. vue.createElementVNode("view", {
  1298. class: "radio-item",
  1299. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.formData.gender = 2)
  1300. }, [
  1301. vue.createElementVNode(
  1302. "text",
  1303. {
  1304. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1305. },
  1306. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1307. 3
  1308. /* TEXT, CLASS */
  1309. ),
  1310. vue.createElementVNode(
  1311. "text",
  1312. {
  1313. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1314. },
  1315. " 女",
  1316. 2
  1317. /* CLASS */
  1318. )
  1319. ])
  1320. ])
  1321. ]),
  1322. vue.createElementVNode("view", { class: "form-item" }, [
  1323. vue.createElementVNode("text", { class: "label" }, "生日"),
  1324. vue.createElementVNode("view", {
  1325. class: "input-box",
  1326. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1327. }, [
  1328. vue.createElementVNode(
  1329. "text",
  1330. null,
  1331. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1332. 1
  1333. /* TEXT */
  1334. ),
  1335. (vue.openBlock(), vue.createElementBlock("svg", {
  1336. class: "arrow-right",
  1337. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1338. viewBox: "0 0 1024 1024",
  1339. version: "1.1",
  1340. xmlns: "http://www.w3.org/2000/svg"
  1341. }, [
  1342. vue.createElementVNode("path", {
  1343. 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",
  1344. fill: "#CCCCCC"
  1345. })
  1346. ]))
  1347. ])
  1348. ]),
  1349. vue.createElementVNode("view", { class: "form-item" }, [
  1350. vue.createElementVNode("text", { class: "label" }, "密码"),
  1351. vue.createElementVNode("view", { class: "input-box" }, [
  1352. vue.withDirectives(vue.createElementVNode("input", {
  1353. class: "input",
  1354. password: !_ctx.showPwd,
  1355. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.formData.password = $event),
  1356. placeholder: "设置登录密码"
  1357. }, null, 8, ["password"]), [
  1358. [vue.vModelText, _ctx.formData.password]
  1359. ]),
  1360. vue.createElementVNode("view", {
  1361. class: "monkey-icon",
  1362. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1363. }, [
  1364. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1365. key: 0,
  1366. class: "svg-icon",
  1367. viewBox: "0 0 24 24",
  1368. fill: "none",
  1369. xmlns: "http://www.w3.org/2000/svg"
  1370. }, [
  1371. vue.createElementVNode("path", {
  1372. 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",
  1373. fill: "#CCCCCC"
  1374. })
  1375. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1376. key: 1,
  1377. class: "svg-icon",
  1378. viewBox: "0 0 24 24",
  1379. fill: "none",
  1380. xmlns: "http://www.w3.org/2000/svg"
  1381. }, [
  1382. vue.createElementVNode("path", {
  1383. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1384. stroke: "#CCCCCC",
  1385. "stroke-width": "2",
  1386. "stroke-linecap": "round"
  1387. }),
  1388. vue.createElementVNode("path", {
  1389. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1390. stroke: "#CCCCCC",
  1391. "stroke-width": "2",
  1392. "stroke-linecap": "round"
  1393. }),
  1394. vue.createElementVNode("path", {
  1395. d: "M12 7V4",
  1396. stroke: "#CCCCCC",
  1397. "stroke-width": "2",
  1398. "stroke-linecap": "round"
  1399. }),
  1400. vue.createElementVNode("path", {
  1401. d: "M16 8L18 5",
  1402. stroke: "#CCCCCC",
  1403. "stroke-width": "2",
  1404. "stroke-linecap": "round"
  1405. }),
  1406. vue.createElementVNode("path", {
  1407. d: "M8 8L6 5",
  1408. stroke: "#CCCCCC",
  1409. "stroke-width": "2",
  1410. "stroke-linecap": "round"
  1411. }),
  1412. vue.createElementVNode("path", {
  1413. d: "M20 10L22 8",
  1414. stroke: "#CCCCCC",
  1415. "stroke-width": "2",
  1416. "stroke-linecap": "round"
  1417. }),
  1418. vue.createElementVNode("path", {
  1419. d: "M4 10L2 8",
  1420. stroke: "#CCCCCC",
  1421. "stroke-width": "2",
  1422. "stroke-linecap": "round"
  1423. })
  1424. ]))
  1425. ])
  1426. ])
  1427. ])
  1428. ]),
  1429. vue.createElementVNode("view", { class: "card" }, [
  1430. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1431. vue.createElementVNode("view", { class: "service-types" }, [
  1432. (vue.openBlock(true), vue.createElementBlock(
  1433. vue.Fragment,
  1434. null,
  1435. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1436. return vue.openBlock(), vue.createElementBlock("view", {
  1437. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1438. key: item.id,
  1439. onClick: ($event) => _ctx.toggleService(item)
  1440. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1441. }),
  1442. 128
  1443. /* KEYED_FRAGMENT */
  1444. ))
  1445. ]),
  1446. vue.createElementVNode("view", { class: "form-item" }, [
  1447. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1448. vue.createElementVNode("view", {
  1449. class: "input-box",
  1450. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1451. }, [
  1452. vue.createElementVNode(
  1453. "text",
  1454. {
  1455. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1456. },
  1457. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1458. 5
  1459. /* TEXT, STYLE */
  1460. ),
  1461. (vue.openBlock(), vue.createElementBlock("svg", {
  1462. class: "arrow-right",
  1463. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1464. viewBox: "0 0 1024 1024",
  1465. version: "1.1",
  1466. xmlns: "http://www.w3.org/2000/svg"
  1467. }, [
  1468. vue.createElementVNode("path", {
  1469. d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-45.056L382.592 149.312a29.12 29.12 0 0 0-41.728 0z",
  1470. fill: "#CCCCCC"
  1471. })
  1472. ]))
  1473. ])
  1474. ]),
  1475. vue.createElementVNode("view", { class: "form-item" }, [
  1476. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1477. vue.createElementVNode("view", {
  1478. class: "input-box",
  1479. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1480. }, [
  1481. vue.createElementVNode(
  1482. "text",
  1483. {
  1484. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1485. },
  1486. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1487. 5
  1488. /* TEXT, STYLE */
  1489. ),
  1490. (vue.openBlock(), vue.createElementBlock("svg", {
  1491. class: "arrow-right",
  1492. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1493. viewBox: "0 0 1024 1024",
  1494. version: "1.1",
  1495. xmlns: "http://www.w3.org/2000/svg"
  1496. }, [
  1497. vue.createElementVNode("path", {
  1498. 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",
  1499. fill: "#CCCCCC"
  1500. })
  1501. ]))
  1502. ])
  1503. ])
  1504. ]),
  1505. vue.createElementVNode(
  1506. "view",
  1507. {
  1508. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1509. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1510. },
  1511. [
  1512. vue.createElementVNode("view", {
  1513. class: "picker-content",
  1514. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  1515. }, ["stop"]))
  1516. }, [
  1517. vue.createElementVNode("view", { class: "picker-header" }, [
  1518. vue.createElementVNode("text", {
  1519. class: "picker-btn-cancel",
  1520. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1521. }, "取消"),
  1522. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1523. vue.createElementVNode("text", {
  1524. class: "picker-btn-confirm",
  1525. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1526. }, "确定")
  1527. ]),
  1528. vue.createElementVNode("view", { class: "picker-body" }, [
  1529. vue.createElementVNode("view", { class: "timeline-area" }, [
  1530. (vue.openBlock(true), vue.createElementBlock(
  1531. vue.Fragment,
  1532. null,
  1533. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1534. return vue.openBlock(), vue.createElementBlock("view", {
  1535. class: "timeline-item",
  1536. key: index,
  1537. onClick: ($event) => _ctx.jumpToStep(index)
  1538. }, [
  1539. vue.createElementVNode("view", { class: "timeline-dot" }),
  1540. vue.createElementVNode(
  1541. "text",
  1542. null,
  1543. vue.toDisplayString(item.name),
  1544. 1
  1545. /* TEXT */
  1546. )
  1547. ], 8, ["onClick"]);
  1548. }),
  1549. 128
  1550. /* KEYED_FRAGMENT */
  1551. )),
  1552. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1553. key: 0,
  1554. class: "timeline-item active"
  1555. }, [
  1556. vue.createElementVNode("view", { class: "timeline-dot" }),
  1557. vue.createElementVNode("text", null, "请选择")
  1558. ])) : vue.createCommentVNode("v-if", true)
  1559. ]),
  1560. vue.createElementVNode("scroll-view", {
  1561. "scroll-y": "",
  1562. class: "list-area"
  1563. }, [
  1564. (vue.openBlock(true), vue.createElementBlock(
  1565. vue.Fragment,
  1566. null,
  1567. vue.renderList(_ctx.currentList, (item, index) => {
  1568. return vue.openBlock(), vue.createElementBlock("view", {
  1569. class: "list-item",
  1570. key: item.id,
  1571. onClick: ($event) => _ctx.selectCityItem(item)
  1572. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1573. }),
  1574. 128
  1575. /* KEYED_FRAGMENT */
  1576. )),
  1577. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1578. key: 0,
  1579. style: { "padding": "20rpx", "color": "#999" }
  1580. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1581. ])
  1582. ])
  1583. ])
  1584. ],
  1585. 2
  1586. /* CLASS */
  1587. ),
  1588. vue.createElementVNode(
  1589. "view",
  1590. {
  1591. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1592. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1593. },
  1594. [
  1595. vue.createElementVNode("view", {
  1596. class: "picker-content",
  1597. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  1598. }, ["stop"]))
  1599. }, [
  1600. vue.createElementVNode("view", {
  1601. class: "picker-header",
  1602. style: { "justify-content": "center", "position": "relative" }
  1603. }, [
  1604. vue.createElementVNode("text", {
  1605. class: "picker-btn-cancel",
  1606. style: { "position": "absolute", "left": "30rpx" },
  1607. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1608. }, "取消"),
  1609. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1610. ]),
  1611. vue.createElementVNode("scroll-view", {
  1612. "scroll-y": "",
  1613. class: "picker-list"
  1614. }, [
  1615. (vue.openBlock(true), vue.createElementBlock(
  1616. vue.Fragment,
  1617. null,
  1618. vue.renderList(_ctx.stationList, (item, index) => {
  1619. return vue.openBlock(), vue.createElementBlock("view", {
  1620. class: "station-item",
  1621. key: index,
  1622. onClick: ($event) => _ctx.selectStation(item)
  1623. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1624. }),
  1625. 128
  1626. /* KEYED_FRAGMENT */
  1627. ))
  1628. ])
  1629. ])
  1630. ],
  1631. 2
  1632. /* CLASS */
  1633. ),
  1634. vue.createElementVNode("view", { class: "footer-actions" }, [
  1635. vue.createElementVNode("view", { class: "agreement-row" }, [
  1636. vue.createElementVNode(
  1637. "view",
  1638. {
  1639. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1640. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1641. },
  1642. [
  1643. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1644. key: 0,
  1645. class: "check-mark"
  1646. }, "✓")) : vue.createCommentVNode("v-if", true)
  1647. ],
  1648. 2
  1649. /* CLASS */
  1650. ),
  1651. vue.createElementVNode("text", { class: "agree-text" }, [
  1652. vue.createTextVNode("我已阅读并同意 "),
  1653. vue.createElementVNode("text", {
  1654. style: { "color": "#2979ff" },
  1655. onClick: _cache[19] || (_cache[19] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1656. }, "《宠宝履约者说明》")
  1657. ])
  1658. ]),
  1659. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1660. vue.createElementVNode("button", {
  1661. class: "submit-btn",
  1662. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1663. }, "下一步,实名认证")
  1664. ])
  1665. ]),
  1666. vue.createElementVNode(
  1667. "view",
  1668. {
  1669. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1670. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1671. },
  1672. [
  1673. vue.createElementVNode("view", {
  1674. class: "picker-content",
  1675. onClick: _cache[24] || (_cache[24] = vue.withModifiers(() => {
  1676. }, ["stop"]))
  1677. }, [
  1678. vue.createElementVNode("view", { class: "picker-header" }, [
  1679. vue.createElementVNode("text", {
  1680. class: "picker-btn-cancel",
  1681. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1682. }, "取消"),
  1683. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1684. vue.createElementVNode("text", {
  1685. class: "picker-btn-confirm",
  1686. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1687. }, "确定")
  1688. ]),
  1689. vue.createElementVNode("picker-view", {
  1690. class: "picker-view",
  1691. "indicator-style": "height: 50px;",
  1692. value: _ctx.pickerValue,
  1693. onChange: _cache[23] || (_cache[23] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1694. }, [
  1695. vue.createElementVNode("picker-view-column", null, [
  1696. (vue.openBlock(true), vue.createElementBlock(
  1697. vue.Fragment,
  1698. null,
  1699. vue.renderList(_ctx.years, (item, index) => {
  1700. return vue.openBlock(), vue.createElementBlock(
  1701. "view",
  1702. {
  1703. class: "picker-item",
  1704. key: index
  1705. },
  1706. vue.toDisplayString(item) + "年",
  1707. 1
  1708. /* TEXT */
  1709. );
  1710. }),
  1711. 128
  1712. /* KEYED_FRAGMENT */
  1713. ))
  1714. ]),
  1715. vue.createElementVNode("picker-view-column", null, [
  1716. (vue.openBlock(true), vue.createElementBlock(
  1717. vue.Fragment,
  1718. null,
  1719. vue.renderList(_ctx.months, (item, index) => {
  1720. return vue.openBlock(), vue.createElementBlock(
  1721. "view",
  1722. {
  1723. class: "picker-item",
  1724. key: index
  1725. },
  1726. vue.toDisplayString(item) + "月",
  1727. 1
  1728. /* TEXT */
  1729. );
  1730. }),
  1731. 128
  1732. /* KEYED_FRAGMENT */
  1733. ))
  1734. ]),
  1735. vue.createElementVNode("picker-view-column", null, [
  1736. (vue.openBlock(true), vue.createElementBlock(
  1737. vue.Fragment,
  1738. null,
  1739. vue.renderList(_ctx.days, (item, index) => {
  1740. return vue.openBlock(), vue.createElementBlock(
  1741. "view",
  1742. {
  1743. class: "picker-item",
  1744. key: index
  1745. },
  1746. vue.toDisplayString(item) + "日",
  1747. 1
  1748. /* TEXT */
  1749. );
  1750. }),
  1751. 128
  1752. /* KEYED_FRAGMENT */
  1753. ))
  1754. ])
  1755. ], 40, ["value"])
  1756. ])
  1757. ],
  1758. 2
  1759. /* CLASS */
  1760. ),
  1761. vue.createVNode(_component_privacy_popup, {
  1762. visible: _ctx.showPrivacy,
  1763. title: _ctx.privacyTitle,
  1764. content: _ctx.privacyContent,
  1765. onClose: _cache[26] || (_cache[26] = ($event) => _ctx.showPrivacy = false)
  1766. }, null, 8, ["visible", "title", "content"])
  1767. ]);
  1768. }
  1769. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1770. const logic$6 = {
  1771. data() {
  1772. return {
  1773. formData: {
  1774. idType: "居民身份证",
  1775. name: "",
  1776. idNumber: "",
  1777. expiryDate: ""
  1778. },
  1779. idCardFront: "",
  1780. // 身份证正面本地预览路径
  1781. idCardBack: "",
  1782. // 身份证反面本地预览路径
  1783. idCardFrontOssId: "",
  1784. // 身份证正面 OSS ID
  1785. idCardBackOssId: "",
  1786. // 身份证反面 OSS ID
  1787. showDatePicker: false,
  1788. pickerValue: [0, 0, 0],
  1789. // YYYY-MM-DD
  1790. years: [],
  1791. months: [],
  1792. days: [],
  1793. serviceType: []
  1794. // 接收上一页的服务类型
  1795. };
  1796. },
  1797. onLoad(options) {
  1798. if (options.services) {
  1799. try {
  1800. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1801. } catch (e) {
  1802. formatAppLog("error", "at pages/recruit/auth_logic.js:29", "Parse services failed", e);
  1803. }
  1804. }
  1805. this.initDateData();
  1806. this.restoreAuthData();
  1807. },
  1808. methods: {
  1809. // --- 日期选择器逻辑 (简化版, 仅示意) ---
  1810. initDateData() {
  1811. const date = /* @__PURE__ */ new Date();
  1812. const year = date.getFullYear();
  1813. for (let i = year; i <= year + 20; i++) {
  1814. this.years.push(i);
  1815. }
  1816. for (let i = 1; i <= 12; i++) {
  1817. this.months.push(i);
  1818. }
  1819. for (let i = 1; i <= 31; i++) {
  1820. this.days.push(i);
  1821. }
  1822. },
  1823. openDatePicker() {
  1824. },
  1825. onDateChange(e) {
  1826. this.formData.expiryDate = e.detail.value;
  1827. },
  1828. // --- 数据持久化(防止返回上一级丢失) ---
  1829. restoreAuthData() {
  1830. try {
  1831. const saved = uni.getStorageSync("recruit_auth_data");
  1832. if (saved) {
  1833. const d = JSON.parse(saved);
  1834. this.formData.name = d.name || "";
  1835. this.formData.idNumber = d.idNumber || "";
  1836. this.formData.expiryDate = d.expiryDate || "";
  1837. this.idCardFront = d.idCardFront || "";
  1838. this.idCardBack = d.idCardBack || "";
  1839. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1840. this.idCardBackOssId = d.idCardBackOssId || "";
  1841. }
  1842. } catch (e) {
  1843. formatAppLog("error", "at pages/recruit/auth_logic.js:76", "恢复认证数据失败", e);
  1844. }
  1845. },
  1846. saveAuthData() {
  1847. try {
  1848. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1849. name: this.formData.name,
  1850. idNumber: this.formData.idNumber,
  1851. expiryDate: this.formData.expiryDate,
  1852. idCardFront: this.idCardFront,
  1853. idCardBack: this.idCardBack,
  1854. idCardFrontOssId: this.idCardFrontOssId,
  1855. idCardBackOssId: this.idCardBackOssId
  1856. }));
  1857. } catch (e) {
  1858. formatAppLog("error", "at pages/recruit/auth_logic.js:91", "保存认证数据失败", e);
  1859. }
  1860. },
  1861. // --- 图片上传(选择后自动上传到OSS) ---
  1862. chooseImage(side) {
  1863. uni.chooseImage({
  1864. count: 1,
  1865. sizeType: ["compressed"],
  1866. sourceType: ["album", "camera"],
  1867. success: async (res) => {
  1868. const tempPath = res.tempFilePaths[0];
  1869. if (side === "front") {
  1870. this.idCardFront = tempPath;
  1871. } else {
  1872. this.idCardBack = tempPath;
  1873. }
  1874. try {
  1875. uni.showLoading({ title: "上传中..." });
  1876. const uploadRes = await uploadFile(tempPath);
  1877. if (side === "front") {
  1878. this.idCardFrontOssId = uploadRes.data.ossId;
  1879. } else {
  1880. this.idCardBackOssId = uploadRes.data.ossId;
  1881. }
  1882. uni.hideLoading();
  1883. this.saveAuthData();
  1884. } catch (err) {
  1885. uni.hideLoading();
  1886. formatAppLog("error", "at pages/recruit/auth_logic.js:121", "上传身份证图片失败:", err);
  1887. }
  1888. }
  1889. });
  1890. },
  1891. // --- 提交 ---
  1892. goToQualifications() {
  1893. this.saveAuthData();
  1894. try {
  1895. const stored = uni.getStorageSync("recruit_form_data");
  1896. if (stored) {
  1897. const data = JSON.parse(stored);
  1898. data.realName = this.formData.name;
  1899. data.idNumber = this.formData.idNumber;
  1900. data.expiryDate = this.formData.expiryDate;
  1901. data.idCardFrontOssId = this.idCardFrontOssId;
  1902. data.idCardBackOssId = this.idCardBackOssId;
  1903. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1904. }
  1905. } catch (e) {
  1906. formatAppLog("error", "at pages/recruit/auth_logic.js:158", "保存认证数据失败", e);
  1907. }
  1908. const services = JSON.stringify(this.serviceType);
  1909. uni.navigateTo({
  1910. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1911. });
  1912. }
  1913. }
  1914. };
  1915. const _sfc_main$z = logic$6;
  1916. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1917. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1918. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1919. vue.createElementVNode("view", { class: "form-card" }, [
  1920. vue.createElementVNode("view", { class: "form-item" }, [
  1921. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1922. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1923. ]),
  1924. vue.createElementVNode("view", { class: "form-item" }, [
  1925. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1926. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1927. vue.withDirectives(vue.createElementVNode(
  1928. "input",
  1929. {
  1930. class: "input-area",
  1931. type: "text",
  1932. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1933. placeholder: "证件姓名",
  1934. "placeholder-class": "input-placeholder"
  1935. },
  1936. null,
  1937. 512
  1938. /* NEED_PATCH */
  1939. ), [
  1940. [vue.vModelText, _ctx.formData.name]
  1941. ])
  1942. ])
  1943. ]),
  1944. vue.createElementVNode("view", { class: "form-item" }, [
  1945. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1946. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1947. vue.withDirectives(vue.createElementVNode(
  1948. "input",
  1949. {
  1950. class: "input-area",
  1951. type: "idcard",
  1952. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1953. placeholder: "身份证号",
  1954. "placeholder-class": "input-placeholder"
  1955. },
  1956. null,
  1957. 512
  1958. /* NEED_PATCH */
  1959. ), [
  1960. [vue.vModelText, _ctx.formData.idNumber]
  1961. ])
  1962. ])
  1963. ]),
  1964. vue.createElementVNode("view", { class: "form-item" }, [
  1965. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1966. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1967. vue.createElementVNode(
  1968. "picker",
  1969. {
  1970. mode: "date",
  1971. onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onDateChange && _ctx.onDateChange(...args)),
  1972. style: { "width": "100%" }
  1973. },
  1974. [
  1975. vue.createElementVNode(
  1976. "view",
  1977. {
  1978. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1979. },
  1980. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1981. 3
  1982. /* TEXT, CLASS */
  1983. )
  1984. ],
  1985. 32
  1986. /* NEED_HYDRATION */
  1987. ),
  1988. (vue.openBlock(), vue.createElementBlock("svg", {
  1989. class: "arrow-right",
  1990. viewBox: "0 0 1024 1024",
  1991. version: "1.1",
  1992. xmlns: "http://www.w3.org/2000/svg"
  1993. }, [
  1994. vue.createElementVNode("path", {
  1995. 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",
  1996. fill: "#CCCCCC"
  1997. })
  1998. ]))
  1999. ])
  2000. ])
  2001. ]),
  2002. vue.createElementVNode("view", { class: "upload-card" }, [
  2003. vue.createElementVNode("view", {
  2004. class: "upload-box",
  2005. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  2006. }, [
  2007. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  2008. key: 0,
  2009. src: _ctx.idCardFront,
  2010. class: "preview-img",
  2011. mode: "aspectFill"
  2012. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2013. vue.Fragment,
  2014. { key: 1 },
  2015. [
  2016. (vue.openBlock(), vue.createElementBlock("svg", {
  2017. class: "camera-icon",
  2018. viewBox: "0 0 24 24",
  2019. fill: "none",
  2020. xmlns: "http://www.w3.org/2000/svg"
  2021. }, [
  2022. vue.createElementVNode("path", {
  2023. 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",
  2024. fill: "#E0E0E0"
  2025. }),
  2026. vue.createElementVNode("circle", {
  2027. cx: "12",
  2028. cy: "12",
  2029. r: "3",
  2030. stroke: "#CCCCCC",
  2031. "stroke-width": "2"
  2032. }),
  2033. vue.createElementVNode("path", {
  2034. 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",
  2035. fill: "#CCCCCC"
  2036. })
  2037. ])),
  2038. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2039. ],
  2040. 64
  2041. /* STABLE_FRAGMENT */
  2042. ))
  2043. ]),
  2044. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  2045. ]),
  2046. vue.createElementVNode("view", { class: "upload-card" }, [
  2047. vue.createElementVNode("view", {
  2048. class: "upload-box",
  2049. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  2050. }, [
  2051. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  2052. key: 0,
  2053. src: _ctx.idCardBack,
  2054. class: "preview-img",
  2055. mode: "aspectFill"
  2056. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2057. vue.Fragment,
  2058. { key: 1 },
  2059. [
  2060. (vue.openBlock(), vue.createElementBlock("svg", {
  2061. class: "camera-icon",
  2062. viewBox: "0 0 24 24",
  2063. fill: "none",
  2064. xmlns: "http://www.w3.org/2000/svg"
  2065. }, [
  2066. vue.createElementVNode("path", {
  2067. 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",
  2068. fill: "#CCCCCC"
  2069. })
  2070. ])),
  2071. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2072. ],
  2073. 64
  2074. /* STABLE_FRAGMENT */
  2075. ))
  2076. ]),
  2077. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  2078. ]),
  2079. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  2080. vue.createElementVNode("button", {
  2081. class: "next-btn",
  2082. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  2083. }, "下一步,完善资质")
  2084. ])
  2085. ]);
  2086. }
  2087. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2088. const logic$5 = {
  2089. data() {
  2090. return {
  2091. serviceTypes: [],
  2092. // 从上一页传递过来的服务类型列表
  2093. qualifications: {},
  2094. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2095. qualOssIds: {}
  2096. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2097. };
  2098. },
  2099. onLoad(options) {
  2100. if (options.services) {
  2101. try {
  2102. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2103. this.serviceTypes.forEach((item) => {
  2104. this.qualifications[item.name] = [];
  2105. this.qualOssIds[item.name] = [];
  2106. });
  2107. } catch (e) {
  2108. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2109. }
  2110. }
  2111. },
  2112. methods: {
  2113. chooseImage(serviceName) {
  2114. uni.chooseImage({
  2115. count: 9,
  2116. sizeType: ["compressed"],
  2117. sourceType: ["album", "camera"],
  2118. success: async (res) => {
  2119. if (!this.qualifications[serviceName]) {
  2120. this.qualifications[serviceName] = [];
  2121. this.qualOssIds[serviceName] = [];
  2122. }
  2123. for (const tempPath of res.tempFilePaths) {
  2124. this.qualifications[serviceName].push(tempPath);
  2125. this.$forceUpdate();
  2126. try {
  2127. const uploadRes = await uploadFile(tempPath);
  2128. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2129. } catch (err) {
  2130. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  2131. }
  2132. }
  2133. }
  2134. });
  2135. },
  2136. deleteImage(serviceName, index) {
  2137. this.qualifications[serviceName].splice(index, 1);
  2138. if (this.qualOssIds[serviceName]) {
  2139. this.qualOssIds[serviceName].splice(index, 1);
  2140. }
  2141. this.$forceUpdate();
  2142. },
  2143. goBackToForm() {
  2144. const pages = getCurrentPages();
  2145. if (pages.length > 2) {
  2146. uni.navigateBack({
  2147. delta: 2
  2148. });
  2149. } else {
  2150. uni.reLaunch({
  2151. url: "/pages/recruit/form"
  2152. });
  2153. }
  2154. },
  2155. async submit() {
  2156. let recruitData = {};
  2157. try {
  2158. const stored = uni.getStorageSync("recruit_form_data");
  2159. if (stored) {
  2160. recruitData = JSON.parse(stored);
  2161. }
  2162. } catch (e) {
  2163. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2164. }
  2165. const allQualOssIds = [];
  2166. Object.values(this.qualOssIds).forEach((ids) => {
  2167. allQualOssIds.push(...ids);
  2168. });
  2169. const auditData = {
  2170. name: recruitData.name || "",
  2171. phone: recruitData.mobile || "",
  2172. password: recruitData.password || "",
  2173. gender: recruitData.gender === 1 ? "0" : "1",
  2174. birthday: recruitData.birthday || "",
  2175. serviceTypes: (recruitData.serviceType || []).join(","),
  2176. // 逗号分隔的服务类型ID
  2177. city: recruitData.city || "",
  2178. stationId: recruitData.stationId || null,
  2179. realName: recruitData.realName || "",
  2180. idCard: recruitData.idNumber || "",
  2181. idValidDate: recruitData.expiryDate || "",
  2182. idCardFront: recruitData.idCardFrontOssId || null,
  2183. idCardBack: recruitData.idCardBackOssId || null,
  2184. qualifications: allQualOssIds.join(",")
  2185. // 逗号分隔的资质图片OSS ID
  2186. };
  2187. uni.showLoading({ title: "提交中..." });
  2188. try {
  2189. await submitAudit(auditData);
  2190. uni.hideLoading();
  2191. uni.reLaunch({
  2192. url: "/pages/recruit/success"
  2193. });
  2194. } catch (err) {
  2195. uni.hideLoading();
  2196. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2197. }
  2198. }
  2199. }
  2200. };
  2201. const _sfc_main$y = logic$5;
  2202. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2203. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2204. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2205. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2206. key: 0,
  2207. class: "empty-state"
  2208. }, [
  2209. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2210. vue.createElementVNode("button", {
  2211. class: "back-btn",
  2212. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2213. }, "返回选择")
  2214. ])) : vue.createCommentVNode("v-if", true),
  2215. (vue.openBlock(true), vue.createElementBlock(
  2216. vue.Fragment,
  2217. null,
  2218. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2219. return vue.openBlock(), vue.createElementBlock("view", {
  2220. class: "qual-card",
  2221. key: item.id
  2222. }, [
  2223. vue.createElementVNode(
  2224. "view",
  2225. { class: "card-title" },
  2226. vue.toDisplayString(item.name) + "服务资质",
  2227. 1
  2228. /* TEXT */
  2229. ),
  2230. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2231. (vue.openBlock(true), vue.createElementBlock(
  2232. vue.Fragment,
  2233. null,
  2234. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2235. return vue.openBlock(), vue.createElementBlock("view", {
  2236. class: "img-item",
  2237. key: imgIndex
  2238. }, [
  2239. vue.createElementVNode("image", {
  2240. src: img,
  2241. class: "preview-img",
  2242. mode: "aspectFill",
  2243. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2244. }, null, 8, ["src", "onClick"]),
  2245. vue.createElementVNode("view", {
  2246. class: "delete-btn",
  2247. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2248. }, "×", 8, ["onClick"])
  2249. ]);
  2250. }),
  2251. 128
  2252. /* KEYED_FRAGMENT */
  2253. )),
  2254. vue.createElementVNode("view", {
  2255. class: "upload-box",
  2256. onClick: ($event) => _ctx.chooseImage(item.name)
  2257. }, [
  2258. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2259. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2260. ], 8, ["onClick"])
  2261. ])
  2262. ]);
  2263. }),
  2264. 128
  2265. /* KEYED_FRAGMENT */
  2266. )),
  2267. vue.createElementVNode("view", { class: "footer-actions" }, [
  2268. vue.createElementVNode("button", {
  2269. class: "submit-btn",
  2270. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2271. }, "立即提交")
  2272. ])
  2273. ]);
  2274. }
  2275. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2276. const logic$4 = {
  2277. data() {
  2278. return {
  2279. station: "民治街道第一站",
  2280. name: "张三哥",
  2281. phone: "+8613612345678"
  2282. };
  2283. },
  2284. methods: {
  2285. goHome() {
  2286. uni.reLaunch({
  2287. url: "/pages/login/login"
  2288. });
  2289. }
  2290. }
  2291. };
  2292. const _sfc_main$x = logic$4;
  2293. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2294. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2295. vue.createElementVNode("view", { class: "icon-area" }, [
  2296. (vue.openBlock(), vue.createElementBlock("svg", {
  2297. class: "success-icon",
  2298. viewBox: "0 0 1024 1024",
  2299. version: "1.1",
  2300. xmlns: "http://www.w3.org/2000/svg"
  2301. }, [
  2302. vue.createElementVNode("path", {
  2303. 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",
  2304. fill: "#64D01D"
  2305. }),
  2306. vue.createElementVNode("path", {
  2307. 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",
  2308. fill: "#64D01D"
  2309. })
  2310. ])),
  2311. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2312. ]),
  2313. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2314. vue.createElementVNode("view", { class: "info-card" }, [
  2315. vue.createElementVNode("view", { class: "info-item" }, [
  2316. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2317. vue.createElementVNode(
  2318. "text",
  2319. { class: "value" },
  2320. vue.toDisplayString(_ctx.station),
  2321. 1
  2322. /* TEXT */
  2323. )
  2324. ]),
  2325. vue.createElementVNode("view", { class: "info-item" }, [
  2326. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2327. vue.createElementVNode(
  2328. "text",
  2329. { class: "value" },
  2330. vue.toDisplayString(_ctx.name),
  2331. 1
  2332. /* TEXT */
  2333. )
  2334. ]),
  2335. vue.createElementVNode("view", { class: "info-item" }, [
  2336. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2337. vue.createElementVNode(
  2338. "text",
  2339. { class: "value" },
  2340. vue.toDisplayString(_ctx.phone),
  2341. 1
  2342. /* TEXT */
  2343. )
  2344. ])
  2345. ]),
  2346. vue.createElementVNode("view", {
  2347. class: "footer-btn",
  2348. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2349. }, "我知道了")
  2350. ]);
  2351. }
  2352. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2353. const _sfc_main$w = {
  2354. data() {
  2355. return {
  2356. mobile: "",
  2357. code: "",
  2358. countDown: 0,
  2359. timer: null
  2360. };
  2361. },
  2362. computed: {
  2363. mobileMask() {
  2364. if (!this.mobile)
  2365. return "";
  2366. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2367. }
  2368. },
  2369. onLoad(options) {
  2370. if (options.mobile) {
  2371. this.mobile = options.mobile;
  2372. } else {
  2373. this.mobile = "13412346783";
  2374. }
  2375. },
  2376. methods: {
  2377. getVerifyCode() {
  2378. if (this.countDown > 0)
  2379. return;
  2380. this.countDown = 60;
  2381. this.timer = setInterval(() => {
  2382. this.countDown--;
  2383. if (this.countDown <= 0) {
  2384. clearInterval(this.timer);
  2385. }
  2386. }, 1e3);
  2387. uni.showToast({ title: "验证码已发送", icon: "none" });
  2388. },
  2389. nextStep() {
  2390. if (!this.code) {
  2391. uni.showToast({ title: "请输入验证码", icon: "none" });
  2392. return;
  2393. }
  2394. uni.navigateTo({
  2395. url: "/pages/login/reset-pwd-set"
  2396. });
  2397. }
  2398. }
  2399. };
  2400. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2401. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2402. vue.createElementVNode("view", { class: "content" }, [
  2403. vue.createElementVNode(
  2404. "view",
  2405. { class: "tip-text" },
  2406. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2407. 1
  2408. /* TEXT */
  2409. ),
  2410. vue.createElementVNode("view", { class: "input-group" }, [
  2411. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2412. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2413. vue.withDirectives(vue.createElementVNode(
  2414. "input",
  2415. {
  2416. class: "code-input",
  2417. type: "number",
  2418. maxlength: "6",
  2419. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2420. },
  2421. null,
  2422. 512
  2423. /* NEED_PATCH */
  2424. ), [
  2425. [vue.vModelText, $data.code]
  2426. ]),
  2427. vue.createElementVNode("view", {
  2428. class: "get-code-btn",
  2429. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2430. }, [
  2431. vue.createElementVNode(
  2432. "text",
  2433. { class: "btn-text" },
  2434. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2435. 1
  2436. /* TEXT */
  2437. )
  2438. ])
  2439. ])
  2440. ]),
  2441. vue.createElementVNode("button", {
  2442. class: "next-btn",
  2443. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2444. }, "下一步")
  2445. ])
  2446. ]);
  2447. }
  2448. 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"]]);
  2449. const _sfc_main$v = {
  2450. data() {
  2451. return {
  2452. pwd1: "",
  2453. pwd2: ""
  2454. };
  2455. },
  2456. methods: {
  2457. confirmReset() {
  2458. if (!this.pwd1 || !this.pwd2) {
  2459. uni.showToast({ title: "请输入密码", icon: "none" });
  2460. return;
  2461. }
  2462. if (this.pwd1 !== this.pwd2) {
  2463. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2464. return;
  2465. }
  2466. uni.showToast({ title: "重置成功", icon: "success" });
  2467. setTimeout(() => {
  2468. uni.navigateBack({
  2469. delta: 2
  2470. // 返回到登录页
  2471. });
  2472. }, 1500);
  2473. }
  2474. }
  2475. };
  2476. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2477. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2478. vue.createElementVNode("view", { class: "content" }, [
  2479. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2480. vue.createElementVNode("view", { class: "input-form" }, [
  2481. vue.createElementVNode("view", { class: "input-row" }, [
  2482. vue.withDirectives(vue.createElementVNode(
  2483. "input",
  2484. {
  2485. class: "pwd-input",
  2486. type: "text",
  2487. password: "",
  2488. placeholder: "限12-20位字母和数字组合",
  2489. "placeholder-style": "color:#ccc",
  2490. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2491. },
  2492. null,
  2493. 512
  2494. /* NEED_PATCH */
  2495. ), [
  2496. [vue.vModelText, $data.pwd1]
  2497. ])
  2498. ]),
  2499. vue.createElementVNode("view", { class: "divider" }),
  2500. vue.createElementVNode("view", { class: "input-row" }, [
  2501. vue.withDirectives(vue.createElementVNode(
  2502. "input",
  2503. {
  2504. class: "pwd-input",
  2505. type: "text",
  2506. password: "",
  2507. placeholder: "限12-20位字母和数字组合",
  2508. "placeholder-style": "color:#ccc",
  2509. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2510. },
  2511. null,
  2512. 512
  2513. /* NEED_PATCH */
  2514. ), [
  2515. [vue.vModelText, $data.pwd2]
  2516. ])
  2517. ]),
  2518. vue.createElementVNode("view", { class: "divider" })
  2519. ]),
  2520. vue.createElementVNode("button", {
  2521. class: "confirm-btn",
  2522. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2523. }, "确定")
  2524. ])
  2525. ]);
  2526. }
  2527. 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"]]);
  2528. function getServiceList() {
  2529. return request({
  2530. url: "/service/list/listOnTaskHall",
  2531. method: "GET"
  2532. });
  2533. }
  2534. function getServiceDetail(id) {
  2535. return request({
  2536. url: `/service/list/${id}`,
  2537. method: "GET"
  2538. });
  2539. }
  2540. function cancelOrderApi(data) {
  2541. return request({
  2542. url: "/order/subOrder/cancel",
  2543. method: "PUT",
  2544. data
  2545. });
  2546. }
  2547. function rejectOrderApi(data) {
  2548. return request({
  2549. url: "/order/subOrder/reject",
  2550. method: "PUT",
  2551. data
  2552. });
  2553. }
  2554. const _sfc_main$u = {
  2555. __name: "index",
  2556. props: {
  2557. currentPath: {
  2558. type: String,
  2559. required: true
  2560. }
  2561. },
  2562. setup(__props, { expose: __expose }) {
  2563. __expose();
  2564. const props = __props;
  2565. const list = vue.ref([
  2566. {
  2567. pagePath: "pages/home/index",
  2568. text: "任务中心",
  2569. iconPath: "/static/tabbar/home.svg",
  2570. selectedIconPath: "/static/tabbar/home-active.svg"
  2571. },
  2572. {
  2573. pagePath: "pages/orders/index",
  2574. text: "我的订单",
  2575. iconPath: "/static/tabbar/order.svg",
  2576. selectedIconPath: "/static/tabbar/order-active.svg"
  2577. },
  2578. {
  2579. pagePath: "pages/mine/index",
  2580. text: "我的",
  2581. iconPath: "/static/tabbar/mine.svg",
  2582. selectedIconPath: "/static/tabbar/mine-active.svg"
  2583. }
  2584. ]);
  2585. const switchTab = (path) => {
  2586. if (props.currentPath === path)
  2587. return;
  2588. uni.switchTab({
  2589. url: "/" + path
  2590. });
  2591. };
  2592. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2593. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2594. return __returned__;
  2595. }
  2596. };
  2597. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2598. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2599. vue.createElementVNode("view", { class: "tabbar-border" }),
  2600. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2601. (vue.openBlock(true), vue.createElementBlock(
  2602. vue.Fragment,
  2603. null,
  2604. vue.renderList($setup.list, (item, index) => {
  2605. return vue.openBlock(), vue.createElementBlock("view", {
  2606. class: "tabbar-item",
  2607. key: index,
  2608. onClick: ($event) => $setup.switchTab(item.pagePath)
  2609. }, [
  2610. vue.createElementVNode("image", {
  2611. class: "tabbar-icon",
  2612. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2613. }, null, 8, ["src"]),
  2614. vue.createElementVNode(
  2615. "view",
  2616. {
  2617. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2618. },
  2619. vue.toDisplayString(item.text),
  2620. 3
  2621. /* TEXT, CLASS */
  2622. )
  2623. ], 8, ["onClick"]);
  2624. }),
  2625. 128
  2626. /* KEYED_FRAGMENT */
  2627. ))
  2628. ])
  2629. ]);
  2630. }
  2631. 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"]]);
  2632. const logic$3 = {
  2633. components: {
  2634. customTabbar
  2635. },
  2636. data() {
  2637. return {
  2638. taskList: [],
  2639. currentFilter: "default",
  2640. // default, distance, time
  2641. filterCondition: "筛选条件",
  2642. sortDistance: "asc",
  2643. // asc, desc
  2644. sortTime: "asc",
  2645. scrollTop: 0,
  2646. // Track scroll position
  2647. isFilterShow: false,
  2648. tempFilter: {
  2649. service: null,
  2650. distance: "全部",
  2651. amount: "全部"
  2652. },
  2653. activeFilter: {
  2654. service: null,
  2655. distance: "全部",
  2656. amount: "全部"
  2657. },
  2658. workStatus: "working",
  2659. // working | resting
  2660. showConfirmModal: false,
  2661. showPetModal: false,
  2662. currentPetInfo: {},
  2663. showRejectModal: false,
  2664. rejectReason: "",
  2665. currentOrder: null,
  2666. showAcceptConfirmModal: false,
  2667. showNavModal: false,
  2668. navTargetItem: null,
  2669. navTargetPointType: "",
  2670. profile: null,
  2671. profileLoading: false,
  2672. serviceList: [],
  2673. orderStats: {
  2674. total: 0,
  2675. reject: 0,
  2676. award: 0,
  2677. punishment: 0
  2678. }
  2679. };
  2680. },
  2681. onPageScroll(e) {
  2682. this.scrollTop = e.scrollTop;
  2683. },
  2684. async onLoad() {
  2685. this.checkWorkStatus();
  2686. await this.loadServiceList();
  2687. this.loadTaskList();
  2688. },
  2689. onShow() {
  2690. uni.hideTabBar();
  2691. this.checkWorkStatus();
  2692. if (isLoggedIn()) {
  2693. this.loadProfile();
  2694. this.loadOrderStats();
  2695. }
  2696. },
  2697. async onPullDownRefresh() {
  2698. this.checkWorkStatus();
  2699. try {
  2700. await this.loadServiceList();
  2701. const tasks = [
  2702. this.loadTaskList()
  2703. ];
  2704. if (isLoggedIn()) {
  2705. tasks.push(this.loadProfile());
  2706. tasks.push(this.loadOrderStats());
  2707. }
  2708. await Promise.all(tasks);
  2709. } catch (err) {
  2710. formatAppLog("error", "at pages/home/logic.js:86", "刷新异常:", err);
  2711. } finally {
  2712. uni.stopPullDownRefresh();
  2713. uni.showToast({ title: "刷新成功", icon: "success" });
  2714. }
  2715. },
  2716. methods: {
  2717. async loadProfile() {
  2718. if (this.profileLoading)
  2719. return;
  2720. this.profileLoading = true;
  2721. try {
  2722. const res = await getMyProfile();
  2723. this.profile = res.data || null;
  2724. } catch (err) {
  2725. formatAppLog("error", "at pages/home/logic.js:100", "获取个人信息失败:", err);
  2726. } finally {
  2727. this.profileLoading = false;
  2728. }
  2729. },
  2730. async loadServiceList() {
  2731. try {
  2732. const res = await getServiceList();
  2733. this.serviceList = res.data || [];
  2734. } catch (err) {
  2735. formatAppLog("error", "at pages/home/logic.js:110", "获取服务类型失败:", err);
  2736. }
  2737. },
  2738. async loadOrderStats() {
  2739. try {
  2740. const res = await getOrderCount();
  2741. this.orderStats = res.data || { total: 0, reject: 0, award: 0, punishment: 0 };
  2742. } catch (err) {
  2743. formatAppLog("error", "at pages/home/logic.js:118", "获取订单统计失败:", err);
  2744. }
  2745. },
  2746. checkWorkStatus() {
  2747. const status = uni.getStorageSync("workStatus");
  2748. if (status) {
  2749. this.workStatus = status;
  2750. } else {
  2751. this.workStatus = "working";
  2752. uni.setStorageSync("workStatus", "working");
  2753. }
  2754. },
  2755. toggleFilter() {
  2756. if (this.workStatus === "resting")
  2757. return;
  2758. this.isFilterShow = !this.isFilterShow;
  2759. },
  2760. goToWorkStatus() {
  2761. uni.navigateTo({
  2762. url: "/pages/home/work-status"
  2763. });
  2764. },
  2765. startWork() {
  2766. this.showConfirmModal = true;
  2767. },
  2768. confirmStartWork() {
  2769. this.workStatus = "working";
  2770. uni.setStorageSync("workStatus", "working");
  2771. this.loadTaskList();
  2772. this.showConfirmModal = false;
  2773. uni.showToast({ title: "已开始接单", icon: "success" });
  2774. },
  2775. closeConfirmModal() {
  2776. this.showConfirmModal = false;
  2777. },
  2778. showPetProfile(item) {
  2779. this.currentPetInfo = item;
  2780. this.showPetModal = true;
  2781. },
  2782. closePetProfile() {
  2783. this.showPetModal = false;
  2784. },
  2785. openRejectModal(item) {
  2786. this.currentOrder = item;
  2787. this.rejectReason = "";
  2788. this.showRejectModal = true;
  2789. },
  2790. closeRejectModal() {
  2791. this.showRejectModal = false;
  2792. this.currentOrder = null;
  2793. },
  2794. async confirmReject() {
  2795. var _a;
  2796. if (!this.rejectReason.trim()) {
  2797. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2798. return;
  2799. }
  2800. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2801. return;
  2802. try {
  2803. uni.showLoading({ title: "提交中...", mask: true });
  2804. await rejectOrderApi({
  2805. orderId: this.currentOrder.id,
  2806. rejectReason: this.rejectReason
  2807. });
  2808. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2809. this.showRejectModal = false;
  2810. this.currentOrder = null;
  2811. this.loadTaskList();
  2812. } catch (err) {
  2813. formatAppLog("error", "at pages/home/logic.js:186", "拒绝接单失败:", err);
  2814. uni.showToast({ title: "操作失败", icon: "none" });
  2815. } finally {
  2816. uni.hideLoading();
  2817. }
  2818. },
  2819. openAcceptModal(item) {
  2820. this.currentOrder = item;
  2821. this.showAcceptConfirmModal = true;
  2822. },
  2823. closeAcceptModal() {
  2824. this.showAcceptConfirmModal = false;
  2825. this.currentOrder = null;
  2826. },
  2827. async confirmAccept() {
  2828. var _a;
  2829. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2830. return;
  2831. try {
  2832. await acceptOrder(this.currentOrder.id);
  2833. uni.showToast({ title: "接单成功", icon: "success" });
  2834. this.showAcceptConfirmModal = false;
  2835. this.currentOrder = null;
  2836. this.loadTaskList();
  2837. this.loadProfile();
  2838. } catch (err) {
  2839. formatAppLog("error", "at pages/home/logic.js:210", "接单失败:", err);
  2840. uni.showToast({ title: "接单失败", icon: "none" });
  2841. }
  2842. },
  2843. openNavigation(item, pointType) {
  2844. this.navTargetItem = item;
  2845. this.navTargetPointType = pointType;
  2846. this.showNavModal = true;
  2847. },
  2848. closeNavModal() {
  2849. this.showNavModal = false;
  2850. },
  2851. chooseMap(mapType) {
  2852. let item = this.navTargetItem;
  2853. let pointType = this.navTargetPointType;
  2854. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2855. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2856. this.showNavModal = false;
  2857. uni.openLocation({
  2858. latitude: 30.52,
  2859. // Mock lat
  2860. longitude: 114.31,
  2861. // Mock lng
  2862. name: name || "目的地",
  2863. address: address || "默认地址",
  2864. success: function() {
  2865. formatAppLog("log", "at pages/home/logic.js:236", "打开导航成功: " + mapType);
  2866. }
  2867. });
  2868. },
  2869. selectService(type) {
  2870. this.tempFilter.service = type;
  2871. },
  2872. selectDistance(type) {
  2873. this.tempFilter.distance = type;
  2874. },
  2875. selectAmount(type) {
  2876. this.tempFilter.amount = type;
  2877. },
  2878. resetFilter() {
  2879. this.tempFilter = {
  2880. service: null,
  2881. distance: "全部",
  2882. amount: "全部"
  2883. };
  2884. },
  2885. confirmFilter() {
  2886. this.activeFilter = { ...this.tempFilter };
  2887. this.isFilterShow = false;
  2888. this.loadTaskList();
  2889. },
  2890. closeFilter() {
  2891. this.isFilterShow = false;
  2892. },
  2893. goToDetail(item) {
  2894. formatAppLog("log", "at pages/home/logic.js:265", "Go to detail", item);
  2895. },
  2896. async loadTaskList() {
  2897. try {
  2898. const params = {
  2899. service: this.activeFilter.service,
  2900. minPrice: this.getMinPrice(),
  2901. maxPrice: this.getMaxPrice(),
  2902. pageNum: 1,
  2903. pageSize: 20
  2904. };
  2905. const res = await getPendingOrders(params);
  2906. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  2907. } catch (err) {
  2908. formatAppLog("error", "at pages/home/logic.js:279", "获取订单列表失败:", err);
  2909. uni.showToast({ title: "加载失败", icon: "none" });
  2910. this.taskList = [];
  2911. }
  2912. },
  2913. getMinPrice() {
  2914. const amount = this.activeFilter.amount;
  2915. if (amount === "100以下")
  2916. return 0;
  2917. if (amount === "100-200")
  2918. return 1e4;
  2919. if (amount === "200-500")
  2920. return 2e4;
  2921. if (amount === "500以上")
  2922. return 5e4;
  2923. return void 0;
  2924. },
  2925. getMaxPrice() {
  2926. const amount = this.activeFilter.amount;
  2927. if (amount === "100以下")
  2928. return 1e4;
  2929. if (amount === "100-200")
  2930. return 2e4;
  2931. if (amount === "200-500")
  2932. return 5e4;
  2933. return void 0;
  2934. },
  2935. transformOrder(item) {
  2936. const service = this.serviceList.find((s) => s.id === item.service);
  2937. const serviceText = (service == null ? void 0 : service.name) || "未知";
  2938. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  2939. const mode = (service == null ? void 0 : service.mode) || 0;
  2940. const isRoundTrip = mode === 1;
  2941. return {
  2942. id: item.id,
  2943. type: isRoundTrip ? 1 : item.service,
  2944. typeText: serviceText,
  2945. typeIcon: serviceIcon,
  2946. price: (item.price / 100).toFixed(2),
  2947. timeLabel: "服务时间",
  2948. time: item.serviceTime,
  2949. petAvatar: "/static/dog.png",
  2950. petName: item.petName,
  2951. petBreed: item.breed,
  2952. petGender: "M",
  2953. petAge: "",
  2954. petWeight: "",
  2955. petPersonality: "",
  2956. petHobby: "",
  2957. petRemark: "",
  2958. petTags: [],
  2959. petLogs: [],
  2960. startLocation: isRoundTrip ? item.fromAddress : "",
  2961. startAddress: isRoundTrip ? item.fromAddress : "",
  2962. startDistance: "0km",
  2963. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  2964. endAddress: item.toAddress,
  2965. endDistance: "0km",
  2966. serviceContent: "",
  2967. remark: item.remark || ""
  2968. };
  2969. },
  2970. setFilter(type) {
  2971. this.currentFilter = type;
  2972. if (type === "distance") {
  2973. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  2974. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  2975. } else if (type === "time") {
  2976. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  2977. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  2978. }
  2979. },
  2980. showFilterDropdown() {
  2981. this.toggleFilter();
  2982. }
  2983. }
  2984. };
  2985. const _imports_0$3 = "/static/icons/bell.svg";
  2986. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  2987. const _sfc_main$t = {
  2988. ...logic$3
  2989. };
  2990. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  2991. var _a, _b, _c;
  2992. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  2993. return vue.openBlock(), vue.createElementBlock(
  2994. vue.Fragment,
  2995. null,
  2996. [
  2997. vue.createElementVNode("view", { class: "container" }, [
  2998. vue.createElementVNode(
  2999. "view",
  3000. {
  3001. class: "custom-nav-bar",
  3002. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3003. },
  3004. [
  3005. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3006. ],
  3007. 4
  3008. /* STYLE */
  3009. ),
  3010. vue.createElementVNode("view", { class: "nav-bg" }, [
  3011. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3012. vue.createElementVNode("view", { class: "bg-circle-right" })
  3013. ]),
  3014. vue.createElementVNode("view", { class: "header-section" }, [
  3015. vue.createElementVNode("view", { class: "user-info" }, [
  3016. vue.createElementVNode("image", {
  3017. class: "avatar",
  3018. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3019. mode: "aspectFill"
  3020. }, null, 8, ["src"]),
  3021. vue.createElementVNode("view", { class: "info-content" }, [
  3022. vue.createElementVNode("view", { class: "top-row" }, [
  3023. vue.createElementVNode(
  3024. "text",
  3025. { class: "name" },
  3026. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3027. 1
  3028. /* TEXT */
  3029. ),
  3030. vue.createElementVNode(
  3031. "view",
  3032. {
  3033. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus === "resting" }]),
  3034. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3035. },
  3036. [
  3037. vue.createElementVNode("view", { class: "status-dot-bg" }, [
  3038. _ctx.workStatus === "working" ? (vue.openBlock(), vue.createElementBlock("text", {
  3039. key: 0,
  3040. class: "check-mark"
  3041. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3042. key: 1,
  3043. class: "check-mark",
  3044. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3045. }, "✕"))
  3046. ]),
  3047. vue.createElementVNode(
  3048. "text",
  3049. { class: "status-text" },
  3050. vue.toDisplayString(_ctx.workStatus === "working" ? "接单中" : "正在休息"),
  3051. 1
  3052. /* TEXT */
  3053. ),
  3054. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3055. ],
  3056. 2
  3057. /* CLASS */
  3058. )
  3059. ]),
  3060. vue.createElementVNode("view", { class: "bottom-row" }, [
  3061. vue.createElementVNode(
  3062. "text",
  3063. { class: "city-label" },
  3064. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3065. 1
  3066. /* TEXT */
  3067. ),
  3068. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3069. ])
  3070. ]),
  3071. vue.createElementVNode("view", { class: "notification-box" }, [
  3072. vue.createElementVNode("image", {
  3073. class: "bell-img",
  3074. src: _imports_0$3
  3075. }),
  3076. vue.createElementVNode("view", { class: "badge-count" }, "2")
  3077. ])
  3078. ]),
  3079. vue.createElementVNode("view", { class: "stats-card" }, [
  3080. vue.createElementVNode("view", { class: "stat-item" }, [
  3081. vue.createElementVNode(
  3082. "text",
  3083. { class: "num" },
  3084. vue.toDisplayString(_ctx.orderStats.total),
  3085. 1
  3086. /* TEXT */
  3087. ),
  3088. vue.createElementVNode("text", { class: "label" }, "累计接单")
  3089. ]),
  3090. vue.createElementVNode("view", { class: "divider" }),
  3091. vue.createElementVNode("view", { class: "stat-item" }, [
  3092. vue.createElementVNode(
  3093. "text",
  3094. { class: "num" },
  3095. vue.toDisplayString(_ctx.orderStats.reject),
  3096. 1
  3097. /* TEXT */
  3098. ),
  3099. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3100. ]),
  3101. vue.createElementVNode("view", { class: "divider" }),
  3102. vue.createElementVNode("view", { class: "stat-item" }, [
  3103. vue.createElementVNode(
  3104. "text",
  3105. { class: "num" },
  3106. vue.toDisplayString(_ctx.orderStats.award),
  3107. 1
  3108. /* TEXT */
  3109. ),
  3110. vue.createElementVNode("text", { class: "label" }, "奖励订单")
  3111. ]),
  3112. vue.createElementVNode("view", { class: "divider" }),
  3113. vue.createElementVNode("view", { class: "stat-item" }, [
  3114. vue.createElementVNode(
  3115. "text",
  3116. { class: "num" },
  3117. vue.toDisplayString(_ctx.orderStats.punishment),
  3118. 1
  3119. /* TEXT */
  3120. ),
  3121. vue.createElementVNode("text", { class: "label" }, "惩罚订单")
  3122. ])
  3123. ])
  3124. ]),
  3125. vue.createElementVNode("view", { class: "task-header" }, [
  3126. vue.createElementVNode(
  3127. "view",
  3128. {
  3129. class: "header-inner",
  3130. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3131. },
  3132. [
  3133. vue.createElementVNode("view", { class: "left-title" }, [
  3134. vue.createElementVNode("view", { class: "orange-bar" }),
  3135. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3136. vue.createElementVNode(
  3137. "text",
  3138. { class: "count" },
  3139. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3140. 1
  3141. /* TEXT */
  3142. )
  3143. ]),
  3144. vue.createElementVNode("view", { class: "filter-options" }, [
  3145. vue.createElementVNode("view", {
  3146. class: "dropdown",
  3147. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3148. }, [
  3149. vue.createElementVNode("text", null, "筛选条件"),
  3150. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3151. ])
  3152. ])
  3153. ],
  3154. 4
  3155. /* STYLE */
  3156. ),
  3157. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3158. key: 0,
  3159. class: "filter-mask",
  3160. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3161. })) : vue.createCommentVNode("v-if", true),
  3162. vue.createElementVNode(
  3163. "view",
  3164. {
  3165. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3166. },
  3167. [
  3168. vue.createElementVNode("view", { class: "filter-section" }, [
  3169. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3170. vue.createElementVNode("view", { class: "options-grid" }, [
  3171. vue.createElementVNode(
  3172. "view",
  3173. {
  3174. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3175. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3176. },
  3177. "全部",
  3178. 2
  3179. /* CLASS */
  3180. ),
  3181. (vue.openBlock(true), vue.createElementBlock(
  3182. vue.Fragment,
  3183. null,
  3184. vue.renderList(_ctx.serviceList, (item) => {
  3185. return vue.openBlock(), vue.createElementBlock("view", {
  3186. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3187. key: item.id,
  3188. onClick: ($event) => _ctx.selectService(item.id)
  3189. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3190. }),
  3191. 128
  3192. /* KEYED_FRAGMENT */
  3193. ))
  3194. ])
  3195. ]),
  3196. vue.createElementVNode("view", { class: "filter-section" }, [
  3197. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3198. vue.createElementVNode("view", { class: "options-grid" }, [
  3199. vue.createElementVNode(
  3200. "view",
  3201. {
  3202. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3203. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3204. },
  3205. "全部",
  3206. 2
  3207. /* CLASS */
  3208. ),
  3209. vue.createElementVNode(
  3210. "view",
  3211. {
  3212. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3213. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3214. },
  3215. "100以下",
  3216. 2
  3217. /* CLASS */
  3218. ),
  3219. vue.createElementVNode(
  3220. "view",
  3221. {
  3222. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3223. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3224. },
  3225. "100-200",
  3226. 2
  3227. /* CLASS */
  3228. ),
  3229. vue.createElementVNode(
  3230. "view",
  3231. {
  3232. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3233. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3234. },
  3235. "200-500",
  3236. 2
  3237. /* CLASS */
  3238. ),
  3239. vue.createElementVNode(
  3240. "view",
  3241. {
  3242. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3243. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3244. },
  3245. "500以上",
  3246. 2
  3247. /* CLASS */
  3248. )
  3249. ])
  3250. ]),
  3251. vue.createElementVNode("view", { class: "filter-actions" }, [
  3252. vue.createElementVNode("button", {
  3253. class: "action-btn reset",
  3254. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3255. }, "重置"),
  3256. vue.createElementVNode("button", {
  3257. class: "action-btn confirm",
  3258. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3259. }, "确认")
  3260. ])
  3261. ],
  3262. 2
  3263. /* CLASS */
  3264. )
  3265. ]),
  3266. vue.createElementVNode("view", { class: "task-list-container" }, [
  3267. vue.createElementVNode("view", { class: "task-list" }, [
  3268. (vue.openBlock(true), vue.createElementBlock(
  3269. vue.Fragment,
  3270. null,
  3271. vue.renderList(_ctx.taskList, (item, index) => {
  3272. return vue.openBlock(), vue.createElementBlock("view", {
  3273. class: "task-card",
  3274. key: index,
  3275. onClick: ($event) => _ctx.goToDetail(item)
  3276. }, [
  3277. vue.createElementVNode("view", { class: "card-header" }, [
  3278. vue.createElementVNode("view", { class: "type-badge" }, [
  3279. vue.createElementVNode("image", {
  3280. class: "type-icon",
  3281. src: item.typeIcon
  3282. }, null, 8, ["src"]),
  3283. vue.createElementVNode(
  3284. "text",
  3285. { class: "type-text" },
  3286. vue.toDisplayString(item.typeText),
  3287. 1
  3288. /* TEXT */
  3289. )
  3290. ]),
  3291. vue.createElementVNode(
  3292. "text",
  3293. { class: "price" },
  3294. "¥" + vue.toDisplayString(item.price),
  3295. 1
  3296. /* TEXT */
  3297. )
  3298. ]),
  3299. vue.createElementVNode("view", { class: "card-body" }, [
  3300. vue.createElementVNode("view", { class: "time-row" }, [
  3301. vue.createElementVNode(
  3302. "text",
  3303. { class: "label" },
  3304. vue.toDisplayString(item.timeLabel) + ":",
  3305. 1
  3306. /* TEXT */
  3307. ),
  3308. vue.createElementVNode(
  3309. "text",
  3310. { class: "value" },
  3311. vue.toDisplayString(item.time),
  3312. 1
  3313. /* TEXT */
  3314. )
  3315. ]),
  3316. vue.createElementVNode("view", { class: "pet-card" }, [
  3317. vue.createElementVNode("image", {
  3318. class: "pet-avatar",
  3319. src: item.petAvatar,
  3320. mode: "aspectFill"
  3321. }, null, 8, ["src"]),
  3322. vue.createElementVNode("view", { class: "pet-info" }, [
  3323. vue.createElementVNode(
  3324. "text",
  3325. { class: "pet-name" },
  3326. vue.toDisplayString(item.petName),
  3327. 1
  3328. /* TEXT */
  3329. ),
  3330. vue.createElementVNode(
  3331. "text",
  3332. { class: "pet-breed" },
  3333. "品种: " + vue.toDisplayString(item.petBreed),
  3334. 1
  3335. /* TEXT */
  3336. )
  3337. ])
  3338. ]),
  3339. vue.createElementVNode("view", { class: "route-info" }, [
  3340. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3341. vue.Fragment,
  3342. { key: 0 },
  3343. [
  3344. vue.createElementVNode("view", {
  3345. class: "route-item",
  3346. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3347. }, [
  3348. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3349. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3350. vue.createElementVNode("view", { class: "address-box" }, [
  3351. vue.createElementVNode(
  3352. "text",
  3353. { class: "addr-title" },
  3354. vue.toDisplayString(item.startLocation),
  3355. 1
  3356. /* TEXT */
  3357. ),
  3358. vue.createElementVNode(
  3359. "text",
  3360. { class: "addr-desc" },
  3361. vue.toDisplayString(item.startAddress),
  3362. 1
  3363. /* TEXT */
  3364. )
  3365. ]),
  3366. vue.createElementVNode("image", {
  3367. class: "nav-arrow",
  3368. src: _imports_3$2,
  3369. style: { "flex-shrink": "0", "align-self": "center" }
  3370. })
  3371. ], 8, ["onClick"]),
  3372. vue.createElementVNode("view", {
  3373. class: "route-item",
  3374. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3375. }, [
  3376. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3377. vue.createElementVNode("view", { class: "address-box" }, [
  3378. vue.createElementVNode(
  3379. "text",
  3380. { class: "addr-title" },
  3381. vue.toDisplayString(item.endLocation),
  3382. 1
  3383. /* TEXT */
  3384. ),
  3385. vue.createElementVNode(
  3386. "text",
  3387. { class: "addr-desc" },
  3388. vue.toDisplayString(item.endAddress),
  3389. 1
  3390. /* TEXT */
  3391. )
  3392. ]),
  3393. vue.createElementVNode("image", {
  3394. class: "nav-arrow",
  3395. src: _imports_3$2,
  3396. style: { "flex-shrink": "0", "align-self": "center" }
  3397. })
  3398. ], 8, ["onClick"])
  3399. ],
  3400. 64
  3401. /* STABLE_FRAGMENT */
  3402. )) : (vue.openBlock(), vue.createElementBlock(
  3403. vue.Fragment,
  3404. { key: 1 },
  3405. [
  3406. vue.createElementVNode("view", {
  3407. class: "route-item",
  3408. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3409. }, [
  3410. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3411. vue.createElementVNode("view", { class: "address-box" }, [
  3412. vue.createElementVNode(
  3413. "text",
  3414. { class: "addr-title" },
  3415. vue.toDisplayString(item.endLocation),
  3416. 1
  3417. /* TEXT */
  3418. ),
  3419. vue.createElementVNode(
  3420. "text",
  3421. { class: "addr-desc" },
  3422. vue.toDisplayString(item.endAddress),
  3423. 1
  3424. /* TEXT */
  3425. )
  3426. ]),
  3427. vue.createElementVNode("image", {
  3428. class: "nav-arrow",
  3429. src: _imports_3$2,
  3430. style: { "flex-shrink": "0", "align-self": "center" }
  3431. })
  3432. ], 8, ["onClick"]),
  3433. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3434. key: 0,
  3435. class: "service-content"
  3436. }, [
  3437. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3438. vue.createElementVNode(
  3439. "text",
  3440. null,
  3441. vue.toDisplayString(item.serviceContent),
  3442. 1
  3443. /* TEXT */
  3444. )
  3445. ])) : vue.createCommentVNode("v-if", true)
  3446. ],
  3447. 64
  3448. /* STABLE_FRAGMENT */
  3449. ))
  3450. ]),
  3451. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3452. key: 0,
  3453. class: "remark-box"
  3454. }, [
  3455. vue.createElementVNode(
  3456. "text",
  3457. null,
  3458. "备注:" + vue.toDisplayString(item.remark),
  3459. 1
  3460. /* TEXT */
  3461. )
  3462. ])) : vue.createCommentVNode("v-if", true)
  3463. ]),
  3464. vue.createElementVNode("view", { class: "action-btns" }, [
  3465. vue.createElementVNode("button", {
  3466. class: "btn reject",
  3467. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3468. }, "拒绝", 8, ["onClick"]),
  3469. vue.createElementVNode("button", {
  3470. class: "btn accept",
  3471. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3472. }, "接单", 8, ["onClick"])
  3473. ])
  3474. ], 8, ["onClick"]);
  3475. }),
  3476. 128
  3477. /* KEYED_FRAGMENT */
  3478. )),
  3479. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3480. ])
  3481. ]),
  3482. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3483. key: 0,
  3484. class: "modal-mask"
  3485. }, [
  3486. vue.createElementVNode("view", { class: "custom-modal" }, [
  3487. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3488. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3489. vue.createElementVNode("view", { class: "modal-btns" }, [
  3490. vue.createElementVNode("button", {
  3491. class: "modal-btn cancel",
  3492. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3493. }, "取消"),
  3494. vue.createElementVNode("button", {
  3495. class: "modal-btn confirm",
  3496. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3497. }, "确定")
  3498. ])
  3499. ])
  3500. ])) : vue.createCommentVNode("v-if", true),
  3501. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3502. key: 1,
  3503. class: "pet-modal-mask",
  3504. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3505. }, [
  3506. vue.createElementVNode("view", {
  3507. class: "pet-modal-content",
  3508. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3509. }, ["stop"]))
  3510. }, [
  3511. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3512. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3513. vue.createElementVNode("view", {
  3514. class: "close-icon-btn",
  3515. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3516. }, "×")
  3517. ]),
  3518. vue.createElementVNode("scroll-view", {
  3519. "scroll-y": "",
  3520. class: "pet-modal-scroll"
  3521. }, [
  3522. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3523. vue.createElementVNode("image", {
  3524. class: "pm-avatar",
  3525. src: _ctx.currentPetInfo.petAvatar,
  3526. mode: "aspectFill"
  3527. }, null, 8, ["src"]),
  3528. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3529. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3530. vue.createElementVNode(
  3531. "text",
  3532. { class: "pm-name" },
  3533. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3534. 1
  3535. /* TEXT */
  3536. ),
  3537. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3538. key: 0,
  3539. class: "pm-gender"
  3540. }, [
  3541. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3542. vue.createElementVNode("text", null, "公")
  3543. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3544. key: 1,
  3545. class: "pm-gender female"
  3546. }, [
  3547. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3548. vue.createElementVNode("text", null, "母")
  3549. ])) : vue.createCommentVNode("v-if", true)
  3550. ]),
  3551. vue.createElementVNode(
  3552. "text",
  3553. { class: "pm-breed" },
  3554. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3555. 1
  3556. /* TEXT */
  3557. )
  3558. ])
  3559. ]),
  3560. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3561. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3562. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3563. vue.createElementVNode(
  3564. "text",
  3565. { class: "pm-val" },
  3566. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3567. 1
  3568. /* TEXT */
  3569. )
  3570. ]),
  3571. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3572. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3573. vue.createElementVNode(
  3574. "text",
  3575. { class: "pm-val" },
  3576. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3577. 1
  3578. /* TEXT */
  3579. )
  3580. ]),
  3581. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3582. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3583. vue.createElementVNode(
  3584. "text",
  3585. { class: "pm-val" },
  3586. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3587. 1
  3588. /* TEXT */
  3589. )
  3590. ]),
  3591. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3592. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3593. vue.createElementVNode(
  3594. "text",
  3595. { class: "pm-val" },
  3596. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3597. 1
  3598. /* TEXT */
  3599. )
  3600. ]),
  3601. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3602. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3603. vue.createElementVNode(
  3604. "text",
  3605. { class: "pm-val" },
  3606. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3607. 1
  3608. /* TEXT */
  3609. )
  3610. ])
  3611. ]),
  3612. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3613. key: 0,
  3614. class: "pm-tags"
  3615. }, [
  3616. (vue.openBlock(true), vue.createElementBlock(
  3617. vue.Fragment,
  3618. null,
  3619. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3620. return vue.openBlock(), vue.createElementBlock(
  3621. "view",
  3622. {
  3623. class: "pm-tag",
  3624. key: index
  3625. },
  3626. vue.toDisplayString(tag),
  3627. 1
  3628. /* TEXT */
  3629. );
  3630. }),
  3631. 128
  3632. /* KEYED_FRAGMENT */
  3633. ))
  3634. ])) : vue.createCommentVNode("v-if", true),
  3635. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3636. vue.createElementVNode("view", { class: "orange-bar" }),
  3637. vue.createElementVNode("text", null, "备注日志")
  3638. ]),
  3639. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3640. (vue.openBlock(true), vue.createElementBlock(
  3641. vue.Fragment,
  3642. null,
  3643. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3644. return vue.openBlock(), vue.createElementBlock("view", {
  3645. class: "pm-log-item",
  3646. key: lIndex
  3647. }, [
  3648. vue.createElementVNode(
  3649. "text",
  3650. { class: "pm-log-date" },
  3651. vue.toDisplayString(log.date),
  3652. 1
  3653. /* TEXT */
  3654. ),
  3655. vue.createElementVNode(
  3656. "text",
  3657. { class: "pm-log-text" },
  3658. vue.toDisplayString(log.content),
  3659. 1
  3660. /* TEXT */
  3661. ),
  3662. vue.createElementVNode(
  3663. "text",
  3664. { class: "pm-log-recorder" },
  3665. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3666. 1
  3667. /* TEXT */
  3668. )
  3669. ]);
  3670. }),
  3671. 128
  3672. /* KEYED_FRAGMENT */
  3673. ))
  3674. ]),
  3675. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3676. vue.createElementVNode("button", {
  3677. class: "pm-bottom-close",
  3678. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3679. }, "关闭"),
  3680. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3681. ])
  3682. ])
  3683. ])) : vue.createCommentVNode("v-if", true)
  3684. ]),
  3685. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3686. key: 0,
  3687. class: "modal-mask"
  3688. }, [
  3689. vue.createElementVNode("view", { class: "custom-modal" }, [
  3690. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3691. vue.withDirectives(vue.createElementVNode(
  3692. "textarea",
  3693. {
  3694. class: "reject-textarea",
  3695. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3696. placeholder: "请输入拒绝理由(必填)",
  3697. maxlength: "100"
  3698. },
  3699. null,
  3700. 512
  3701. /* NEED_PATCH */
  3702. ), [
  3703. [vue.vModelText, _ctx.rejectReason]
  3704. ]),
  3705. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3706. vue.createElementVNode("button", {
  3707. class: "modal-btn cancel",
  3708. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3709. }, "取消"),
  3710. vue.createElementVNode("button", {
  3711. class: "modal-btn confirm",
  3712. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3713. }, "提交")
  3714. ])
  3715. ])
  3716. ])) : vue.createCommentVNode("v-if", true),
  3717. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3718. key: 1,
  3719. class: "modal-mask"
  3720. }, [
  3721. vue.createElementVNode("view", { class: "custom-modal" }, [
  3722. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3723. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3724. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3725. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3726. ]),
  3727. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3728. vue.createElementVNode("button", {
  3729. class: "modal-btn cancel",
  3730. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3731. }, "再想想"),
  3732. vue.createElementVNode("button", {
  3733. class: "modal-btn confirm",
  3734. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3735. }, "确认接单")
  3736. ])
  3737. ])
  3738. ])) : vue.createCommentVNode("v-if", true),
  3739. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3740. key: 2,
  3741. class: "nav-modal-mask",
  3742. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3743. }, [
  3744. vue.createElementVNode("view", {
  3745. class: "nav-action-sheet",
  3746. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3747. }, ["stop"]))
  3748. }, [
  3749. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3750. vue.createElementVNode("view", {
  3751. class: "nav-sheet-item",
  3752. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3753. }, "高德地图"),
  3754. vue.createElementVNode("view", {
  3755. class: "nav-sheet-item",
  3756. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3757. }, "腾讯地图"),
  3758. vue.createElementVNode("view", {
  3759. class: "nav-sheet-item",
  3760. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3761. }, "百度地图"),
  3762. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3763. vue.createElementVNode("view", {
  3764. class: "nav-sheet-item cancel",
  3765. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3766. }, "取消")
  3767. ])
  3768. ])) : vue.createCommentVNode("v-if", true),
  3769. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3770. ],
  3771. 64
  3772. /* STABLE_FRAGMENT */
  3773. );
  3774. }
  3775. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3776. const _sfc_main$s = {
  3777. data() {
  3778. return {
  3779. status: "working"
  3780. // working | resting
  3781. };
  3782. },
  3783. onShow() {
  3784. const savedStatus = uni.getStorageSync("workStatus");
  3785. if (savedStatus) {
  3786. this.status = savedStatus;
  3787. }
  3788. },
  3789. methods: {
  3790. toggleStatus() {
  3791. if (this.status === "working") {
  3792. this.status = "resting";
  3793. uni.setStorageSync("workStatus", "resting");
  3794. } else {
  3795. this.status = "working";
  3796. uni.setStorageSync("workStatus", "working");
  3797. }
  3798. }
  3799. }
  3800. };
  3801. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3802. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3803. vue.createElementVNode("view", { class: "signboard-container" }, [
  3804. vue.createElementVNode("view", { class: "rope" }),
  3805. vue.createElementVNode("view", { class: "nail" }),
  3806. vue.createElementVNode(
  3807. "view",
  3808. {
  3809. class: vue.normalizeClass(["board", { "resting": $data.status === "resting" }])
  3810. },
  3811. [
  3812. vue.createElementVNode("view", { class: "screw top-left" }),
  3813. vue.createElementVNode("view", { class: "screw top-right" }),
  3814. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3815. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3816. vue.createElementVNode("view", { class: "board-inner" }, [
  3817. vue.createElementVNode(
  3818. "text",
  3819. { class: "status-text" },
  3820. vue.toDisplayString($data.status === "working" ? "接单中" : "休息中"),
  3821. 1
  3822. /* TEXT */
  3823. )
  3824. ])
  3825. ],
  3826. 2
  3827. /* CLASS */
  3828. )
  3829. ]),
  3830. vue.createElementVNode("view", { class: "status-desc" }, [
  3831. vue.createElementVNode(
  3832. "text",
  3833. null,
  3834. vue.toDisplayString($data.status === "working" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3835. 1
  3836. /* TEXT */
  3837. )
  3838. ]),
  3839. vue.createElementVNode("view", { class: "action-area" }, [
  3840. vue.createElementVNode(
  3841. "button",
  3842. {
  3843. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "working", "stopped": $data.status === "resting" }]),
  3844. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3845. },
  3846. vue.toDisplayString($data.status === "working" ? "停止接单" : "已停止接单"),
  3847. 3
  3848. /* TEXT, CLASS */
  3849. ),
  3850. vue.createElementVNode("view", { class: "tips" }, [
  3851. $data.status === "working" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3852. ])
  3853. ])
  3854. ]);
  3855. }
  3856. 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"]]);
  3857. const logic$2 = {
  3858. components: {
  3859. customTabbar
  3860. },
  3861. data() {
  3862. return {
  3863. currentTab: 0,
  3864. tabs: ["待接送/服务", "配送/服务中", "已完成", "已拒绝"],
  3865. typeFilterOptions: ["全部类型"],
  3866. currentTypeFilterIdx: 0,
  3867. activeDropdown: 0,
  3868. hasTimeFilter: false,
  3869. currentMonth: "2026年2月",
  3870. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  3871. calendarDays: [],
  3872. selectedDateRange: [],
  3873. allOrderList: [],
  3874. serviceList: [],
  3875. searchContent: "",
  3876. startServiceTime: "",
  3877. endServiceTime: "",
  3878. showPetModal: false,
  3879. currentPetInfo: {},
  3880. showNavModal: false,
  3881. navTargetItem: null,
  3882. navTargetPointType: "",
  3883. activeCallItem: null,
  3884. showRemarkInput: false,
  3885. remarkText: ""
  3886. };
  3887. },
  3888. created() {
  3889. this.initCalendar();
  3890. },
  3891. async onLoad() {
  3892. await this.loadServiceList();
  3893. await this.loadOrders();
  3894. },
  3895. onShow() {
  3896. uni.hideTabBar();
  3897. this.loadOrders();
  3898. },
  3899. async onPullDownRefresh() {
  3900. try {
  3901. await this.loadServiceList();
  3902. await this.loadOrders();
  3903. } finally {
  3904. uni.stopPullDownRefresh();
  3905. }
  3906. },
  3907. watch: {
  3908. currentTab() {
  3909. this.loadOrders();
  3910. },
  3911. currentTypeFilterIdx() {
  3912. this.loadOrders();
  3913. },
  3914. searchContent() {
  3915. this.loadOrders();
  3916. }
  3917. },
  3918. computed: {
  3919. orderList() {
  3920. return this.allOrderList;
  3921. }
  3922. },
  3923. methods: {
  3924. async loadServiceList() {
  3925. try {
  3926. const res = await getServiceList();
  3927. this.serviceList = res.data || [];
  3928. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  3929. } catch (err) {
  3930. formatAppLog("error", "at pages/orders/logic.js:82", "获取服务类型失败:", err);
  3931. }
  3932. },
  3933. async loadOrders() {
  3934. var _a;
  3935. try {
  3936. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  3937. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  3938. const params = {
  3939. status: statusMap[this.currentTab],
  3940. content: this.searchContent || void 0,
  3941. service: serviceId,
  3942. startServiceTime: this.startServiceTime || void 0,
  3943. endServiceTime: this.endServiceTime || void 0
  3944. };
  3945. formatAppLog("log", "at pages/orders/logic.js:96", "订单列表请求参数:", params);
  3946. const res = await getMyOrders(params);
  3947. formatAppLog("log", "at pages/orders/logic.js:98", "订单列表响应:", res);
  3948. const orders = res.rows || [];
  3949. formatAppLog("log", "at pages/orders/logic.js:100", "订单数量:", orders.length);
  3950. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  3951. } catch (err) {
  3952. formatAppLog("error", "at pages/orders/logic.js:103", "获取订单列表失败:", err);
  3953. this.allOrderList = [];
  3954. }
  3955. },
  3956. transformOrder(order, tabIndex) {
  3957. const service = this.serviceList.find((s) => s.id === order.service);
  3958. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3959. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3960. const mode = (service == null ? void 0 : service.mode) || 0;
  3961. const isRoundTrip = mode === 1;
  3962. let statusText = "接单";
  3963. if (tabIndex === 0) {
  3964. statusText = "接单";
  3965. } else if (tabIndex === 1) {
  3966. statusText = isRoundTrip ? "出发" : "开始";
  3967. } else if (tabIndex === 2) {
  3968. statusText = "已完成";
  3969. } else if (tabIndex === 3) {
  3970. statusText = "已拒绝";
  3971. }
  3972. return {
  3973. id: order.id,
  3974. status: order.status,
  3975. // 保存原始 status 用于判断权限
  3976. type: isRoundTrip ? 1 : 2,
  3977. typeText: serviceText,
  3978. typeIcon: serviceIcon,
  3979. statusText,
  3980. price: (order.price / 100).toFixed(2),
  3981. timeLabel: "服务时间",
  3982. time: order.serviceTime || "",
  3983. petAvatar: "/static/dog.png",
  3984. petName: order.petName || "",
  3985. petBreed: order.breed || "",
  3986. startLocation: order.fromAddress || "",
  3987. startAddress: order.fromAddress || "",
  3988. startDistance: "0km",
  3989. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  3990. endAddress: order.toAddress || "",
  3991. customerPhone: order.customerPhone || "",
  3992. endDistance: "0km",
  3993. serviceContent: order.remark || "",
  3994. remark: order.remark || ""
  3995. };
  3996. },
  3997. getDisplayStatus(item) {
  3998. if (item.statusText === "已完成")
  3999. return "已完成";
  4000. if (item.statusText === "已拒绝")
  4001. return "已拒绝";
  4002. if (item.statusText === "接单") {
  4003. return item.type === 1 ? "待接送" : "待服务";
  4004. }
  4005. return item.type === 1 ? "配送中" : "服务中";
  4006. },
  4007. getStatusClass(item) {
  4008. let display = this.getDisplayStatus(item);
  4009. if (display === "已完成")
  4010. return "finish";
  4011. if (display === "已拒绝")
  4012. return "reject";
  4013. if (display === "配送中" || display === "服务中")
  4014. return "processing";
  4015. return "highlight";
  4016. },
  4017. goToDetail(item) {
  4018. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4019. },
  4020. showPetProfile(item) {
  4021. this.currentPetInfo = {
  4022. ...item,
  4023. petGender: "M",
  4024. petAge: "2岁",
  4025. petWeight: "15kg",
  4026. petPersonality: "活泼亲人,精力旺盛",
  4027. petHobby: "喜欢追飞盘,爱吃肉干",
  4028. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4029. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4030. petLogs: [
  4031. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4032. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4033. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4034. ]
  4035. };
  4036. this.showPetModal = true;
  4037. },
  4038. closePetProfile() {
  4039. this.showPetModal = false;
  4040. },
  4041. openNavigation(item, pointType) {
  4042. this.navTargetItem = item;
  4043. this.navTargetPointType = pointType;
  4044. this.showNavModal = true;
  4045. },
  4046. closeNavModal() {
  4047. this.showNavModal = false;
  4048. },
  4049. chooseMap(mapType) {
  4050. let item = this.navTargetItem;
  4051. let pointType = this.navTargetPointType;
  4052. let name = pointType === "start" ? item.startLocation : item.endLocation;
  4053. let address = pointType === "start" ? item.startAddress : item.endAddress;
  4054. this.showNavModal = false;
  4055. uni.openLocation({
  4056. latitude: 30.52,
  4057. longitude: 114.31,
  4058. name: name || "目的地",
  4059. address: address || "默认地址",
  4060. success: function() {
  4061. formatAppLog("log", "at pages/orders/logic.js:208", "打开导航成功: " + mapType);
  4062. }
  4063. });
  4064. },
  4065. toggleCallMenu(item) {
  4066. if (this.activeCallItem === item) {
  4067. this.activeCallItem = null;
  4068. } else {
  4069. this.activeCallItem = item;
  4070. }
  4071. },
  4072. closeCallMenu() {
  4073. this.activeCallItem = null;
  4074. },
  4075. doCall(type, item) {
  4076. let phoneNum = "";
  4077. const targetItem = item || this.activeCallItem;
  4078. if (type === "merchant") {
  4079. phoneNum = "18900008451";
  4080. } else if (type === "customer") {
  4081. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4082. }
  4083. if (phoneNum) {
  4084. uni.makePhoneCall({ phoneNumber: phoneNum });
  4085. }
  4086. this.activeCallItem = null;
  4087. },
  4088. reportAbnormal(item) {
  4089. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4090. },
  4091. toggleDropdown(idx) {
  4092. if (this.activeDropdown === idx) {
  4093. this.activeDropdown = 0;
  4094. } else {
  4095. this.activeDropdown = idx;
  4096. }
  4097. },
  4098. closeDropdown() {
  4099. this.activeDropdown = 0;
  4100. },
  4101. selectType(index) {
  4102. this.currentTypeFilterIdx = index;
  4103. this.closeDropdown();
  4104. },
  4105. initCalendar() {
  4106. let days = [];
  4107. for (let i = 1; i <= 28; i++) {
  4108. days.push(i);
  4109. }
  4110. this.calendarDays = days;
  4111. this.selectedDateRange = [2, 4];
  4112. },
  4113. prevMonth() {
  4114. uni.showToast({ title: "上个月", icon: "none" });
  4115. },
  4116. nextMonth() {
  4117. uni.showToast({ title: "下个月", icon: "none" });
  4118. },
  4119. selectDateItem(day) {
  4120. if (this.selectedDateRange.length === 2) {
  4121. this.selectedDateRange = [day];
  4122. } else if (this.selectedDateRange.length === 1) {
  4123. let start = this.selectedDateRange[0];
  4124. if (day > start) {
  4125. this.selectedDateRange = [start, day];
  4126. } else if (day < start) {
  4127. this.selectedDateRange = [day, start];
  4128. } else {
  4129. this.selectedDateRange = [];
  4130. }
  4131. } else {
  4132. this.selectedDateRange = [day];
  4133. }
  4134. },
  4135. getDateClass(day) {
  4136. if (this.selectedDateRange.length === 0)
  4137. return "";
  4138. if (this.selectedDateRange.length === 1) {
  4139. return day === this.selectedDateRange[0] ? "is-start" : "";
  4140. }
  4141. let start = this.selectedDateRange[0];
  4142. let end = this.selectedDateRange[1];
  4143. if (day === start)
  4144. return "is-start";
  4145. if (day === end)
  4146. return "is-end";
  4147. if (day > start && day < end)
  4148. return "is-between";
  4149. return "";
  4150. },
  4151. resetTimeFilter() {
  4152. this.hasTimeFilter = false;
  4153. this.selectedDateRange = [];
  4154. this.startServiceTime = "";
  4155. this.endServiceTime = "";
  4156. this.closeDropdown();
  4157. this.loadOrders();
  4158. },
  4159. confirmTimeFilter() {
  4160. if (this.selectedDateRange.length === 0) {
  4161. uni.showToast({ title: "请先选择日期", icon: "none" });
  4162. return;
  4163. }
  4164. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4165. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4166. const pad = (n) => String(n).padStart(2, "0");
  4167. if (this.selectedDateRange.length === 2) {
  4168. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4169. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4170. } else {
  4171. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4172. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4173. }
  4174. this.hasTimeFilter = true;
  4175. this.closeDropdown();
  4176. this.loadOrders();
  4177. },
  4178. getMainActionText(item) {
  4179. return "查看详情";
  4180. },
  4181. mainAction(item) {
  4182. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4183. },
  4184. openRemarkInput() {
  4185. this.remarkText = "";
  4186. this.showRemarkInput = true;
  4187. },
  4188. closeRemarkInput() {
  4189. this.showRemarkInput = false;
  4190. this.remarkText = "";
  4191. },
  4192. submitRemark() {
  4193. const text = this.remarkText.trim();
  4194. if (!text) {
  4195. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4196. return;
  4197. }
  4198. const now = /* @__PURE__ */ new Date();
  4199. 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")}`;
  4200. if (!this.currentPetInfo.petLogs) {
  4201. this.$set(this.currentPetInfo, "petLogs", []);
  4202. }
  4203. this.currentPetInfo.petLogs.unshift({
  4204. date: dateStr,
  4205. content: text,
  4206. recorder: "我"
  4207. });
  4208. uni.showToast({ title: "备注已添加", icon: "success" });
  4209. this.closeRemarkInput();
  4210. },
  4211. /**
  4212. * 取消订单处理逻辑
  4213. * @param {Object} item - 订单项
  4214. */
  4215. handleCancelOrder(item) {
  4216. uni.showModal({
  4217. title: "提示",
  4218. content: "确认是否取消这个订单?",
  4219. success: async (res) => {
  4220. if (res.confirm) {
  4221. try {
  4222. uni.showLoading({ title: "取消中...", mask: true });
  4223. await cancelOrderApi({ orderId: item.id });
  4224. uni.showToast({ title: "订单已取消", icon: "success" });
  4225. setTimeout(() => {
  4226. this.loadOrders();
  4227. }, 1500);
  4228. } catch (err) {
  4229. formatAppLog("error", "at pages/orders/logic.js:370", "取消订单失败:", err);
  4230. uni.showToast({ title: "取消失败", icon: "none" });
  4231. } finally {
  4232. uni.hideLoading();
  4233. }
  4234. }
  4235. }
  4236. });
  4237. }
  4238. }
  4239. };
  4240. const _sfc_main$r = {
  4241. ...logic$2
  4242. };
  4243. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4244. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4245. return vue.openBlock(), vue.createElementBlock(
  4246. vue.Fragment,
  4247. null,
  4248. [
  4249. vue.createElementVNode("view", { class: "container" }, [
  4250. vue.createElementVNode("view", { class: "sticky-header" }, [
  4251. vue.createElementVNode("view", { class: "status-tabs" }, [
  4252. (vue.openBlock(true), vue.createElementBlock(
  4253. vue.Fragment,
  4254. null,
  4255. vue.renderList(_ctx.tabs, (tab, index) => {
  4256. return vue.openBlock(), vue.createElementBlock("view", {
  4257. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4258. key: index,
  4259. onClick: ($event) => _ctx.currentTab = index
  4260. }, [
  4261. vue.createElementVNode(
  4262. "text",
  4263. null,
  4264. vue.toDisplayString(tab),
  4265. 1
  4266. /* TEXT */
  4267. ),
  4268. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4269. key: 0,
  4270. class: "indicator"
  4271. })) : vue.createCommentVNode("v-if", true)
  4272. ], 10, ["onClick"]);
  4273. }),
  4274. 128
  4275. /* KEYED_FRAGMENT */
  4276. ))
  4277. ]),
  4278. vue.createElementVNode("view", { class: "search-bar" }, [
  4279. vue.createElementVNode("view", { class: "search-input-box" }, [
  4280. vue.withDirectives(vue.createElementVNode(
  4281. "input",
  4282. {
  4283. class: "search-input",
  4284. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4285. placeholder: "搜索地址/电话/姓名",
  4286. "placeholder-class": "ph-style"
  4287. },
  4288. null,
  4289. 512
  4290. /* NEED_PATCH */
  4291. ), [
  4292. [vue.vModelText, _ctx.searchContent]
  4293. ])
  4294. ])
  4295. ]),
  4296. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4297. vue.createElementVNode("view", { class: "filter-bar" }, [
  4298. vue.createElementVNode(
  4299. "view",
  4300. {
  4301. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4302. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4303. },
  4304. [
  4305. vue.createElementVNode(
  4306. "text",
  4307. {
  4308. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4309. },
  4310. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4311. 3
  4312. /* TEXT, CLASS */
  4313. ),
  4314. vue.createElementVNode(
  4315. "view",
  4316. {
  4317. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4318. },
  4319. null,
  4320. 2
  4321. /* CLASS */
  4322. )
  4323. ],
  4324. 2
  4325. /* CLASS */
  4326. ),
  4327. vue.createElementVNode(
  4328. "view",
  4329. {
  4330. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4331. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4332. },
  4333. [
  4334. vue.createElementVNode(
  4335. "text",
  4336. {
  4337. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4338. },
  4339. "服务时间",
  4340. 2
  4341. /* CLASS */
  4342. ),
  4343. vue.createElementVNode(
  4344. "view",
  4345. {
  4346. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4347. },
  4348. null,
  4349. 2
  4350. /* CLASS */
  4351. )
  4352. ],
  4353. 2
  4354. /* CLASS */
  4355. )
  4356. ]),
  4357. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4358. key: 0,
  4359. class: "dropdown-mask",
  4360. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4361. })) : vue.createCommentVNode("v-if", true),
  4362. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4363. key: 1,
  4364. class: "dropdown-panel"
  4365. }, [
  4366. (vue.openBlock(true), vue.createElementBlock(
  4367. vue.Fragment,
  4368. null,
  4369. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4370. return vue.openBlock(), vue.createElementBlock("view", {
  4371. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4372. key: index,
  4373. onClick: ($event) => _ctx.selectType(index)
  4374. }, [
  4375. vue.createElementVNode(
  4376. "text",
  4377. null,
  4378. vue.toDisplayString(item),
  4379. 1
  4380. /* TEXT */
  4381. )
  4382. ], 10, ["onClick"]);
  4383. }),
  4384. 128
  4385. /* KEYED_FRAGMENT */
  4386. ))
  4387. ])) : vue.createCommentVNode("v-if", true),
  4388. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4389. key: 2,
  4390. class: "dropdown-panel calendar-panel"
  4391. }, [
  4392. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4393. vue.createElementVNode("view", { class: "cal-header" }, [
  4394. vue.createElementVNode("text", {
  4395. class: "cal-nav-btn",
  4396. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4397. }, "‹"),
  4398. vue.createElementVNode(
  4399. "text",
  4400. { class: "cal-title" },
  4401. vue.toDisplayString(_ctx.currentMonth),
  4402. 1
  4403. /* TEXT */
  4404. ),
  4405. vue.createElementVNode("text", {
  4406. class: "cal-nav-btn",
  4407. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4408. }, "›")
  4409. ]),
  4410. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4411. (vue.openBlock(true), vue.createElementBlock(
  4412. vue.Fragment,
  4413. null,
  4414. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4415. return vue.openBlock(), vue.createElementBlock(
  4416. "text",
  4417. {
  4418. key: idx,
  4419. class: "wk-item"
  4420. },
  4421. vue.toDisplayString(wk),
  4422. 1
  4423. /* TEXT */
  4424. );
  4425. }),
  4426. 128
  4427. /* KEYED_FRAGMENT */
  4428. ))
  4429. ]),
  4430. vue.createElementVNode("view", { class: "cal-body" }, [
  4431. (vue.openBlock(true), vue.createElementBlock(
  4432. vue.Fragment,
  4433. null,
  4434. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4435. return vue.openBlock(), vue.createElementBlock("view", {
  4436. key: idx,
  4437. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4438. onClick: ($event) => _ctx.selectDateItem(day)
  4439. }, [
  4440. vue.createElementVNode(
  4441. "view",
  4442. { class: "cal-day-text" },
  4443. vue.toDisplayString(day),
  4444. 1
  4445. /* TEXT */
  4446. )
  4447. ], 10, ["onClick"]);
  4448. }),
  4449. 128
  4450. /* KEYED_FRAGMENT */
  4451. ))
  4452. ])
  4453. ]),
  4454. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4455. vue.createElementVNode("button", {
  4456. class: "cal-btn reset",
  4457. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4458. }, "重置"),
  4459. vue.createElementVNode("button", {
  4460. class: "cal-btn confirm",
  4461. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4462. }, "确定")
  4463. ])
  4464. ])) : vue.createCommentVNode("v-if", true)
  4465. ])
  4466. ]),
  4467. vue.createElementVNode("view", { class: "order-list" }, [
  4468. (vue.openBlock(true), vue.createElementBlock(
  4469. vue.Fragment,
  4470. null,
  4471. vue.renderList(_ctx.orderList, (item, index) => {
  4472. return vue.openBlock(), vue.createElementBlock("view", {
  4473. class: "order-card",
  4474. key: index,
  4475. onClick: ($event) => _ctx.goToDetail(item)
  4476. }, [
  4477. vue.createElementVNode("view", { class: "card-header" }, [
  4478. vue.createElementVNode("view", { class: "type-badge" }, [
  4479. vue.createElementVNode("image", {
  4480. class: "type-icon",
  4481. src: item.typeIcon
  4482. }, null, 8, ["src"]),
  4483. vue.createElementVNode(
  4484. "text",
  4485. { class: "type-text" },
  4486. vue.toDisplayString(item.typeText),
  4487. 1
  4488. /* TEXT */
  4489. )
  4490. ]),
  4491. vue.createElementVNode(
  4492. "text",
  4493. {
  4494. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4495. },
  4496. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4497. 3
  4498. /* TEXT, CLASS */
  4499. )
  4500. ]),
  4501. vue.createElementVNode("view", { class: "card-body" }, [
  4502. vue.createElementVNode("view", { class: "time-row" }, [
  4503. vue.createElementVNode("view", { class: "time-col" }, [
  4504. vue.createElementVNode(
  4505. "text",
  4506. { class: "label" },
  4507. vue.toDisplayString(item.timeLabel) + ":",
  4508. 1
  4509. /* TEXT */
  4510. ),
  4511. vue.createElementVNode(
  4512. "text",
  4513. { class: "value" },
  4514. vue.toDisplayString(item.time),
  4515. 1
  4516. /* TEXT */
  4517. )
  4518. ]),
  4519. vue.createElementVNode(
  4520. "text",
  4521. { class: "price" },
  4522. "¥" + vue.toDisplayString(item.price),
  4523. 1
  4524. /* TEXT */
  4525. )
  4526. ]),
  4527. vue.createElementVNode("view", { class: "pet-card" }, [
  4528. vue.createElementVNode("image", {
  4529. class: "pet-avatar",
  4530. src: item.petAvatar,
  4531. mode: "aspectFill"
  4532. }, null, 8, ["src"]),
  4533. vue.createElementVNode("view", { class: "pet-info" }, [
  4534. vue.createElementVNode(
  4535. "text",
  4536. { class: "pet-name" },
  4537. vue.toDisplayString(item.petName),
  4538. 1
  4539. /* TEXT */
  4540. ),
  4541. vue.createElementVNode(
  4542. "text",
  4543. { class: "pet-breed" },
  4544. "品种: " + vue.toDisplayString(item.petBreed),
  4545. 1
  4546. /* TEXT */
  4547. )
  4548. ])
  4549. ]),
  4550. vue.createElementVNode("view", { class: "route-info" }, [
  4551. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4552. vue.Fragment,
  4553. { key: 0 },
  4554. [
  4555. vue.createElementVNode("view", {
  4556. class: "route-item",
  4557. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4558. }, [
  4559. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4560. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4561. vue.createElementVNode("view", { class: "address-box" }, [
  4562. vue.createElementVNode(
  4563. "text",
  4564. { class: "addr-title" },
  4565. vue.toDisplayString(item.startLocation),
  4566. 1
  4567. /* TEXT */
  4568. ),
  4569. vue.createElementVNode(
  4570. "text",
  4571. { class: "addr-desc" },
  4572. vue.toDisplayString(item.startAddress),
  4573. 1
  4574. /* TEXT */
  4575. )
  4576. ]),
  4577. vue.createElementVNode("image", {
  4578. class: "nav-arrow",
  4579. src: _imports_3$2,
  4580. style: { "flex-shrink": "0", "align-self": "center" }
  4581. })
  4582. ], 8, ["onClick"]),
  4583. vue.createElementVNode("view", {
  4584. class: "route-item",
  4585. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4586. }, [
  4587. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4588. vue.createElementVNode("view", { class: "address-box" }, [
  4589. vue.createElementVNode(
  4590. "text",
  4591. { class: "addr-title" },
  4592. vue.toDisplayString(item.endLocation),
  4593. 1
  4594. /* TEXT */
  4595. ),
  4596. vue.createElementVNode(
  4597. "text",
  4598. { class: "addr-desc" },
  4599. vue.toDisplayString(item.endAddress),
  4600. 1
  4601. /* TEXT */
  4602. )
  4603. ]),
  4604. vue.createElementVNode("image", {
  4605. class: "nav-arrow",
  4606. src: _imports_3$2,
  4607. style: { "flex-shrink": "0", "align-self": "center" }
  4608. })
  4609. ], 8, ["onClick"])
  4610. ],
  4611. 64
  4612. /* STABLE_FRAGMENT */
  4613. )) : (vue.openBlock(), vue.createElementBlock(
  4614. vue.Fragment,
  4615. { key: 1 },
  4616. [
  4617. vue.createElementVNode("view", {
  4618. class: "route-item",
  4619. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4620. }, [
  4621. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4622. vue.createElementVNode("view", { class: "address-box" }, [
  4623. vue.createElementVNode(
  4624. "text",
  4625. { class: "addr-title" },
  4626. vue.toDisplayString(item.endLocation),
  4627. 1
  4628. /* TEXT */
  4629. ),
  4630. vue.createElementVNode(
  4631. "text",
  4632. { class: "addr-desc" },
  4633. vue.toDisplayString(item.endAddress),
  4634. 1
  4635. /* TEXT */
  4636. )
  4637. ]),
  4638. vue.createElementVNode("image", {
  4639. class: "nav-arrow",
  4640. src: _imports_3$2,
  4641. style: { "flex-shrink": "0", "align-self": "center" }
  4642. })
  4643. ], 8, ["onClick"]),
  4644. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4645. key: 0,
  4646. class: "service-content"
  4647. }, [
  4648. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4649. vue.createElementVNode(
  4650. "text",
  4651. null,
  4652. vue.toDisplayString(item.serviceContent),
  4653. 1
  4654. /* TEXT */
  4655. )
  4656. ])) : vue.createCommentVNode("v-if", true)
  4657. ],
  4658. 64
  4659. /* STABLE_FRAGMENT */
  4660. ))
  4661. ]),
  4662. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4663. key: 0,
  4664. class: "remark-box"
  4665. }, [
  4666. vue.createElementVNode(
  4667. "text",
  4668. null,
  4669. "备注:" + vue.toDisplayString(item.remark),
  4670. 1
  4671. /* TEXT */
  4672. )
  4673. ])) : vue.createCommentVNode("v-if", true)
  4674. ]),
  4675. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4676. key: 0,
  4677. class: "action-btns"
  4678. }, [
  4679. vue.createElementVNode("view", { class: "action-left" }, [
  4680. vue.createElementVNode("button", {
  4681. class: "btn normal",
  4682. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4683. }, "拨号", 8, ["onClick"])
  4684. ]),
  4685. vue.createElementVNode("view", { class: "action-right" }, [
  4686. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4687. key: 0,
  4688. class: "btn normal danger",
  4689. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4690. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4691. vue.createElementVNode("button", {
  4692. class: "btn normal",
  4693. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4694. }, "异常上报", 8, ["onClick"]),
  4695. vue.createElementVNode("button", {
  4696. class: "btn primary",
  4697. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4698. }, "打卡", 8, ["onClick"])
  4699. ])
  4700. ])) : vue.createCommentVNode("v-if", true)
  4701. ], 8, ["onClick"]);
  4702. }),
  4703. 128
  4704. /* KEYED_FRAGMENT */
  4705. )),
  4706. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4707. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4708. ]),
  4709. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4710. key: 0,
  4711. class: "call-mask",
  4712. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4713. })) : vue.createCommentVNode("v-if", true)
  4714. ]),
  4715. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4716. key: 0,
  4717. class: "pet-modal-mask",
  4718. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4719. }, [
  4720. vue.createElementVNode("view", {
  4721. class: "pet-modal-content",
  4722. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4723. }, ["stop"]))
  4724. }, [
  4725. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4726. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4727. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4728. vue.createElementVNode("view", {
  4729. class: "pm-remark-btn",
  4730. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4731. }, "备注"),
  4732. vue.createElementVNode("view", {
  4733. class: "close-icon-btn",
  4734. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4735. }, "×")
  4736. ])
  4737. ]),
  4738. vue.createElementVNode("scroll-view", {
  4739. "scroll-y": "",
  4740. class: "pet-modal-scroll"
  4741. }, [
  4742. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4743. vue.createElementVNode("image", {
  4744. class: "pm-avatar",
  4745. src: _ctx.currentPetInfo.petAvatar,
  4746. mode: "aspectFill"
  4747. }, null, 8, ["src"]),
  4748. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4749. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4750. vue.createElementVNode(
  4751. "text",
  4752. { class: "pm-name" },
  4753. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4754. 1
  4755. /* TEXT */
  4756. ),
  4757. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4758. key: 0,
  4759. class: "pm-gender"
  4760. }, [
  4761. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4762. vue.createElementVNode("text", null, "公")
  4763. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4764. key: 1,
  4765. class: "pm-gender female"
  4766. }, [
  4767. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4768. vue.createElementVNode("text", null, "母")
  4769. ])) : vue.createCommentVNode("v-if", true)
  4770. ]),
  4771. vue.createElementVNode(
  4772. "text",
  4773. { class: "pm-breed" },
  4774. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4775. 1
  4776. /* TEXT */
  4777. )
  4778. ])
  4779. ]),
  4780. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4781. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4782. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4783. vue.createElementVNode(
  4784. "text",
  4785. { class: "pm-val" },
  4786. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4787. 1
  4788. /* TEXT */
  4789. )
  4790. ]),
  4791. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4792. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4793. vue.createElementVNode(
  4794. "text",
  4795. { class: "pm-val" },
  4796. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4797. 1
  4798. /* TEXT */
  4799. )
  4800. ]),
  4801. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4802. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4803. vue.createElementVNode(
  4804. "text",
  4805. { class: "pm-val" },
  4806. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4807. 1
  4808. /* TEXT */
  4809. )
  4810. ]),
  4811. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4812. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4813. vue.createElementVNode(
  4814. "text",
  4815. { class: "pm-val" },
  4816. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4817. 1
  4818. /* TEXT */
  4819. )
  4820. ]),
  4821. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4822. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4823. vue.createElementVNode(
  4824. "text",
  4825. { class: "pm-val" },
  4826. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4827. 1
  4828. /* TEXT */
  4829. )
  4830. ])
  4831. ]),
  4832. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4833. key: 0,
  4834. class: "pm-tags"
  4835. }, [
  4836. (vue.openBlock(true), vue.createElementBlock(
  4837. vue.Fragment,
  4838. null,
  4839. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4840. return vue.openBlock(), vue.createElementBlock(
  4841. "view",
  4842. {
  4843. class: "pm-tag",
  4844. key: index
  4845. },
  4846. vue.toDisplayString(tag),
  4847. 1
  4848. /* TEXT */
  4849. );
  4850. }),
  4851. 128
  4852. /* KEYED_FRAGMENT */
  4853. ))
  4854. ])) : vue.createCommentVNode("v-if", true),
  4855. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4856. vue.createElementVNode("view", { class: "orange-bar" }),
  4857. vue.createElementVNode("text", null, "备注日志")
  4858. ]),
  4859. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4860. (vue.openBlock(true), vue.createElementBlock(
  4861. vue.Fragment,
  4862. null,
  4863. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4864. return vue.openBlock(), vue.createElementBlock("view", {
  4865. class: "pm-log-item",
  4866. key: lIndex
  4867. }, [
  4868. vue.createElementVNode(
  4869. "text",
  4870. { class: "pm-log-date" },
  4871. vue.toDisplayString(log.date),
  4872. 1
  4873. /* TEXT */
  4874. ),
  4875. vue.createElementVNode(
  4876. "text",
  4877. { class: "pm-log-text" },
  4878. vue.toDisplayString(log.content),
  4879. 1
  4880. /* TEXT */
  4881. ),
  4882. vue.createElementVNode(
  4883. "text",
  4884. { class: "pm-log-recorder" },
  4885. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  4886. 1
  4887. /* TEXT */
  4888. )
  4889. ]);
  4890. }),
  4891. 128
  4892. /* KEYED_FRAGMENT */
  4893. ))
  4894. ]),
  4895. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  4896. ])
  4897. ])
  4898. ])) : vue.createCommentVNode("v-if", true),
  4899. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  4900. key: 1,
  4901. class: "remark-mask",
  4902. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4903. }, [
  4904. vue.createElementVNode("view", {
  4905. class: "remark-sheet",
  4906. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  4907. }, ["stop"]))
  4908. }, [
  4909. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  4910. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  4911. vue.createElementVNode("view", {
  4912. class: "close-icon-btn",
  4913. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4914. }, "×")
  4915. ]),
  4916. vue.withDirectives(vue.createElementVNode(
  4917. "textarea",
  4918. {
  4919. class: "remark-textarea",
  4920. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  4921. placeholder: "请输入备注内容...",
  4922. maxlength: "500",
  4923. "auto-height": ""
  4924. },
  4925. null,
  4926. 512
  4927. /* NEED_PATCH */
  4928. ), [
  4929. [vue.vModelText, _ctx.remarkText]
  4930. ]),
  4931. vue.createElementVNode("view", {
  4932. class: "remark-submit-btn",
  4933. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  4934. }, "提交备注")
  4935. ])
  4936. ])) : vue.createCommentVNode("v-if", true),
  4937. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4938. key: 2,
  4939. class: "nav-modal-mask",
  4940. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4941. }, [
  4942. vue.createElementVNode("view", {
  4943. class: "nav-action-sheet",
  4944. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  4945. }, ["stop"]))
  4946. }, [
  4947. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  4948. vue.createElementVNode("view", {
  4949. class: "nav-sheet-item",
  4950. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  4951. }, "高德地图"),
  4952. vue.createElementVNode("view", {
  4953. class: "nav-sheet-item",
  4954. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  4955. }, "腾讯地图"),
  4956. vue.createElementVNode("view", {
  4957. class: "nav-sheet-item",
  4958. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  4959. }, "百度地图"),
  4960. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  4961. vue.createElementVNode("view", {
  4962. class: "nav-sheet-item cancel",
  4963. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4964. }, "取消")
  4965. ])
  4966. ])) : vue.createCommentVNode("v-if", true),
  4967. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  4968. ],
  4969. 64
  4970. /* STABLE_FRAGMENT */
  4971. );
  4972. }
  4973. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  4974. function getDictDataByType(dictType) {
  4975. return request({
  4976. url: `/system/dict/data/type/${dictType}`,
  4977. method: "GET"
  4978. });
  4979. }
  4980. function getPetDetail(id) {
  4981. return request({
  4982. url: `/archieves/pet/${id}`,
  4983. method: "GET"
  4984. });
  4985. }
  4986. const logic$1 = {
  4987. data() {
  4988. return {
  4989. orderId: null,
  4990. pageLoading: true,
  4991. // 页面数据加载中
  4992. orderType: 1,
  4993. orderStatus: 2,
  4994. serviceId: null,
  4995. // 当前订单的服务类型ID
  4996. serviceMode: null,
  4997. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  4998. petId: null,
  4999. // 当前订单关联的宠物ID
  5000. petDetail: null,
  5001. // 宠物档案详情
  5002. // 从后端 clockInRemark 解析出的打卡步骤列表
  5003. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5004. clockInSteps: [],
  5005. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5006. currentClockIn: null,
  5007. currentStep: 0,
  5008. orderDetail: {
  5009. type: 1,
  5010. price: "0.00",
  5011. timeLabel: "服务时间",
  5012. time: "",
  5013. petAvatar: "/static/dog.png",
  5014. petName: "",
  5015. petBreed: "",
  5016. serviceTag: "",
  5017. startLocation: "",
  5018. startAddress: "",
  5019. endAddress: "",
  5020. customerPhone: "",
  5021. serviceContent: "",
  5022. remark: "",
  5023. orderNo: "",
  5024. createTime: "",
  5025. progressLogs: [],
  5026. nursingSummary: ""
  5027. // 宠护小结
  5028. },
  5029. serviceList: [],
  5030. showPetModal: false,
  5031. currentPetInfo: {},
  5032. showNavModal: false,
  5033. navTargetPointType: "",
  5034. showUploadModal: false,
  5035. modalMediaList: [],
  5036. modalRemark: "",
  5037. showSumModal: false,
  5038. sumContent: "",
  5039. sumDate: "",
  5040. sumSigner: "未知",
  5041. showPetRemarkInput: false,
  5042. petRemarkText: "",
  5043. showAnomalyModal: false,
  5044. anomalyList: [],
  5045. anomalyTypeDict: [],
  5046. // 媒体预览相关
  5047. videoPlayerShow: false,
  5048. videoPlayerUrl: ""
  5049. };
  5050. },
  5051. computed: {
  5052. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5053. steps() {
  5054. if (this.clockInSteps.length > 0) {
  5055. return this.clockInSteps.map((s) => s.title);
  5056. }
  5057. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5058. },
  5059. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5060. progressSteps() {
  5061. return ["已接单", ...this.steps, "订单完成"];
  5062. },
  5063. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5064. progressIndex() {
  5065. return this.currentStep + 1;
  5066. },
  5067. displayStatusText() {
  5068. if (this.currentStep >= this.steps.length)
  5069. return "已完成";
  5070. if (this.currentStep > 0) {
  5071. return this.orderType === 1 ? "配送中" : "服务中";
  5072. }
  5073. return this.orderType === 1 ? "待接送" : "待服务";
  5074. },
  5075. currentStatusText() {
  5076. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5077. },
  5078. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5079. currentTaskTitle() {
  5080. if (this.currentStep >= this.steps.length)
  5081. return "订单已完成";
  5082. if (this.currentClockIn) {
  5083. return this.currentClockIn.title;
  5084. }
  5085. return this.steps[this.currentStep] || "打卡";
  5086. },
  5087. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5088. currentTaskDesc() {
  5089. if (this.currentStep >= this.steps.length)
  5090. return "感谢您的服务,请注意休息";
  5091. if (this.currentClockIn && this.currentClockIn.remark) {
  5092. return this.currentClockIn.remark;
  5093. }
  5094. return "请按要求提交照片或视频及备注";
  5095. }
  5096. },
  5097. async onLoad(options) {
  5098. if (options.id) {
  5099. this.orderId = options.id;
  5100. }
  5101. this.pageLoading = true;
  5102. try {
  5103. await this.loadAnomalyTypeDict();
  5104. await this.loadOrderDetail();
  5105. } finally {
  5106. this.pageLoading = false;
  5107. }
  5108. },
  5109. methods: {
  5110. async loadServiceList() {
  5111. try {
  5112. const res = await getServiceList();
  5113. this.serviceList = res.data || [];
  5114. } catch (err) {
  5115. formatAppLog("error", "at pages/orders/detail-logic.js:143", "获取服务类型失败:", err);
  5116. }
  5117. },
  5118. /**
  5119. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5120. */
  5121. async loadServiceDetail(serviceId) {
  5122. formatAppLog("log", "at pages/orders/detail-logic.js:150", "开始加载服务详情, ID:", serviceId);
  5123. try {
  5124. const res = await getServiceDetail(serviceId);
  5125. const serviceInfo = res.data;
  5126. formatAppLog("log", "at pages/orders/detail-logic.js:154", "服务详情响应结果:", serviceInfo);
  5127. if (serviceInfo) {
  5128. this.serviceMode = serviceInfo.mode;
  5129. formatAppLog("log", "at pages/orders/detail-logic.js:157", "当前服务模式(mode):", this.serviceMode);
  5130. if (serviceInfo.clockInRemark) {
  5131. try {
  5132. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5133. if (Array.isArray(parsed) && parsed.length > 0) {
  5134. this.clockInSteps = parsed;
  5135. formatAppLog("log", "at pages/orders/detail-logic.js:163", "解析打卡步骤:", this.clockInSteps);
  5136. }
  5137. } catch (parseErr) {
  5138. formatAppLog("error", "at pages/orders/detail-logic.js:166", "解析 clockInRemark 失败:", parseErr);
  5139. }
  5140. }
  5141. }
  5142. } catch (err) {
  5143. formatAppLog("error", "at pages/orders/detail-logic.js:171", "获取服务类型详情失败:", err);
  5144. }
  5145. },
  5146. async loadOrderDetail() {
  5147. if (!this.orderId) {
  5148. formatAppLog("log", "at pages/orders/detail-logic.js:176", "订单ID缺失");
  5149. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5150. return;
  5151. }
  5152. try {
  5153. formatAppLog("log", "at pages/orders/detail-logic.js:181", "请求订单详情,ID:", this.orderId);
  5154. const res = await getOrderInfo(this.orderId);
  5155. formatAppLog("log", "at pages/orders/detail-logic.js:183", "订单详情响应:", res);
  5156. const order = res.data;
  5157. if (!order) {
  5158. formatAppLog("log", "at pages/orders/detail-logic.js:186", "订单数据为空");
  5159. uni.showToast({ title: "订单不存在", icon: "none" });
  5160. return;
  5161. }
  5162. formatAppLog("log", "at pages/orders/detail-logic.js:190", "订单数据:", order);
  5163. this.serviceId = order.service;
  5164. this.petId = order.usrPet || null;
  5165. this.transformOrderData(order);
  5166. formatAppLog("log", "at pages/orders/detail-logic.js:194", "解析出的 serviceId:", this.serviceId);
  5167. if (this.serviceId) {
  5168. await this.loadServiceDetail(this.serviceId);
  5169. } else {
  5170. formatAppLog("warn", "at pages/orders/detail-logic.js:200", "订单中未找到 service 字段,无法加载服务步骤");
  5171. }
  5172. if (this.petId) {
  5173. await this.loadPetDetail(this.petId);
  5174. }
  5175. await this.loadOrderLogs();
  5176. } catch (err) {
  5177. formatAppLog("error", "at pages/orders/detail-logic.js:211", "获取订单详情失败:", err);
  5178. uni.showToast({ title: "加载失败", icon: "none" });
  5179. }
  5180. },
  5181. async loadOrderLogs() {
  5182. try {
  5183. const res = await getOrderLogs(this.orderId);
  5184. const logs = res.data || [];
  5185. formatAppLog("log", "at pages/orders/detail-logic.js:219", "订单日志:", logs);
  5186. const progressLogs = logs.filter((log) => log.logType === 1);
  5187. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5188. status: log.title || "",
  5189. time: log.createTime || "",
  5190. medias: log.photoUrls || [],
  5191. remark: log.content || ""
  5192. }));
  5193. 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());
  5194. if (validLogs.length > 0) {
  5195. const latestLog = validLogs[0];
  5196. const latestStep = latestLog.step;
  5197. formatAppLog("log", "at pages/orders/detail-logic.js:238", "最新打卡日志 step:", latestStep);
  5198. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5199. if (stepIndex >= 0) {
  5200. this.currentStep = stepIndex + 1;
  5201. } else {
  5202. this.currentStep = Number(latestStep);
  5203. }
  5204. } else {
  5205. this.currentStep = 0;
  5206. }
  5207. this.updateCurrentClockIn();
  5208. formatAppLog("log", "at pages/orders/detail-logic.js:254", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5209. } catch (err) {
  5210. formatAppLog("error", "at pages/orders/detail-logic.js:256", "获取订单日志失败:", err);
  5211. }
  5212. },
  5213. /**
  5214. * 根据 currentStep 更新当前打卡信息
  5215. */
  5216. updateCurrentClockIn() {
  5217. if (this.currentStep < this.clockInSteps.length) {
  5218. this.currentClockIn = this.clockInSteps[this.currentStep];
  5219. } else {
  5220. this.currentClockIn = null;
  5221. }
  5222. },
  5223. transformOrderData(order) {
  5224. const mode = order.mode || 0;
  5225. const isRoundTrip = mode === 1;
  5226. this.orderType = isRoundTrip ? 1 : 2;
  5227. this.orderStatus = order.status || 2;
  5228. this.orderDetail = {
  5229. type: this.orderType,
  5230. price: (order.price / 100).toFixed(2),
  5231. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5232. time: order.serviceTime || "",
  5233. petAvatar: "/static/dog.png",
  5234. petName: order.petName || order.contact || "",
  5235. petBreed: order.breed || "",
  5236. serviceTag: order.groupPurchasePackageName || "",
  5237. startLocation: order.fromAddress || "",
  5238. startAddress: order.fromAddress || "",
  5239. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5240. endAddress: order.toAddress || "",
  5241. customerPhone: order.contactPhoneNumber || "",
  5242. ownerName: order.contact || "",
  5243. // 宠主姓名(默认使用客户姓名)
  5244. serviceContent: "",
  5245. remark: "",
  5246. orderNo: order.code || "T" + order.id,
  5247. createTime: order.serviceTime || "",
  5248. nursingSummary: order.nursingSummary || "",
  5249. fulfillerName: order.fulfillerName || "",
  5250. // 履约者/护宠师姓名
  5251. progressLogs: [
  5252. { status: "您已接单", time: order.serviceTime || "" }
  5253. ]
  5254. };
  5255. if (this.orderDetail.fulfillerName) {
  5256. this.sumSigner = this.orderDetail.fulfillerName;
  5257. }
  5258. },
  5259. /**
  5260. * 根据宠物ID获取宠物档案详情
  5261. */
  5262. async loadPetDetail(petId) {
  5263. try {
  5264. const res = await getPetDetail(petId);
  5265. const pet = res.data;
  5266. if (pet) {
  5267. this.petDetail = pet;
  5268. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5269. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5270. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5271. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5272. formatAppLog("log", "at pages/orders/detail-logic.js:321", "宠物档案:", pet);
  5273. }
  5274. } catch (err) {
  5275. formatAppLog("error", "at pages/orders/detail-logic.js:324", "获取宠物档案失败:", err);
  5276. }
  5277. },
  5278. /**
  5279. * 加载异常记录列表
  5280. */
  5281. async loadAnomalyList() {
  5282. if (!this.orderId)
  5283. return;
  5284. try {
  5285. const res = await getAnomalyList(this.orderId);
  5286. const list = res.data || [];
  5287. this.anomalyList = list.map((item) => {
  5288. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5289. return {
  5290. ...item,
  5291. typeLabel: dict ? dict.label : item.type,
  5292. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5293. photoUrls: item.photoUrls || []
  5294. };
  5295. });
  5296. } catch (err) {
  5297. formatAppLog("error", "at pages/orders/detail-logic.js:347", "获取异常列表失败:", err);
  5298. }
  5299. },
  5300. async loadAnomalyTypeDict() {
  5301. try {
  5302. const res = await getDictDataByType("flf_anamaly_type");
  5303. this.anomalyTypeDict = res.data.map((item) => ({
  5304. label: item.dictLabel,
  5305. value: item.dictValue
  5306. }));
  5307. } catch (err) {
  5308. formatAppLog("error", "at pages/orders/detail-logic.js:358", "获取异常字典失败:", err);
  5309. }
  5310. },
  5311. openAnomalyModal() {
  5312. this.showAnomalyModal = true;
  5313. this.loadAnomalyList();
  5314. },
  5315. closeAnomalyModal() {
  5316. this.showAnomalyModal = false;
  5317. },
  5318. getAnomalyStatusLabel(status) {
  5319. const map = {
  5320. 0: "待审核",
  5321. 1: "已通过",
  5322. 2: "已驳回"
  5323. };
  5324. return map[status] || "未知";
  5325. },
  5326. updateStepByStatus() {
  5327. if (this.orderStatus === 2) {
  5328. this.currentStep = 0;
  5329. } else if (this.orderStatus === 3) {
  5330. this.currentStep = 1;
  5331. } else if (this.orderStatus === 4) {
  5332. this.currentStep = this.steps.length - 1;
  5333. } else {
  5334. this.currentStep = 0;
  5335. }
  5336. },
  5337. showPetProfile() {
  5338. const pet = this.petDetail;
  5339. if (pet) {
  5340. this.currentPetInfo = {
  5341. petAvatar: pet.avatarUrl || "/static/dog.png",
  5342. petName: pet.name || "",
  5343. petBreed: pet.breed || "",
  5344. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5345. petAge: pet.age ? pet.age + "岁" : "未知",
  5346. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5347. petPersonality: pet.personality || pet.cutePersonality || "无",
  5348. petHobby: "",
  5349. petRemark: pet.remark || "无",
  5350. petTags: (pet.tags || []).map((t) => t.name),
  5351. petLogs: [],
  5352. // 额外信息
  5353. petSize: pet.size || "",
  5354. petIsSterilized: pet.isSterilized,
  5355. petHealthStatus: pet.healthStatus || "",
  5356. petAllergies: pet.allergies || "",
  5357. petMedicalHistory: pet.medicalHistory || "",
  5358. petVaccineStatus: pet.vaccineStatus || "",
  5359. ownerName: pet.ownerName || "",
  5360. ownerPhone: pet.ownerPhone || ""
  5361. };
  5362. } else {
  5363. this.currentPetInfo = {
  5364. ...this.orderDetail,
  5365. petGender: "",
  5366. petAge: "未知",
  5367. petWeight: "未知",
  5368. petPersonality: "无",
  5369. petHobby: "",
  5370. petRemark: "无",
  5371. petTags: [],
  5372. petLogs: []
  5373. };
  5374. }
  5375. this.showPetModal = true;
  5376. },
  5377. closePetProfile() {
  5378. this.showPetModal = false;
  5379. },
  5380. openPetRemarkInput() {
  5381. this.petRemarkText = "";
  5382. this.showPetRemarkInput = true;
  5383. },
  5384. closePetRemarkInput() {
  5385. this.showPetRemarkInput = false;
  5386. },
  5387. submitPetRemark() {
  5388. if (!this.petRemarkText.trim()) {
  5389. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5390. return;
  5391. }
  5392. const now = /* @__PURE__ */ new Date();
  5393. const date = `${now.getFullYear()}/${String(now.getMonth() + 1).padStart(2, "0")}/${String(now.getDate()).padStart(2, "0")}`;
  5394. if (!this.currentPetInfo.petLogs) {
  5395. this.currentPetInfo.petLogs = [];
  5396. }
  5397. this.currentPetInfo.petLogs.unshift({
  5398. date,
  5399. content: this.petRemarkText,
  5400. recorder: this.orderDetail.fulfillerName || "未知"
  5401. });
  5402. this.closePetRemarkInput();
  5403. uni.showToast({ title: "备注已添加", icon: "success" });
  5404. },
  5405. goToAnomaly() {
  5406. uni.navigateTo({
  5407. url: "/pages/orders/anomaly?orderId=" + (this.orderDetail.orderNo || "")
  5408. });
  5409. },
  5410. callPhone() {
  5411. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5412. uni.makePhoneCall({ phoneNumber: phoneNum });
  5413. },
  5414. openNavigation(type) {
  5415. this.navTargetPointType = type;
  5416. this.showNavModal = true;
  5417. },
  5418. closeNavModal() {
  5419. this.showNavModal = false;
  5420. },
  5421. chooseMap(mapType) {
  5422. let pointType = this.navTargetPointType;
  5423. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5424. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5425. this.showNavModal = false;
  5426. uni.openLocation({
  5427. latitude: 30.52,
  5428. // Mock lat
  5429. longitude: 114.31,
  5430. // Mock lng
  5431. name: name || "目的地",
  5432. address: address || "默认地址",
  5433. success: function() {
  5434. formatAppLog("log", "at pages/orders/detail-logic.js:486", "打开导航成功: " + mapType);
  5435. }
  5436. });
  5437. },
  5438. openUploadModal() {
  5439. this.modalMediaList = [];
  5440. this.modalRemark = "";
  5441. this.showUploadModal = true;
  5442. },
  5443. closeUploadModal() {
  5444. this.showUploadModal = false;
  5445. },
  5446. handleConfirmUpload() {
  5447. formatAppLog("log", "at pages/orders/detail-logic.js:499", "handleConfirmUpload被调用");
  5448. this.confirmUploadModal();
  5449. },
  5450. async chooseModalMedia() {
  5451. formatAppLog("log", "at pages/orders/detail-logic.js:503", "chooseModalMedia被调用");
  5452. uni.chooseMedia({
  5453. count: 5 - this.modalMediaList.length,
  5454. mediaType: ["image", "video"],
  5455. sourceType: ["album", "camera"],
  5456. success: async (res) => {
  5457. formatAppLog("log", "at pages/orders/detail-logic.js:510", "选择媒体文件成功:", res.tempFiles);
  5458. uni.showLoading({ title: "上传中...", mask: true });
  5459. try {
  5460. for (const file of res.tempFiles) {
  5461. const filePath = file.tempFilePath;
  5462. const fileType = file.fileType;
  5463. formatAppLog("log", "at pages/orders/detail-logic.js:516", "开始上传文件:", filePath, "类型:", fileType);
  5464. const uploadRes = await uploadFile(filePath);
  5465. formatAppLog("log", "at pages/orders/detail-logic.js:519", "服务器响应:", uploadRes);
  5466. if (uploadRes.code === 200) {
  5467. this.modalMediaList.push({
  5468. url: uploadRes.data.url,
  5469. ossId: uploadRes.data.ossId,
  5470. localPath: filePath,
  5471. mediaType: fileType,
  5472. thumb: file.thumbTempFilePath
  5473. // 视频缩略图(如果有)
  5474. });
  5475. formatAppLog("log", "at pages/orders/detail-logic.js:529", "媒体文件添加成功");
  5476. }
  5477. }
  5478. uni.hideLoading();
  5479. uni.showToast({ title: "上传成功", icon: "success" });
  5480. } catch (err) {
  5481. uni.hideLoading();
  5482. formatAppLog("error", "at pages/orders/detail-logic.js:536", "上传失败详情:", err);
  5483. uni.showToast({ title: "上传失败", icon: "none" });
  5484. }
  5485. },
  5486. fail: (err) => {
  5487. formatAppLog("error", "at pages/orders/detail-logic.js:541", "选择媒体文件失败:", err);
  5488. }
  5489. });
  5490. },
  5491. removeModalMedia(index) {
  5492. this.modalMediaList.splice(index, 1);
  5493. },
  5494. getCurrentTime() {
  5495. const now = /* @__PURE__ */ new Date();
  5496. const y = now.getFullYear();
  5497. const m = String(now.getMonth() + 1).padStart(2, "0");
  5498. const d = String(now.getDate()).padStart(2, "0");
  5499. const h = String(now.getHours()).padStart(2, "0");
  5500. const min = String(now.getMinutes()).padStart(2, "0");
  5501. return `${y}/${m}/${d} ${h}:${min}`;
  5502. },
  5503. async confirmUploadModal() {
  5504. formatAppLog("log", "at pages/orders/detail-logic.js:559", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5505. if (this.modalMediaList.length === 0) {
  5506. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5507. return;
  5508. }
  5509. try {
  5510. uni.showLoading({ title: "提交中..." });
  5511. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5512. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5513. formatAppLog("log", "at pages/orders/detail-logic.js:570", "准备打卡,ossIds:", ossIds);
  5514. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5515. const clockInData = {
  5516. orderId: this.orderId,
  5517. photos: ossIds,
  5518. content: this.modalRemark || "",
  5519. step: clockInType,
  5520. title: this.currentTaskTitle,
  5521. startFlag: Number(clockInType) === 1,
  5522. endFlag: Number(this.currentStep) === this.steps.length - 1
  5523. };
  5524. formatAppLog("log", "at pages/orders/detail-logic.js:585", "打卡数据:", clockInData);
  5525. await clockIn(clockInData);
  5526. uni.hideLoading();
  5527. this.closeUploadModal();
  5528. uni.showToast({ title: "打卡成功", icon: "success" });
  5529. await this.loadOrderDetail();
  5530. } catch (err) {
  5531. uni.hideLoading();
  5532. formatAppLog("error", "at pages/orders/detail-logic.js:595", "打卡失败:", err);
  5533. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5534. }
  5535. },
  5536. copyOrderNo() {
  5537. uni.setClipboardData({
  5538. data: this.orderDetail.orderNo,
  5539. success: () => {
  5540. uni.showToast({ title: "复制成功", icon: "none" });
  5541. }
  5542. });
  5543. },
  5544. openSumModal() {
  5545. let displayDate = "";
  5546. if (this.orderDetail.time) {
  5547. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5548. } else {
  5549. const now = /* @__PURE__ */ new Date();
  5550. const y = now.getFullYear();
  5551. const m = String(now.getMonth() + 1).padStart(2, "0");
  5552. const d = String(now.getDate()).padStart(2, "0");
  5553. displayDate = `${y}/${m}/${d}`;
  5554. }
  5555. this.sumDate = displayDate;
  5556. if (this.orderDetail.nursingSummary) {
  5557. this.sumContent = this.orderDetail.nursingSummary;
  5558. } else if (!this.sumContent) {
  5559. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5560. }
  5561. this.showSumModal = true;
  5562. },
  5563. closeSumModal() {
  5564. this.showSumModal = false;
  5565. },
  5566. async submitSumModal() {
  5567. if (!this.sumContent.trim()) {
  5568. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5569. return;
  5570. }
  5571. uni.showLoading({ title: "提交中...", mask: true });
  5572. try {
  5573. const res = await submitNursingSummary({
  5574. orderId: this.orderId,
  5575. content: this.sumContent
  5576. });
  5577. uni.hideLoading();
  5578. if (res.code === 200) {
  5579. uni.showToast({ title: "小结已提交", icon: "success" });
  5580. this.closeSumModal();
  5581. await this.loadOrderDetail();
  5582. } else {
  5583. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5584. }
  5585. } catch (err) {
  5586. uni.hideLoading();
  5587. formatAppLog("error", "at pages/orders/detail-logic.js:663", "提交宠护小结失败:", err);
  5588. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5589. }
  5590. },
  5591. /**
  5592. * 检查是否为视频
  5593. */
  5594. isVideo(url) {
  5595. if (!url)
  5596. return false;
  5597. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5598. const lowerUrl = url.toLowerCase();
  5599. return videoExts.some((ext) => lowerUrl.includes(ext));
  5600. },
  5601. /**
  5602. * 获取视频封面图 (第一帧)
  5603. * 兼容阿里云、腾讯云等主流 OSS
  5604. */
  5605. getVideoPoster(url) {
  5606. if (!this.isVideo(url))
  5607. return url;
  5608. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5609. return url;
  5610. }
  5611. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5612. const tencent = `?ci-process=snapshot&time=1`;
  5613. if (url.includes("myqcloud.com")) {
  5614. return url + tencent;
  5615. }
  5616. return url + aliyun;
  5617. },
  5618. /**
  5619. * 统一预览媒体
  5620. */
  5621. previewMedia(medias, currentIdx) {
  5622. const url = medias[currentIdx];
  5623. if (this.isVideo(url)) {
  5624. this.videoPlayerUrl = url;
  5625. this.videoPlayerShow = true;
  5626. } else {
  5627. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5628. const currentImgUrl = url;
  5629. const newIdx = imageUrls.indexOf(currentImgUrl);
  5630. uni.previewImage({
  5631. current: newIdx >= 0 ? newIdx : 0,
  5632. urls: imageUrls
  5633. });
  5634. }
  5635. },
  5636. closeVideoPlayer() {
  5637. this.videoPlayerShow = false;
  5638. this.videoPlayerUrl = "";
  5639. }
  5640. }
  5641. };
  5642. const _imports_14 = "/static/icons/phone_orange.svg";
  5643. const _imports_1$7 = "/static/icons/clock.svg";
  5644. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5645. const _imports_4$1 = "/static/icons/heart.svg";
  5646. const _imports_5 = "/static/icons/file.svg";
  5647. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5648. const _imports_7 = "/static/icons/order_no.svg";
  5649. const _imports_8$1 = "/static/icons/play_circle.svg";
  5650. const _imports_9$1 = "/static/empty-rest.png";
  5651. const _sfc_main$q = {
  5652. ...logic$1
  5653. };
  5654. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5655. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5656. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5657. key: 0,
  5658. class: "loading-container"
  5659. }, [
  5660. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5661. vue.createElementVNode("view", {
  5662. class: "skeleton-line skeleton-ani",
  5663. style: { "width": "30%", "height": "36rpx" }
  5664. }),
  5665. vue.createElementVNode("view", {
  5666. class: "skeleton-line skeleton-ani",
  5667. style: { "width": "20%", "height": "36rpx" }
  5668. })
  5669. ]),
  5670. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5671. (vue.openBlock(), vue.createElementBlock(
  5672. vue.Fragment,
  5673. null,
  5674. vue.renderList(4, (i) => {
  5675. return vue.createElementVNode("view", {
  5676. class: "skeleton-circle skeleton-ani",
  5677. key: i
  5678. });
  5679. }),
  5680. 64
  5681. /* STABLE_FRAGMENT */
  5682. ))
  5683. ]),
  5684. (vue.openBlock(), vue.createElementBlock(
  5685. vue.Fragment,
  5686. null,
  5687. vue.renderList(3, (j) => {
  5688. return vue.createElementVNode("view", {
  5689. class: "skeleton-card",
  5690. key: "c" + j
  5691. }, [
  5692. vue.createElementVNode("view", {
  5693. class: "skeleton-line skeleton-ani",
  5694. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5695. }),
  5696. vue.createElementVNode("view", {
  5697. class: "skeleton-line skeleton-ani",
  5698. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5699. }),
  5700. vue.createElementVNode("view", {
  5701. class: "skeleton-line skeleton-ani",
  5702. style: { "width": "75%", "height": "24rpx" }
  5703. })
  5704. ]);
  5705. }),
  5706. 64
  5707. /* STABLE_FRAGMENT */
  5708. ))
  5709. ])) : (vue.openBlock(), vue.createElementBlock(
  5710. vue.Fragment,
  5711. { key: 1 },
  5712. [
  5713. vue.createElementVNode("view", { class: "detail-header" }, [
  5714. vue.createElementVNode("view", { class: "status-row" }, [
  5715. vue.createElementVNode(
  5716. "text",
  5717. { class: "status-title" },
  5718. vue.toDisplayString(_ctx.displayStatusText),
  5719. 1
  5720. /* TEXT */
  5721. ),
  5722. vue.createElementVNode(
  5723. "text",
  5724. { class: "status-price" },
  5725. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5726. 1
  5727. /* TEXT */
  5728. )
  5729. ]),
  5730. vue.createElementVNode("view", { class: "progress-bar" }, [
  5731. (vue.openBlock(true), vue.createElementBlock(
  5732. vue.Fragment,
  5733. null,
  5734. vue.renderList(_ctx.progressSteps, (step, index) => {
  5735. return vue.openBlock(), vue.createElementBlock(
  5736. "view",
  5737. {
  5738. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5739. key: index
  5740. },
  5741. [
  5742. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5743. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5744. "view",
  5745. {
  5746. key: 0,
  5747. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5748. },
  5749. null,
  5750. 2
  5751. /* CLASS */
  5752. )) : vue.createCommentVNode("v-if", true),
  5753. vue.createElementVNode(
  5754. "view",
  5755. { class: "step-circle" },
  5756. vue.toDisplayString(index + 1),
  5757. 1
  5758. /* TEXT */
  5759. )
  5760. ]),
  5761. vue.createElementVNode(
  5762. "text",
  5763. { class: "step-text" },
  5764. vue.toDisplayString(step),
  5765. 1
  5766. /* TEXT */
  5767. )
  5768. ],
  5769. 2
  5770. /* CLASS */
  5771. );
  5772. }),
  5773. 128
  5774. /* KEYED_FRAGMENT */
  5775. ))
  5776. ])
  5777. ]),
  5778. vue.createElementVNode("scroll-view", {
  5779. "scroll-y": "",
  5780. class: "detail-content"
  5781. }, [
  5782. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5783. vue.createElementVNode("image", {
  5784. class: "pb-avatar",
  5785. src: _ctx.orderDetail.petAvatar,
  5786. mode: "aspectFill"
  5787. }, null, 8, ["src"]),
  5788. vue.createElementVNode("view", { class: "pb-info" }, [
  5789. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5790. vue.createElementVNode(
  5791. "text",
  5792. { class: "pb-name" },
  5793. vue.toDisplayString(_ctx.orderDetail.petName),
  5794. 1
  5795. /* TEXT */
  5796. ),
  5797. vue.createElementVNode(
  5798. "text",
  5799. { class: "pb-breed" },
  5800. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed),
  5801. 1
  5802. /* TEXT */
  5803. )
  5804. ]),
  5805. vue.createElementVNode("view", { class: "pb-tags" }, [
  5806. vue.createElementVNode(
  5807. "text",
  5808. { class: "pb-tag" },
  5809. vue.toDisplayString(_ctx.orderDetail.serviceTag),
  5810. 1
  5811. /* TEXT */
  5812. )
  5813. ])
  5814. ]),
  5815. vue.createElementVNode("view", { class: "pb-actions" }, [
  5816. vue.createElementVNode("view", {
  5817. class: "pb-btn profile-btn",
  5818. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5819. }, "宠物档案"),
  5820. vue.createElementVNode("view", {
  5821. class: "pb-btn phone-btn",
  5822. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5823. }, [
  5824. vue.createElementVNode("image", {
  5825. class: "phone-icon",
  5826. src: _imports_14
  5827. })
  5828. ])
  5829. ])
  5830. ]),
  5831. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5832. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5833. vue.createElementVNode("image", {
  5834. class: "si-icon outline",
  5835. src: _imports_1$7
  5836. }),
  5837. vue.createElementVNode("view", { class: "si-content" }, [
  5838. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  5839. vue.createElementVNode(
  5840. "text",
  5841. { class: "si-val" },
  5842. vue.toDisplayString(_ctx.orderDetail.time),
  5843. 1
  5844. /* TEXT */
  5845. )
  5846. ]),
  5847. vue.createElementVNode("view", {
  5848. class: "si-action record-btn",
  5849. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5850. }, [
  5851. vue.createElementVNode("text", null, "异常记录"),
  5852. vue.createElementVNode("image", {
  5853. class: "record-arrow",
  5854. src: _imports_0$2
  5855. })
  5856. ])
  5857. ]),
  5858. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  5859. vue.Fragment,
  5860. { key: 0 },
  5861. [
  5862. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  5863. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  5864. vue.createElementVNode("view", { class: "route-line-vertical" }),
  5865. vue.createElementVNode("view", { class: "si-content" }, [
  5866. vue.createElementVNode(
  5867. "text",
  5868. { class: "si-addr-title" },
  5869. vue.toDisplayString(_ctx.orderDetail.startLocation),
  5870. 1
  5871. /* TEXT */
  5872. ),
  5873. vue.createElementVNode(
  5874. "text",
  5875. { class: "si-addr-desc" },
  5876. vue.toDisplayString(_ctx.orderDetail.startAddress),
  5877. 1
  5878. /* TEXT */
  5879. )
  5880. ]),
  5881. vue.createElementVNode("view", {
  5882. class: "nav-btn-circle",
  5883. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  5884. }, [
  5885. vue.createElementVNode("image", {
  5886. class: "nav-arrow",
  5887. src: _imports_3$2
  5888. })
  5889. ])
  5890. ]),
  5891. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5892. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  5893. vue.createElementVNode("view", { class: "si-content" }, [
  5894. vue.createElementVNode(
  5895. "text",
  5896. { class: "si-addr-title" },
  5897. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5898. 1
  5899. /* TEXT */
  5900. ),
  5901. vue.createElementVNode(
  5902. "text",
  5903. { class: "si-addr-desc" },
  5904. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5905. 1
  5906. /* TEXT */
  5907. )
  5908. ]),
  5909. vue.createElementVNode("view", {
  5910. class: "nav-btn-circle",
  5911. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  5912. }, [
  5913. vue.createElementVNode("image", {
  5914. class: "nav-arrow",
  5915. src: _imports_3$2
  5916. })
  5917. ])
  5918. ])
  5919. ],
  5920. 64
  5921. /* STABLE_FRAGMENT */
  5922. )) : (vue.openBlock(), vue.createElementBlock(
  5923. vue.Fragment,
  5924. { key: 1 },
  5925. [
  5926. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5927. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  5928. vue.createElementVNode("view", { class: "si-content" }, [
  5929. vue.createElementVNode(
  5930. "text",
  5931. { class: "si-addr-title" },
  5932. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5933. 1
  5934. /* TEXT */
  5935. ),
  5936. vue.createElementVNode(
  5937. "text",
  5938. { class: "si-addr-desc" },
  5939. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5940. 1
  5941. /* TEXT */
  5942. )
  5943. ]),
  5944. vue.createElementVNode("view", {
  5945. class: "nav-btn-circle",
  5946. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  5947. }, [
  5948. vue.createElementVNode("image", {
  5949. class: "nav-arrow",
  5950. src: _imports_3$2
  5951. })
  5952. ])
  5953. ]),
  5954. vue.createElementVNode("view", { class: "si-row" }, [
  5955. vue.createElementVNode("image", {
  5956. class: "si-icon outline",
  5957. src: _imports_4$1
  5958. }),
  5959. vue.createElementVNode("view", { class: "si-content" }, [
  5960. vue.createElementVNode("text", { class: "si-label" }, "服务内容"),
  5961. vue.createElementVNode(
  5962. "text",
  5963. { class: "si-val" },
  5964. vue.toDisplayString(_ctx.orderDetail.serviceContent),
  5965. 1
  5966. /* TEXT */
  5967. )
  5968. ])
  5969. ])
  5970. ],
  5971. 64
  5972. /* STABLE_FRAGMENT */
  5973. )),
  5974. vue.createElementVNode("view", { class: "si-row" }, [
  5975. vue.createElementVNode("image", {
  5976. class: "si-icon outline custom-icon-file",
  5977. src: _imports_5
  5978. }),
  5979. vue.createElementVNode("view", { class: "si-content" }, [
  5980. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  5981. vue.createElementVNode(
  5982. "text",
  5983. { class: "si-val" },
  5984. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  5985. 1
  5986. /* TEXT */
  5987. )
  5988. ])
  5989. ])
  5990. ]),
  5991. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  5992. key: 0,
  5993. class: "white-card task-card"
  5994. }, [
  5995. vue.createElementVNode(
  5996. "text",
  5997. { class: "tc-title" },
  5998. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  5999. 1
  6000. /* TEXT */
  6001. ),
  6002. vue.createElementVNode(
  6003. "text",
  6004. { class: "tc-desc" },
  6005. vue.toDisplayString(_ctx.currentTaskDesc),
  6006. 1
  6007. /* TEXT */
  6008. ),
  6009. vue.createElementVNode("view", {
  6010. class: "full-media-add",
  6011. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6012. }, [
  6013. vue.createElementVNode("image", {
  6014. class: "upload-icon-large",
  6015. src: _imports_1$6
  6016. }),
  6017. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6018. ])
  6019. ])) : vue.createCommentVNode("v-if", true),
  6020. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6021. vue.createElementVNode("view", { class: "bi-row" }, [
  6022. vue.createElementVNode("image", {
  6023. class: "si-icon outline",
  6024. src: _imports_7
  6025. }),
  6026. vue.createElementVNode("view", { class: "bi-content" }, [
  6027. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6028. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6029. vue.createElementVNode(
  6030. "text",
  6031. { class: "bi-val" },
  6032. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6033. 1
  6034. /* TEXT */
  6035. ),
  6036. vue.createElementVNode("text", {
  6037. class: "bi-copy",
  6038. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6039. }, "复制")
  6040. ])
  6041. ])
  6042. ]),
  6043. vue.createElementVNode("view", { class: "bi-row" }, [
  6044. vue.createElementVNode("image", {
  6045. class: "si-icon outline",
  6046. src: _imports_1$7
  6047. }),
  6048. vue.createElementVNode("view", { class: "bi-content" }, [
  6049. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6050. vue.createElementVNode(
  6051. "text",
  6052. { class: "bi-val" },
  6053. vue.toDisplayString(_ctx.orderDetail.createTime),
  6054. 1
  6055. /* TEXT */
  6056. )
  6057. ])
  6058. ])
  6059. ]),
  6060. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6061. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6062. vue.createElementVNode("view", { class: "orange-bar" }),
  6063. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6064. ]),
  6065. vue.createElementVNode("view", { class: "tl-list" }, [
  6066. (vue.openBlock(true), vue.createElementBlock(
  6067. vue.Fragment,
  6068. null,
  6069. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6070. return vue.openBlock(), vue.createElementBlock("view", {
  6071. class: "tl-item",
  6072. key: idx
  6073. }, [
  6074. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6075. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6076. ]),
  6077. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6078. vue.createElementVNode("view", { class: "tl-header" }, [
  6079. vue.createElementVNode(
  6080. "text",
  6081. { class: "tl-status" },
  6082. vue.toDisplayString(log.status),
  6083. 1
  6084. /* TEXT */
  6085. ),
  6086. vue.createElementVNode(
  6087. "text",
  6088. { class: "tl-time" },
  6089. vue.toDisplayString(log.time),
  6090. 1
  6091. /* TEXT */
  6092. )
  6093. ]),
  6094. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6095. key: 0,
  6096. class: "tl-medias"
  6097. }, [
  6098. (vue.openBlock(true), vue.createElementBlock(
  6099. vue.Fragment,
  6100. null,
  6101. vue.renderList(log.medias, (media, midx) => {
  6102. return vue.openBlock(), vue.createElementBlock("view", {
  6103. class: "tl-media-item",
  6104. key: midx,
  6105. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6106. }, [
  6107. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6108. key: 0,
  6109. class: "tl-img",
  6110. src: media,
  6111. mode: "aspectFill"
  6112. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6113. key: 1,
  6114. class: "tl-video-placeholder"
  6115. }, [
  6116. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6117. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6118. ]))
  6119. ], 8, ["onClick"]);
  6120. }),
  6121. 128
  6122. /* KEYED_FRAGMENT */
  6123. ))
  6124. ])) : vue.createCommentVNode("v-if", true),
  6125. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6126. key: 1,
  6127. class: "tl-remark"
  6128. }, [
  6129. vue.createElementVNode(
  6130. "text",
  6131. null,
  6132. vue.toDisplayString(log.remark),
  6133. 1
  6134. /* TEXT */
  6135. )
  6136. ])) : vue.createCommentVNode("v-if", true)
  6137. ])
  6138. ]);
  6139. }),
  6140. 128
  6141. /* KEYED_FRAGMENT */
  6142. ))
  6143. ])
  6144. ]),
  6145. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6146. ]),
  6147. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6148. vue.createElementVNode("view", { class: "action-left" }, [
  6149. vue.createElementVNode("button", {
  6150. class: "action-btn outline grey-outline",
  6151. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6152. }, "异常上报"),
  6153. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6154. key: 0,
  6155. class: "action-btn outline orange-outline",
  6156. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6157. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6158. ]),
  6159. vue.createElementVNode("view", { class: "action-right" }, [
  6160. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6161. "button",
  6162. {
  6163. key: 0,
  6164. class: "action-btn primary",
  6165. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6166. },
  6167. vue.toDisplayString(_ctx.currentTaskTitle),
  6168. 1
  6169. /* TEXT */
  6170. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6171. key: 1,
  6172. class: "action-btn primary grey-bg"
  6173. }, "已完成"))
  6174. ])
  6175. ]),
  6176. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6177. key: 0,
  6178. class: "pet-modal-mask",
  6179. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6180. }, [
  6181. vue.createElementVNode("view", {
  6182. class: "pet-modal-content",
  6183. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6184. }, ["stop"]))
  6185. }, [
  6186. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6187. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6188. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6189. vue.createElementVNode("view", {
  6190. class: "pm-remark-btn",
  6191. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6192. }, "备注"),
  6193. vue.createElementVNode("view", {
  6194. class: "close-icon-btn",
  6195. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6196. }, "×")
  6197. ]),
  6198. vue.createElementVNode("scroll-view", {
  6199. "scroll-y": "",
  6200. class: "pet-modal-scroll"
  6201. }, [
  6202. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6203. vue.createElementVNode("image", {
  6204. class: "pm-avatar",
  6205. src: _ctx.currentPetInfo.petAvatar,
  6206. mode: "aspectFill"
  6207. }, null, 8, ["src"]),
  6208. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6209. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6210. vue.createElementVNode(
  6211. "text",
  6212. { class: "pm-name" },
  6213. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6214. 1
  6215. /* TEXT */
  6216. ),
  6217. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6218. key: 0,
  6219. class: "pm-gender"
  6220. }, [
  6221. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6222. vue.createElementVNode("text", null, "公")
  6223. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6224. key: 1,
  6225. class: "pm-gender female"
  6226. }, [
  6227. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6228. vue.createElementVNode("text", null, "母")
  6229. ])) : vue.createCommentVNode("v-if", true)
  6230. ]),
  6231. vue.createElementVNode(
  6232. "text",
  6233. { class: "pm-breed" },
  6234. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6235. 1
  6236. /* TEXT */
  6237. )
  6238. ])
  6239. ]),
  6240. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6241. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6242. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6243. vue.createElementVNode(
  6244. "text",
  6245. { class: "pm-val" },
  6246. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6247. 1
  6248. /* TEXT */
  6249. )
  6250. ]),
  6251. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6252. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6253. vue.createElementVNode(
  6254. "text",
  6255. { class: "pm-val" },
  6256. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6257. 1
  6258. /* TEXT */
  6259. )
  6260. ]),
  6261. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6262. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6263. vue.createElementVNode(
  6264. "text",
  6265. { class: "pm-val" },
  6266. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6267. 1
  6268. /* TEXT */
  6269. )
  6270. ]),
  6271. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6272. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6273. vue.createElementVNode(
  6274. "text",
  6275. { class: "pm-val" },
  6276. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6277. 1
  6278. /* TEXT */
  6279. )
  6280. ]),
  6281. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6282. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6283. vue.createElementVNode(
  6284. "text",
  6285. { class: "pm-val" },
  6286. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6287. 1
  6288. /* TEXT */
  6289. )
  6290. ])
  6291. ]),
  6292. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6293. key: 0,
  6294. class: "pm-tags-row"
  6295. }, [
  6296. (vue.openBlock(true), vue.createElementBlock(
  6297. vue.Fragment,
  6298. null,
  6299. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6300. return vue.openBlock(), vue.createElementBlock("view", {
  6301. class: "pm-tag-chip",
  6302. key: ti
  6303. }, [
  6304. vue.createElementVNode(
  6305. "text",
  6306. { class: "pm-tag-chip-text" },
  6307. vue.toDisplayString(tag),
  6308. 1
  6309. /* TEXT */
  6310. )
  6311. ]);
  6312. }),
  6313. 128
  6314. /* KEYED_FRAGMENT */
  6315. ))
  6316. ])) : vue.createCommentVNode("v-if", true),
  6317. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6318. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6319. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6320. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6321. ]),
  6322. (vue.openBlock(true), vue.createElementBlock(
  6323. vue.Fragment,
  6324. null,
  6325. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6326. return vue.openBlock(), vue.createElementBlock("view", {
  6327. class: "pm-log-item",
  6328. key: lIndex
  6329. }, [
  6330. vue.createElementVNode(
  6331. "text",
  6332. { class: "pm-log-date" },
  6333. vue.toDisplayString(log.date),
  6334. 1
  6335. /* TEXT */
  6336. ),
  6337. vue.createElementVNode(
  6338. "text",
  6339. { class: "pm-log-text" },
  6340. vue.toDisplayString(log.content),
  6341. 1
  6342. /* TEXT */
  6343. ),
  6344. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6345. "text",
  6346. {
  6347. key: 0,
  6348. class: "pm-log-recorder"
  6349. },
  6350. "记录人:" + vue.toDisplayString(log.recorder),
  6351. 1
  6352. /* TEXT */
  6353. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6354. key: 1,
  6355. class: "pm-log-recorder system"
  6356. }, "系统记录"))
  6357. ]);
  6358. }),
  6359. 128
  6360. /* KEYED_FRAGMENT */
  6361. ))
  6362. ]),
  6363. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6364. ])
  6365. ])
  6366. ])) : vue.createCommentVNode("v-if", true),
  6367. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6368. key: 1,
  6369. class: "upload-modal-mask",
  6370. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6371. }, [
  6372. vue.createElementVNode("view", {
  6373. class: "upload-modal-content",
  6374. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6375. }, ["stop"]))
  6376. }, [
  6377. vue.createElementVNode("view", { class: "um-header" }, [
  6378. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6379. ]),
  6380. vue.createElementVNode("view", { class: "um-body" }, [
  6381. vue.withDirectives(vue.createElementVNode(
  6382. "textarea",
  6383. {
  6384. class: "um-textarea",
  6385. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6386. "auto-height": "",
  6387. placeholder: "请输入宠物备注内容...",
  6388. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6389. },
  6390. null,
  6391. 512
  6392. /* NEED_PATCH */
  6393. ), [
  6394. [vue.vModelText, _ctx.petRemarkText]
  6395. ])
  6396. ]),
  6397. vue.createElementVNode("view", { class: "um-footer" }, [
  6398. vue.createElementVNode("button", {
  6399. class: "um-submit-btn active",
  6400. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6401. }, "确认提交")
  6402. ])
  6403. ])
  6404. ])) : vue.createCommentVNode("v-if", true),
  6405. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6406. key: 2,
  6407. class: "nav-modal-mask",
  6408. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6409. }, [
  6410. vue.createElementVNode("view", {
  6411. class: "nav-action-sheet",
  6412. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6413. }, ["stop"]))
  6414. }, [
  6415. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6416. vue.createElementVNode("view", {
  6417. class: "nav-sheet-item",
  6418. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6419. }, "高德地图"),
  6420. vue.createElementVNode("view", {
  6421. class: "nav-sheet-item",
  6422. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6423. }, "腾讯地图"),
  6424. vue.createElementVNode("view", {
  6425. class: "nav-sheet-item",
  6426. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6427. }, "百度地图"),
  6428. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6429. vue.createElementVNode("view", {
  6430. class: "nav-sheet-item cancel",
  6431. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6432. }, "取消")
  6433. ])
  6434. ])) : vue.createCommentVNode("v-if", true),
  6435. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6436. key: 3,
  6437. class: "upload-modal-mask",
  6438. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6439. }, [
  6440. vue.createElementVNode("view", {
  6441. class: "upload-modal-content",
  6442. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6443. }, ["stop"]))
  6444. }, [
  6445. vue.createElementVNode("view", { class: "um-header" }, [
  6446. vue.createElementVNode(
  6447. "text",
  6448. { class: "um-title" },
  6449. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6450. 1
  6451. /* TEXT */
  6452. ),
  6453. vue.createElementVNode(
  6454. "text",
  6455. { class: "um-remark-hint" },
  6456. vue.toDisplayString(_ctx.currentTaskDesc),
  6457. 1
  6458. /* TEXT */
  6459. )
  6460. ]),
  6461. vue.createElementVNode("view", { class: "um-body" }, [
  6462. vue.createElementVNode("view", { class: "um-grid" }, [
  6463. (vue.openBlock(true), vue.createElementBlock(
  6464. vue.Fragment,
  6465. null,
  6466. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6467. return vue.openBlock(), vue.createElementBlock("view", {
  6468. class: "um-item",
  6469. key: idx
  6470. }, [
  6471. vue.createElementVNode("image", {
  6472. class: "um-preview",
  6473. src: img.thumb || img.url || img.localPath || img,
  6474. mode: "aspectFill"
  6475. }, null, 8, ["src"]),
  6476. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6477. key: 0,
  6478. class: "um-video-badge"
  6479. }, [
  6480. vue.createElementVNode("image", {
  6481. class: "play-icon-small",
  6482. src: _imports_8$1
  6483. })
  6484. ])) : vue.createCommentVNode("v-if", true),
  6485. vue.createElementVNode("view", {
  6486. class: "um-del",
  6487. onClick: ($event) => _ctx.removeModalMedia(idx)
  6488. }, "×", 8, ["onClick"])
  6489. ]);
  6490. }),
  6491. 128
  6492. /* KEYED_FRAGMENT */
  6493. )),
  6494. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6495. key: 0,
  6496. class: "um-add",
  6497. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6498. }, [
  6499. vue.createElementVNode("image", {
  6500. class: "um-add-icon",
  6501. src: _imports_1$6
  6502. }),
  6503. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6504. ])) : vue.createCommentVNode("v-if", true)
  6505. ]),
  6506. vue.withDirectives(vue.createElementVNode(
  6507. "textarea",
  6508. {
  6509. class: "um-textarea",
  6510. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6511. placeholder: "在此输入备注信息...",
  6512. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6513. },
  6514. null,
  6515. 512
  6516. /* NEED_PATCH */
  6517. ), [
  6518. [vue.vModelText, _ctx.modalRemark]
  6519. ])
  6520. ]),
  6521. vue.createElementVNode("view", { class: "um-footer" }, [
  6522. vue.createElementVNode(
  6523. "view",
  6524. {
  6525. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6526. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6527. },
  6528. " 确认提交",
  6529. 2
  6530. /* CLASS */
  6531. )
  6532. ])
  6533. ])
  6534. ])) : vue.createCommentVNode("v-if", true),
  6535. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6536. key: 4,
  6537. class: "sum-modal-mask",
  6538. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6539. }, [
  6540. vue.createElementVNode("view", {
  6541. class: "sum-modal-card",
  6542. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6543. }, ["stop"]))
  6544. }, [
  6545. vue.createElementVNode("scroll-view", {
  6546. "scroll-y": "",
  6547. class: "sum-modal-scroll"
  6548. }, [
  6549. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6550. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6551. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6552. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6553. vue.createElementVNode(
  6554. "text",
  6555. { class: "sum-meta-val" },
  6556. vue.toDisplayString(_ctx.sumDate),
  6557. 1
  6558. /* TEXT */
  6559. )
  6560. ]),
  6561. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6562. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6563. vue.createElementVNode(
  6564. "text",
  6565. { class: "sum-meta-val" },
  6566. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6567. 1
  6568. /* TEXT */
  6569. )
  6570. ]),
  6571. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6572. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6573. vue.createElementVNode(
  6574. "text",
  6575. { class: "sum-meta-val" },
  6576. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6577. 1
  6578. /* TEXT */
  6579. )
  6580. ]),
  6581. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6582. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6583. vue.createElementVNode("image", {
  6584. class: "sum-pet-avatar",
  6585. src: _ctx.orderDetail.petAvatar,
  6586. mode: "aspectFill"
  6587. }, null, 8, ["src"]),
  6588. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6589. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6590. vue.createElementVNode(
  6591. "text",
  6592. { class: "sum-pet-name" },
  6593. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6594. 1
  6595. /* TEXT */
  6596. ),
  6597. vue.createElementVNode(
  6598. "text",
  6599. { class: "sum-pet-breed" },
  6600. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6601. 1
  6602. /* TEXT */
  6603. )
  6604. ]),
  6605. vue.createElementVNode(
  6606. "text",
  6607. { class: "sum-pet-remark" },
  6608. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6609. 1
  6610. /* TEXT */
  6611. )
  6612. ])
  6613. ]),
  6614. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6615. vue.withDirectives(vue.createElementVNode(
  6616. "textarea",
  6617. {
  6618. class: "sum-textarea",
  6619. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6620. "auto-height": "",
  6621. placeholder: "请填写服务内容...",
  6622. "placeholder-style": "color:#ccc"
  6623. },
  6624. null,
  6625. 512
  6626. /* NEED_PATCH */
  6627. ), [
  6628. [vue.vModelText, _ctx.sumContent]
  6629. ]),
  6630. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6631. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6632. vue.createElementVNode(
  6633. "text",
  6634. { class: "sum-sign-val" },
  6635. vue.toDisplayString(_ctx.sumSigner),
  6636. 1
  6637. /* TEXT */
  6638. )
  6639. ]),
  6640. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6641. ])
  6642. ]),
  6643. vue.createElementVNode("view", { class: "sum-footer" }, [
  6644. vue.createElementVNode("button", {
  6645. class: "sum-submit-btn",
  6646. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6647. }, "提交小结")
  6648. ])
  6649. ])
  6650. ])) : vue.createCommentVNode("v-if", true),
  6651. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6652. key: 5,
  6653. class: "modal-mask",
  6654. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6655. }, [
  6656. vue.createElementVNode("view", {
  6657. class: "anomaly-modal-content",
  6658. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6659. }, ["stop"]))
  6660. }, [
  6661. vue.createElementVNode("view", { class: "am-header" }, [
  6662. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6663. vue.createElementVNode("view", {
  6664. class: "close-icon-btn",
  6665. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6666. }, "×")
  6667. ]),
  6668. vue.createElementVNode("scroll-view", {
  6669. "scroll-y": "",
  6670. class: "am-scroll-list"
  6671. }, [
  6672. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6673. key: 0,
  6674. class: "empty-list"
  6675. }, [
  6676. vue.createElementVNode("image", {
  6677. class: "empty-icon",
  6678. src: _imports_9$1,
  6679. mode: "aspectFit"
  6680. }),
  6681. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6682. ])) : vue.createCommentVNode("v-if", true),
  6683. (vue.openBlock(true), vue.createElementBlock(
  6684. vue.Fragment,
  6685. null,
  6686. vue.renderList(_ctx.anomalyList, (item, index) => {
  6687. return vue.openBlock(), vue.createElementBlock("view", {
  6688. class: "am-item",
  6689. key: index
  6690. }, [
  6691. vue.createElementVNode("view", { class: "am-item-header" }, [
  6692. vue.createElementVNode(
  6693. "text",
  6694. { class: "am-item-type" },
  6695. vue.toDisplayString(item.typeLabel),
  6696. 1
  6697. /* TEXT */
  6698. ),
  6699. vue.createElementVNode(
  6700. "text",
  6701. {
  6702. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6703. },
  6704. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6705. 3
  6706. /* TEXT, CLASS */
  6707. )
  6708. ]),
  6709. vue.createElementVNode(
  6710. "text",
  6711. { class: "am-item-content" },
  6712. vue.toDisplayString(item.content),
  6713. 1
  6714. /* TEXT */
  6715. ),
  6716. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6717. key: 0,
  6718. class: "am-item-photos"
  6719. }, [
  6720. (vue.openBlock(true), vue.createElementBlock(
  6721. vue.Fragment,
  6722. null,
  6723. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6724. return vue.openBlock(), vue.createElementBlock("view", {
  6725. class: "am-photo-item",
  6726. key: pIdx,
  6727. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  6728. }, [
  6729. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  6730. key: 0,
  6731. class: "am-photo",
  6732. src: photoUrl,
  6733. mode: "aspectFill"
  6734. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6735. key: 1,
  6736. class: "tl-video-placeholder miniaturized"
  6737. }, [
  6738. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  6739. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  6740. ]))
  6741. ], 8, ["onClick"]);
  6742. }),
  6743. 128
  6744. /* KEYED_FRAGMENT */
  6745. ))
  6746. ])) : vue.createCommentVNode("v-if", true),
  6747. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6748. key: 1,
  6749. class: "am-audit-box"
  6750. }, [
  6751. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6752. vue.createElementVNode(
  6753. "text",
  6754. { class: "am-audit-label" },
  6755. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6756. 1
  6757. /* TEXT */
  6758. ),
  6759. vue.createElementVNode(
  6760. "text",
  6761. { class: "am-audit-time" },
  6762. vue.toDisplayString(item.auditTime),
  6763. 1
  6764. /* TEXT */
  6765. )
  6766. ]),
  6767. vue.createElementVNode(
  6768. "text",
  6769. { class: "am-audit-remark" },
  6770. vue.toDisplayString(item.auditRemark || "无"),
  6771. 1
  6772. /* TEXT */
  6773. )
  6774. ])) : vue.createCommentVNode("v-if", true)
  6775. ]);
  6776. }),
  6777. 128
  6778. /* KEYED_FRAGMENT */
  6779. ))
  6780. ])
  6781. ])
  6782. ])) : vue.createCommentVNode("v-if", true),
  6783. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  6784. key: 6,
  6785. class: "video-player-mask",
  6786. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6787. }, [
  6788. vue.createElementVNode("view", {
  6789. class: "video-player-content",
  6790. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  6791. }, ["stop"]))
  6792. }, [
  6793. vue.createElementVNode("video", {
  6794. class: "v-player",
  6795. src: _ctx.videoPlayerUrl,
  6796. autoplay: "",
  6797. controls: ""
  6798. }, null, 8, ["src"]),
  6799. vue.createElementVNode("view", {
  6800. class: "v-close",
  6801. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6802. }, "×")
  6803. ])
  6804. ])) : vue.createCommentVNode("v-if", true)
  6805. ],
  6806. 64
  6807. /* STABLE_FRAGMENT */
  6808. ))
  6809. ]);
  6810. }
  6811. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6812. const _sfc_main$p = {
  6813. data() {
  6814. return {
  6815. orderId: "",
  6816. // 已选异常类型(dictValue)
  6817. selectedTypeValue: "",
  6818. // 已选异常类型标签(dictLabel,用于显示)
  6819. selectedTypeLabel: "",
  6820. // 异常描述
  6821. anomalyDesc: "",
  6822. // 照片列表(含 url 和 ossId)
  6823. photoList: [],
  6824. // 是否显示类型选择器
  6825. showTypeSheet: false,
  6826. // 异常类型字典列表(从后端获取)
  6827. anomalyTypes: []
  6828. };
  6829. },
  6830. onLoad(options) {
  6831. if (options.orderId) {
  6832. this.orderId = options.orderId;
  6833. }
  6834. this.loadAnomalyTypes();
  6835. },
  6836. computed: {
  6837. // 当前选中的类型显示文本
  6838. selectedType() {
  6839. return this.selectedTypeLabel || "";
  6840. }
  6841. },
  6842. methods: {
  6843. /**
  6844. * 加载异常类型字典数据
  6845. */
  6846. async loadAnomalyTypes() {
  6847. try {
  6848. const res = await getDictDataByType("flf_anamaly_type");
  6849. if (res.data && Array.isArray(res.data)) {
  6850. this.anomalyTypes = res.data.map((item) => ({
  6851. label: item.dictLabel,
  6852. value: item.dictValue,
  6853. dictCode: item.dictCode
  6854. }));
  6855. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  6856. }
  6857. } catch (err) {
  6858. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  6859. }
  6860. },
  6861. // 打开类型选择器
  6862. openTypeSheet() {
  6863. this.showTypeSheet = true;
  6864. },
  6865. // 关闭类型选择器
  6866. closeTypeSheet() {
  6867. this.showTypeSheet = false;
  6868. },
  6869. // 选择异常类型
  6870. selectType(type) {
  6871. this.selectedTypeValue = type.value;
  6872. this.selectedTypeLabel = type.label;
  6873. this.closeTypeSheet();
  6874. },
  6875. // 选择照片并上传
  6876. choosePhoto() {
  6877. uni.chooseImage({
  6878. count: 5 - this.photoList.length,
  6879. sizeType: ["compressed"],
  6880. sourceType: ["album", "camera"],
  6881. success: async (res) => {
  6882. uni.showLoading({ title: "上传中..." });
  6883. try {
  6884. for (const filePath of res.tempFilePaths) {
  6885. const uploadRes = await uploadFile(filePath);
  6886. if (uploadRes.code === 200) {
  6887. this.photoList.push({
  6888. url: uploadRes.data.url,
  6889. ossId: uploadRes.data.ossId,
  6890. localPath: filePath
  6891. });
  6892. }
  6893. }
  6894. uni.hideLoading();
  6895. } catch (err) {
  6896. uni.hideLoading();
  6897. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  6898. uni.showToast({ title: "上传失败", icon: "none" });
  6899. }
  6900. }
  6901. });
  6902. },
  6903. // 删除照片
  6904. removePhoto(idx) {
  6905. this.photoList.splice(idx, 1);
  6906. },
  6907. // 提交上报
  6908. async submitAnomaly() {
  6909. if (!this.selectedTypeValue) {
  6910. uni.showToast({ title: "请选择异常类型", icon: "none" });
  6911. return;
  6912. }
  6913. if (this.photoList.length === 0) {
  6914. uni.showToast({ title: "请上传现场照片", icon: "none" });
  6915. return;
  6916. }
  6917. const data = {
  6918. orderId: this.orderId,
  6919. type: this.selectedTypeValue,
  6920. content: this.anomalyDesc,
  6921. photos: this.photoList.map((p) => p.ossId)
  6922. };
  6923. try {
  6924. uni.showLoading({ title: "提交中..." });
  6925. await uploadAnamaly(data);
  6926. uni.hideLoading();
  6927. uni.showToast({ title: "上报成功", icon: "success" });
  6928. setTimeout(() => {
  6929. uni.navigateBack();
  6930. }, 1500);
  6931. } catch (err) {
  6932. uni.hideLoading();
  6933. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  6934. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  6935. }
  6936. }
  6937. }
  6938. };
  6939. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  6940. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  6941. vue.createElementVNode("scroll-view", {
  6942. "scroll-y": "",
  6943. class: "anomaly-scroll"
  6944. }, [
  6945. vue.createElementVNode("view", { class: "ano-card" }, [
  6946. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6947. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6948. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  6949. ]),
  6950. vue.createElementVNode("view", {
  6951. class: "ano-type-row",
  6952. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  6953. }, [
  6954. vue.createElementVNode(
  6955. "text",
  6956. {
  6957. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  6958. },
  6959. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  6960. 3
  6961. /* TEXT, CLASS */
  6962. ),
  6963. vue.createElementVNode("image", {
  6964. class: "ano-right-arrow",
  6965. src: _imports_0$2
  6966. })
  6967. ])
  6968. ]),
  6969. vue.createElementVNode("view", { class: "ano-card" }, [
  6970. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6971. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6972. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  6973. ]),
  6974. vue.withDirectives(vue.createElementVNode(
  6975. "textarea",
  6976. {
  6977. class: "ano-textarea",
  6978. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  6979. placeholder: "请详细描述现场异常情况...",
  6980. "placeholder-style": "color:#ccc; font-size:28rpx;",
  6981. maxlength: "500"
  6982. },
  6983. null,
  6984. 512
  6985. /* NEED_PATCH */
  6986. ), [
  6987. [vue.vModelText, $data.anomalyDesc]
  6988. ])
  6989. ]),
  6990. vue.createElementVNode("view", { class: "ano-card" }, [
  6991. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6992. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6993. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  6994. ]),
  6995. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  6996. (vue.openBlock(true), vue.createElementBlock(
  6997. vue.Fragment,
  6998. null,
  6999. vue.renderList($data.photoList, (img, idx) => {
  7000. return vue.openBlock(), vue.createElementBlock("view", {
  7001. class: "ano-photo-item",
  7002. key: idx
  7003. }, [
  7004. vue.createElementVNode("image", {
  7005. class: "ano-photo-preview",
  7006. src: img.url || img.localPath || img,
  7007. mode: "aspectFill"
  7008. }, null, 8, ["src"]),
  7009. vue.createElementVNode("view", {
  7010. class: "ano-photo-del",
  7011. onClick: ($event) => $options.removePhoto(idx)
  7012. }, "×", 8, ["onClick"])
  7013. ]);
  7014. }),
  7015. 128
  7016. /* KEYED_FRAGMENT */
  7017. )),
  7018. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7019. key: 0,
  7020. class: "ano-photo-add",
  7021. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7022. }, [
  7023. vue.createElementVNode("image", {
  7024. class: "ano-add-icon",
  7025. src: _imports_1$6
  7026. }),
  7027. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7028. ])) : vue.createCommentVNode("v-if", true)
  7029. ])
  7030. ]),
  7031. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7032. ]),
  7033. vue.createElementVNode("view", { class: "ano-footer" }, [
  7034. vue.createElementVNode("button", {
  7035. class: "ano-submit-btn",
  7036. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7037. }, "提交上报")
  7038. ]),
  7039. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7040. key: 0,
  7041. class: "ano-sheet-mask",
  7042. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7043. }, [
  7044. vue.createElementVNode("view", {
  7045. class: "ano-sheet",
  7046. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7047. }, ["stop"]))
  7048. }, [
  7049. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7050. vue.createElementVNode("scroll-view", {
  7051. "scroll-y": "",
  7052. class: "ano-sheet-list"
  7053. }, [
  7054. (vue.openBlock(true), vue.createElementBlock(
  7055. vue.Fragment,
  7056. null,
  7057. vue.renderList($data.anomalyTypes, (type, idx) => {
  7058. return vue.openBlock(), vue.createElementBlock("view", {
  7059. class: "ano-sheet-item",
  7060. key: idx,
  7061. onClick: ($event) => $options.selectType(type)
  7062. }, [
  7063. vue.createElementVNode(
  7064. "text",
  7065. {
  7066. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7067. },
  7068. vue.toDisplayString(type.label),
  7069. 3
  7070. /* TEXT, CLASS */
  7071. ),
  7072. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7073. key: 0,
  7074. class: "ano-check-icon",
  7075. src: _imports_0$2
  7076. })) : vue.createCommentVNode("v-if", true)
  7077. ], 8, ["onClick"]);
  7078. }),
  7079. 128
  7080. /* KEYED_FRAGMENT */
  7081. ))
  7082. ]),
  7083. vue.createElementVNode("view", {
  7084. class: "ano-sheet-cancel",
  7085. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7086. }, "取消")
  7087. ])
  7088. ])) : vue.createCommentVNode("v-if", true)
  7089. ]);
  7090. }
  7091. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7092. const _sfc_main$o = {
  7093. data() {
  7094. return {
  7095. tabs: ["全部", "已完成", "已拒绝"],
  7096. activeTab: 0,
  7097. orders: [
  7098. {
  7099. orderType: 1,
  7100. typeName: "接送",
  7101. typeIcon: "/static/icons/car.svg",
  7102. status: "完成",
  7103. finishTime: "2026/02/03 14:30",
  7104. serviceTime: "2026/02/10 10:00",
  7105. petName: "哈士奇宝宝",
  7106. petBreed: "哈士奇",
  7107. petAvatar: "/static/dog.png",
  7108. price: "20.00",
  7109. startName: "武汉大学宠物店",
  7110. startAddr: "武汉市洪山区珞喻路458号",
  7111. endName: "张** 189****8451",
  7112. endAddr: "武汉市武昌区新区大道凤凰广场A座",
  7113. serviceNote: ""
  7114. },
  7115. {
  7116. orderType: 2,
  7117. typeName: "喂遛",
  7118. typeIcon: "/static/icons/walk.svg",
  7119. status: "完成",
  7120. finishTime: "2026/02/03 15:00",
  7121. serviceTime: "2026/02/11 14:00",
  7122. petName: "金毛",
  7123. petBreed: "金毛寻回犬",
  7124. petAvatar: "/static/dog.png",
  7125. price: "35.00",
  7126. startName: "",
  7127. startAddr: "",
  7128. endName: "王女士 138****1234",
  7129. endAddr: "武汉市江汉区泛海国际居住区",
  7130. serviceNote: "需自带牵引绳,遛弯30分钟。"
  7131. },
  7132. {
  7133. orderType: 3,
  7134. typeName: "洗护",
  7135. typeIcon: "/static/icons/wash.svg",
  7136. status: "拒绝",
  7137. finishTime: "2026/02/03 09:30",
  7138. serviceTime: "2026/02/12 09:30",
  7139. petName: "Mimi",
  7140. petBreed: "布偶猫",
  7141. petAvatar: "/static/dog.png",
  7142. price: "50.00",
  7143. startName: "",
  7144. startAddr: "",
  7145. endName: "赵先生 159****9876",
  7146. endAddr: "武汉市汉阳区钟家村",
  7147. serviceNote: "上门洗澡,剪指甲。"
  7148. }
  7149. ]
  7150. };
  7151. },
  7152. computed: {
  7153. filteredOrders() {
  7154. if (this.activeTab === 0)
  7155. return this.orders;
  7156. if (this.activeTab === 1)
  7157. return this.orders.filter((o) => o.status === "完成");
  7158. return this.orders.filter((o) => o.status === "拒绝");
  7159. }
  7160. },
  7161. methods: {
  7162. switchTab(idx) {
  7163. this.activeTab = idx;
  7164. }
  7165. }
  7166. };
  7167. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7168. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7169. vue.createElementVNode("view", { class: "stats-banner" }, [
  7170. vue.createElementVNode("view", { class: "banner-item" }, [
  7171. vue.createElementVNode("text", { class: "banner-num" }, "2546"),
  7172. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7173. ]),
  7174. vue.createElementVNode("view", { class: "banner-item" }, [
  7175. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7176. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7177. ]),
  7178. vue.createElementVNode("view", { class: "banner-item" }, [
  7179. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7180. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7181. ]),
  7182. vue.createElementVNode("view", { class: "banner-item" }, [
  7183. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7184. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7185. ]),
  7186. vue.createElementVNode("view", { class: "banner-item" }, [
  7187. vue.createElementVNode("text", { class: "banner-num" }, [
  7188. vue.createTextVNode("158"),
  7189. vue.createElementVNode("text", { class: "banner-unit" }, "天")
  7190. ]),
  7191. vue.createElementVNode("text", { class: "banner-label" }, "服务时长")
  7192. ])
  7193. ]),
  7194. vue.createElementVNode("view", { class: "tab-bar" }, [
  7195. (vue.openBlock(true), vue.createElementBlock(
  7196. vue.Fragment,
  7197. null,
  7198. vue.renderList($data.tabs, (tab, idx) => {
  7199. return vue.openBlock(), vue.createElementBlock("view", {
  7200. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7201. key: idx,
  7202. onClick: ($event) => $options.switchTab(idx)
  7203. }, [
  7204. vue.createElementVNode(
  7205. "text",
  7206. null,
  7207. vue.toDisplayString(tab),
  7208. 1
  7209. /* TEXT */
  7210. ),
  7211. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7212. key: 0,
  7213. class: "tab-line"
  7214. })) : vue.createCommentVNode("v-if", true)
  7215. ], 10, ["onClick"]);
  7216. }),
  7217. 128
  7218. /* KEYED_FRAGMENT */
  7219. ))
  7220. ]),
  7221. vue.createElementVNode("scroll-view", {
  7222. "scroll-y": "",
  7223. class: "order-scroll"
  7224. }, [
  7225. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7226. (vue.openBlock(true), vue.createElementBlock(
  7227. vue.Fragment,
  7228. null,
  7229. vue.renderList($options.filteredOrders, (order, idx) => {
  7230. return vue.openBlock(), vue.createElementBlock("view", {
  7231. class: "order-card",
  7232. key: idx
  7233. }, [
  7234. vue.createElementVNode("view", { class: "card-header" }, [
  7235. vue.createElementVNode("view", { class: "type-badge" }, [
  7236. vue.createElementVNode("image", {
  7237. class: "type-icon",
  7238. src: order.typeIcon
  7239. }, null, 8, ["src"]),
  7240. vue.createElementVNode(
  7241. "text",
  7242. { class: "type-text" },
  7243. vue.toDisplayString(order.typeName),
  7244. 1
  7245. /* TEXT */
  7246. )
  7247. ]),
  7248. vue.createElementVNode(
  7249. "text",
  7250. {
  7251. class: vue.normalizeClass(["status-text", order.status === "完成" ? "green" : "red"])
  7252. },
  7253. vue.toDisplayString(order.status === "完成" ? "完成:" : "拒绝:") + vue.toDisplayString(order.finishTime),
  7254. 3
  7255. /* TEXT, CLASS */
  7256. )
  7257. ]),
  7258. vue.createElementVNode(
  7259. "text",
  7260. { class: "service-time" },
  7261. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7262. 1
  7263. /* TEXT */
  7264. ),
  7265. vue.createElementVNode("view", { class: "pet-card" }, [
  7266. vue.createElementVNode("image", {
  7267. class: "pet-avatar",
  7268. src: order.petAvatar,
  7269. mode: "aspectFill"
  7270. }, null, 8, ["src"]),
  7271. vue.createElementVNode("view", { class: "pet-info" }, [
  7272. vue.createElementVNode(
  7273. "text",
  7274. { class: "pet-name" },
  7275. vue.toDisplayString(order.petName),
  7276. 1
  7277. /* TEXT */
  7278. ),
  7279. vue.createElementVNode(
  7280. "text",
  7281. { class: "pet-breed" },
  7282. "品种: " + vue.toDisplayString(order.petBreed),
  7283. 1
  7284. /* TEXT */
  7285. )
  7286. ]),
  7287. vue.createElementVNode(
  7288. "text",
  7289. { class: "pet-price" },
  7290. "¥" + vue.toDisplayString(order.price),
  7291. 1
  7292. /* TEXT */
  7293. )
  7294. ]),
  7295. vue.createElementVNode("view", { class: "route-info" }, [
  7296. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7297. vue.Fragment,
  7298. { key: 0 },
  7299. [
  7300. vue.createElementVNode("view", { class: "route-item" }, [
  7301. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7302. vue.createElementVNode("view", { class: "route-connector" }),
  7303. vue.createElementVNode("view", { class: "address-box" }, [
  7304. vue.createElementVNode(
  7305. "text",
  7306. { class: "addr-title" },
  7307. vue.toDisplayString(order.startName),
  7308. 1
  7309. /* TEXT */
  7310. ),
  7311. vue.createElementVNode(
  7312. "text",
  7313. { class: "addr-desc" },
  7314. vue.toDisplayString(order.startAddr),
  7315. 1
  7316. /* TEXT */
  7317. )
  7318. ])
  7319. ]),
  7320. vue.createElementVNode("view", { class: "route-item" }, [
  7321. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7322. vue.createElementVNode("view", { class: "address-box" }, [
  7323. vue.createElementVNode(
  7324. "text",
  7325. { class: "addr-title" },
  7326. vue.toDisplayString(order.endName),
  7327. 1
  7328. /* TEXT */
  7329. ),
  7330. vue.createElementVNode(
  7331. "text",
  7332. { class: "addr-desc" },
  7333. vue.toDisplayString(order.endAddr),
  7334. 1
  7335. /* TEXT */
  7336. )
  7337. ])
  7338. ])
  7339. ],
  7340. 64
  7341. /* STABLE_FRAGMENT */
  7342. )) : (vue.openBlock(), vue.createElementBlock(
  7343. vue.Fragment,
  7344. { key: 1 },
  7345. [
  7346. vue.createElementVNode("view", { class: "route-item" }, [
  7347. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7348. vue.createElementVNode("view", { class: "address-box" }, [
  7349. vue.createElementVNode(
  7350. "text",
  7351. { class: "addr-title" },
  7352. vue.toDisplayString(order.endName),
  7353. 1
  7354. /* TEXT */
  7355. ),
  7356. vue.createElementVNode(
  7357. "text",
  7358. { class: "addr-desc" },
  7359. vue.toDisplayString(order.endAddr),
  7360. 1
  7361. /* TEXT */
  7362. )
  7363. ])
  7364. ]),
  7365. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7366. key: 0,
  7367. class: "service-note-row"
  7368. }, [
  7369. vue.createElementVNode(
  7370. "text",
  7371. { class: "service-note-text" },
  7372. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7373. 1
  7374. /* TEXT */
  7375. )
  7376. ])) : vue.createCommentVNode("v-if", true)
  7377. ],
  7378. 64
  7379. /* STABLE_FRAGMENT */
  7380. ))
  7381. ])
  7382. ]);
  7383. }),
  7384. 128
  7385. /* KEYED_FRAGMENT */
  7386. )),
  7387. $options.filteredOrders.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7388. key: 0,
  7389. class: "empty-state"
  7390. }, [
  7391. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7392. ])) : vue.createCommentVNode("v-if", true),
  7393. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7394. ])
  7395. ]);
  7396. }
  7397. 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"]]);
  7398. const _sfc_main$n = {
  7399. data() {
  7400. return {
  7401. tabs: ["全部", "奖励", "惩罚"],
  7402. activeTab: 0,
  7403. selectedYear: 2026,
  7404. selectedMonth: 2,
  7405. // 月份选择器状态
  7406. showMonthPicker: false,
  7407. pickerYear: 2026,
  7408. pickerMonth: 2,
  7409. years: [2021, 2022, 2023, 2024, 2025, 2026],
  7410. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7411. yearScrollTop: 0,
  7412. monthScrollTop: 0,
  7413. // 奖惩记录列表
  7414. records: [
  7415. { date: "09-01", title: "单量奖励", desc: "超140单", amount: 560, status: "待入账", statusClass: "pending", type: "reward" },
  7416. { date: "08-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" },
  7417. { date: "09-02", title: "超时扣款", desc: "订单#T982 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7418. { date: "09-05", title: "高温补贴", desc: "8月份高温天气补贴", amount: 300, status: "已入账", statusClass: "credited", type: "reward" }
  7419. ]
  7420. };
  7421. },
  7422. computed: {
  7423. filteredList() {
  7424. if (this.activeTab === 0)
  7425. return this.records;
  7426. if (this.activeTab === 1)
  7427. return this.records.filter((r) => r.type === "reward");
  7428. return this.records.filter((r) => r.type === "penalty");
  7429. }
  7430. },
  7431. methods: {
  7432. switchTab(idx) {
  7433. this.activeTab = idx;
  7434. },
  7435. openMonthPicker() {
  7436. this.pickerYear = this.selectedYear;
  7437. this.pickerMonth = this.selectedMonth;
  7438. this.showMonthPicker = true;
  7439. },
  7440. closeMonthPicker() {
  7441. this.showMonthPicker = false;
  7442. },
  7443. confirmMonthPicker() {
  7444. this.selectedYear = this.pickerYear;
  7445. this.selectedMonth = this.pickerMonth;
  7446. this.closeMonthPicker();
  7447. },
  7448. goToAll() {
  7449. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7450. }
  7451. }
  7452. };
  7453. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7454. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7455. vue.createElementVNode("view", { class: "top-banner" }, [
  7456. vue.createElementVNode("view", {
  7457. class: "month-btn",
  7458. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7459. }, [
  7460. vue.createElementVNode(
  7461. "text",
  7462. { class: "month-text" },
  7463. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7464. 1
  7465. /* TEXT */
  7466. )
  7467. ]),
  7468. vue.createElementVNode("view", { class: "stats-grid" }, [
  7469. vue.createElementVNode("view", { class: "stats-cell" }, [
  7470. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7471. vue.createElementVNode("text", { class: "stats-num" }, [
  7472. vue.createTextVNode("3"),
  7473. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7474. ]),
  7475. vue.createElementVNode("view", { class: "stats-divider" }),
  7476. vue.createElementVNode("text", { class: "stats-sub" }, "累计 1258单")
  7477. ]),
  7478. vue.createElementVNode("view", { class: "stats-cell" }, [
  7479. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7480. vue.createElementVNode("text", { class: "stats-num" }, [
  7481. vue.createTextVNode("1"),
  7482. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7483. ]),
  7484. vue.createElementVNode("view", { class: "stats-divider" }),
  7485. vue.createElementVNode("text", { class: "stats-sub" }, "累计 12单")
  7486. ]),
  7487. vue.createElementVNode("view", { class: "stats-cell" }, [
  7488. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7489. vue.createElementVNode("text", { class: "stats-num reward-num" }, "2910.00"),
  7490. vue.createElementVNode("view", { class: "stats-divider" }),
  7491. vue.createElementVNode("text", { class: "stats-sub" }, "累计 45800.00")
  7492. ]),
  7493. vue.createElementVNode("view", { class: "stats-cell" }, [
  7494. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7495. vue.createElementVNode("text", { class: "stats-num penalty-num" }, "-15.00"),
  7496. vue.createElementVNode("view", { class: "stats-divider" }),
  7497. vue.createElementVNode("text", { class: "stats-sub" }, "累计 350.00")
  7498. ])
  7499. ])
  7500. ]),
  7501. vue.createElementVNode("view", { class: "list-header" }, [
  7502. vue.createElementVNode("view", { class: "tab-bar" }, [
  7503. (vue.openBlock(true), vue.createElementBlock(
  7504. vue.Fragment,
  7505. null,
  7506. vue.renderList($data.tabs, (tab, idx) => {
  7507. return vue.openBlock(), vue.createElementBlock("view", {
  7508. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7509. key: idx,
  7510. onClick: ($event) => $options.switchTab(idx)
  7511. }, [
  7512. vue.createElementVNode(
  7513. "text",
  7514. null,
  7515. vue.toDisplayString(tab),
  7516. 1
  7517. /* TEXT */
  7518. ),
  7519. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7520. key: 0,
  7521. class: "tab-line"
  7522. })) : vue.createCommentVNode("v-if", true)
  7523. ], 10, ["onClick"]);
  7524. }),
  7525. 128
  7526. /* KEYED_FRAGMENT */
  7527. ))
  7528. ]),
  7529. vue.createElementVNode("view", {
  7530. class: "view-all-btn",
  7531. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7532. }, [
  7533. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7534. ])
  7535. ]),
  7536. vue.createElementVNode("view", { class: "record-list" }, [
  7537. (vue.openBlock(true), vue.createElementBlock(
  7538. vue.Fragment,
  7539. null,
  7540. vue.renderList($options.filteredList, (item, idx) => {
  7541. return vue.openBlock(), vue.createElementBlock("view", {
  7542. class: "record-item",
  7543. key: idx
  7544. }, [
  7545. vue.createElementVNode(
  7546. "view",
  7547. {
  7548. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7549. },
  7550. [
  7551. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7552. ],
  7553. 2
  7554. /* CLASS */
  7555. ),
  7556. vue.createElementVNode("view", { class: "ri-content" }, [
  7557. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7558. vue.createElementVNode(
  7559. "text",
  7560. { class: "ri-date" },
  7561. vue.toDisplayString(item.date),
  7562. 1
  7563. /* TEXT */
  7564. ),
  7565. vue.createElementVNode(
  7566. "text",
  7567. { class: "ri-title" },
  7568. vue.toDisplayString(item.title),
  7569. 1
  7570. /* TEXT */
  7571. )
  7572. ]),
  7573. vue.createElementVNode(
  7574. "text",
  7575. { class: "ri-desc" },
  7576. vue.toDisplayString(item.desc),
  7577. 1
  7578. /* TEXT */
  7579. )
  7580. ]),
  7581. vue.createElementVNode("view", { class: "ri-right" }, [
  7582. vue.createElementVNode(
  7583. "text",
  7584. {
  7585. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7586. },
  7587. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7588. 3
  7589. /* TEXT, CLASS */
  7590. ),
  7591. vue.createElementVNode(
  7592. "text",
  7593. {
  7594. class: vue.normalizeClass(["ri-status", item.statusClass])
  7595. },
  7596. vue.toDisplayString(item.status),
  7597. 3
  7598. /* TEXT, CLASS */
  7599. )
  7600. ])
  7601. ]);
  7602. }),
  7603. 128
  7604. /* KEYED_FRAGMENT */
  7605. )),
  7606. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  7607. ]),
  7608. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  7609. key: 0,
  7610. class: "picker-mask",
  7611. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7612. }, [
  7613. vue.createElementVNode("view", {
  7614. class: "picker-sheet",
  7615. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  7616. }, ["stop"]))
  7617. }, [
  7618. vue.createElementVNode("view", { class: "picker-header" }, [
  7619. vue.createElementVNode("text", {
  7620. class: "picker-cancel",
  7621. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7622. }, "取消"),
  7623. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  7624. vue.createElementVNode("text", {
  7625. class: "picker-confirm",
  7626. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  7627. }, "确定")
  7628. ]),
  7629. vue.createElementVNode("view", { class: "picker-body" }, [
  7630. vue.createElementVNode("scroll-view", {
  7631. "scroll-y": "",
  7632. class: "picker-column",
  7633. "scroll-top": $data.yearScrollTop,
  7634. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  7635. }, [
  7636. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7637. (vue.openBlock(true), vue.createElementBlock(
  7638. vue.Fragment,
  7639. null,
  7640. vue.renderList($data.years, (year) => {
  7641. return vue.openBlock(), vue.createElementBlock("view", {
  7642. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  7643. key: year,
  7644. onClick: ($event) => $data.pickerYear = year
  7645. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  7646. }),
  7647. 128
  7648. /* KEYED_FRAGMENT */
  7649. )),
  7650. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7651. ], 40, ["scroll-top"]),
  7652. vue.createElementVNode("view", { class: "picker-highlight" }),
  7653. vue.createElementVNode("scroll-view", {
  7654. "scroll-y": "",
  7655. class: "picker-column",
  7656. "scroll-top": $data.monthScrollTop,
  7657. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  7658. }, [
  7659. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7660. (vue.openBlock(true), vue.createElementBlock(
  7661. vue.Fragment,
  7662. null,
  7663. vue.renderList($data.months, (month) => {
  7664. return vue.openBlock(), vue.createElementBlock("view", {
  7665. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  7666. key: month,
  7667. onClick: ($event) => $data.pickerMonth = month
  7668. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  7669. }),
  7670. 128
  7671. /* KEYED_FRAGMENT */
  7672. )),
  7673. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7674. ], 40, ["scroll-top"])
  7675. ])
  7676. ])
  7677. ])) : vue.createCommentVNode("v-if", true)
  7678. ]);
  7679. }
  7680. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  7681. const _sfc_main$m = {
  7682. data() {
  7683. return {
  7684. tabs: ["全部", "奖励", "惩罚"],
  7685. activeTab: 0,
  7686. // 所有完整记录(按月分组)
  7687. allGroups: [
  7688. {
  7689. month: 9,
  7690. credited: 30,
  7691. pending: 0,
  7692. items: [
  7693. { date: "09-24", title: "高温补贴", desc: "9月份高温天气补贴", amount: 30, status: "已入账", statusClass: "credited", type: "reward" }
  7694. ]
  7695. },
  7696. {
  7697. month: 8,
  7698. credited: 2610,
  7699. pending: 0,
  7700. items: [
  7701. { date: "08-01", title: "单量奖励", desc: "超140单", amount: 560, status: "已入账", statusClass: "credited", type: "reward" },
  7702. { date: "07-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" }
  7703. ]
  7704. },
  7705. {
  7706. month: 7,
  7707. credited: 0,
  7708. pending: 0,
  7709. items: [
  7710. { date: "07-15", title: "超时扣款", desc: "订单#T98211 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7711. { date: "07-20", title: "客诉扣款", desc: "订单#T98222 餐品遗漏", amount: -50, status: "已扣款", statusClass: "deducted", type: "penalty" }
  7712. ]
  7713. }
  7714. ]
  7715. };
  7716. },
  7717. computed: {
  7718. filteredGroups() {
  7719. if (this.activeTab === 0)
  7720. return this.allGroups;
  7721. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  7722. return this.allGroups.map((g) => ({
  7723. ...g,
  7724. items: g.items.filter((i) => i.type === typeKey)
  7725. })).filter((g) => g.items.length > 0);
  7726. }
  7727. },
  7728. methods: {
  7729. switchTab(idx) {
  7730. this.activeTab = idx;
  7731. }
  7732. }
  7733. };
  7734. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  7735. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7736. vue.createElementVNode("view", { class: "tab-bar" }, [
  7737. (vue.openBlock(true), vue.createElementBlock(
  7738. vue.Fragment,
  7739. null,
  7740. vue.renderList($data.tabs, (tab, idx) => {
  7741. return vue.openBlock(), vue.createElementBlock("view", {
  7742. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7743. key: idx,
  7744. onClick: ($event) => $options.switchTab(idx)
  7745. }, [
  7746. vue.createElementVNode(
  7747. "text",
  7748. null,
  7749. vue.toDisplayString(tab),
  7750. 1
  7751. /* TEXT */
  7752. ),
  7753. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7754. key: 0,
  7755. class: "tab-line"
  7756. })) : vue.createCommentVNode("v-if", true)
  7757. ], 10, ["onClick"]);
  7758. }),
  7759. 128
  7760. /* KEYED_FRAGMENT */
  7761. ))
  7762. ]),
  7763. vue.createElementVNode("scroll-view", {
  7764. "scroll-y": "",
  7765. class: "main-scroll"
  7766. }, [
  7767. (vue.openBlock(true), vue.createElementBlock(
  7768. vue.Fragment,
  7769. null,
  7770. vue.renderList($options.filteredGroups, (group, gIdx) => {
  7771. return vue.openBlock(), vue.createElementBlock("view", {
  7772. key: gIdx,
  7773. class: "month-group"
  7774. }, [
  7775. vue.createElementVNode("view", { class: "month-header" }, [
  7776. vue.createElementVNode(
  7777. "text",
  7778. { class: "month-title" },
  7779. vue.toDisplayString(group.month) + "月",
  7780. 1
  7781. /* TEXT */
  7782. ),
  7783. vue.createElementVNode("view", { class: "month-summary" }, [
  7784. vue.createElementVNode(
  7785. "text",
  7786. { class: "month-sum-text" },
  7787. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  7788. 1
  7789. /* TEXT */
  7790. ),
  7791. vue.createElementVNode(
  7792. "text",
  7793. { class: "month-sum-text" },
  7794. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  7795. 1
  7796. /* TEXT */
  7797. )
  7798. ])
  7799. ]),
  7800. (vue.openBlock(true), vue.createElementBlock(
  7801. vue.Fragment,
  7802. null,
  7803. vue.renderList(group.items, (item, rIdx) => {
  7804. return vue.openBlock(), vue.createElementBlock("view", {
  7805. class: "record-item",
  7806. key: rIdx
  7807. }, [
  7808. vue.createElementVNode(
  7809. "view",
  7810. {
  7811. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7812. },
  7813. [
  7814. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7815. ],
  7816. 2
  7817. /* CLASS */
  7818. ),
  7819. vue.createElementVNode("view", { class: "ri-content" }, [
  7820. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7821. vue.createElementVNode(
  7822. "text",
  7823. { class: "ri-date" },
  7824. vue.toDisplayString(item.date),
  7825. 1
  7826. /* TEXT */
  7827. ),
  7828. vue.createElementVNode(
  7829. "text",
  7830. { class: "ri-title" },
  7831. vue.toDisplayString(item.title),
  7832. 1
  7833. /* TEXT */
  7834. )
  7835. ]),
  7836. vue.createElementVNode(
  7837. "text",
  7838. { class: "ri-desc" },
  7839. vue.toDisplayString(item.desc),
  7840. 1
  7841. /* TEXT */
  7842. )
  7843. ]),
  7844. vue.createElementVNode("view", { class: "ri-right" }, [
  7845. vue.createElementVNode(
  7846. "text",
  7847. {
  7848. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7849. },
  7850. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7851. 3
  7852. /* TEXT, CLASS */
  7853. ),
  7854. vue.createElementVNode(
  7855. "text",
  7856. {
  7857. class: vue.normalizeClass(["ri-status", item.statusClass])
  7858. },
  7859. vue.toDisplayString(item.status),
  7860. 3
  7861. /* TEXT, CLASS */
  7862. )
  7863. ])
  7864. ]);
  7865. }),
  7866. 128
  7867. /* KEYED_FRAGMENT */
  7868. ))
  7869. ]);
  7870. }),
  7871. 128
  7872. /* KEYED_FRAGMENT */
  7873. )),
  7874. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7875. ])
  7876. ]);
  7877. }
  7878. 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"]]);
  7879. const logic = {
  7880. components: {
  7881. customTabbar
  7882. },
  7883. data() {
  7884. return {
  7885. showServicePopup: false,
  7886. showLogoutPopup: false,
  7887. profile: null,
  7888. profileLoading: false
  7889. };
  7890. },
  7891. onShow() {
  7892. uni.hideTabBar();
  7893. if (isLoggedIn()) {
  7894. this.loadProfile();
  7895. }
  7896. },
  7897. methods: {
  7898. async loadProfile() {
  7899. if (this.profileLoading)
  7900. return;
  7901. this.profileLoading = true;
  7902. try {
  7903. const res = await getMyProfile();
  7904. this.profile = res.data || null;
  7905. } catch (err) {
  7906. formatAppLog("error", "at pages/mine/logic.js:32", "获取个人信息失败:", err);
  7907. } finally {
  7908. this.profileLoading = false;
  7909. }
  7910. },
  7911. navToSettings() {
  7912. uni.navigateTo({
  7913. url: "/pages/mine/settings/index"
  7914. });
  7915. },
  7916. navToProfile() {
  7917. uni.navigateTo({
  7918. url: "/pages/mine/settings/profile/index"
  7919. });
  7920. },
  7921. navToLevel() {
  7922. uni.navigateTo({
  7923. url: "/pages/mine/level/index"
  7924. });
  7925. },
  7926. navToNotification() {
  7927. uni.navigateTo({
  7928. url: "/pages/mine/message/index"
  7929. });
  7930. },
  7931. navToWallet() {
  7932. uni.navigateTo({
  7933. url: "/pages/mine/wallet/index"
  7934. });
  7935. },
  7936. navToPoints() {
  7937. uni.navigateTo({
  7938. url: "/pages/mine/points/index"
  7939. });
  7940. },
  7941. navToOrderStats() {
  7942. uni.navigateTo({
  7943. url: "/pages/mine/order-stats"
  7944. });
  7945. },
  7946. navToRewards() {
  7947. uni.navigateTo({
  7948. url: "/pages/mine/rewards"
  7949. });
  7950. },
  7951. openServicePopup() {
  7952. this.showServicePopup = true;
  7953. },
  7954. closeServicePopup() {
  7955. this.showServicePopup = false;
  7956. },
  7957. previewQRCode() {
  7958. uni.previewImage({
  7959. urls: ["/static/logo.png"]
  7960. });
  7961. },
  7962. openOnlineService() {
  7963. uni.showToast({
  7964. title: "正在跳转企业微信客服...",
  7965. icon: "none"
  7966. });
  7967. },
  7968. callServicePhone() {
  7969. uni.makePhoneCall({
  7970. phoneNumber: "400-123-4567"
  7971. });
  7972. },
  7973. logout() {
  7974. this.showLogoutPopup = true;
  7975. },
  7976. cancelLogout() {
  7977. this.showLogoutPopup = false;
  7978. },
  7979. async confirmLogout() {
  7980. this.showLogoutPopup = false;
  7981. try {
  7982. await logout();
  7983. } catch (e) {
  7984. }
  7985. clearAuth();
  7986. uni.reLaunch({
  7987. url: "/pages/login/login"
  7988. });
  7989. }
  7990. }
  7991. };
  7992. const _imports_0$1 = "/static/icons/motorbike.svg";
  7993. const _imports_1$5 = "/static/icons/location.svg";
  7994. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  7995. const _imports_3$1 = "/static/icons/calendar.svg";
  7996. const _imports_4 = "/static/icons/settings.svg";
  7997. const _imports_1$4 = "/static/icons/crown.svg";
  7998. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  7999. const _imports_3 = "/static/icons/chevron_right.svg";
  8000. const _imports_8 = "/static/icons/bell_linear.svg";
  8001. const _imports_9 = "/static/icons/money_linear.svg";
  8002. const _imports_10 = "/static/icons/headset_linear.svg";
  8003. const _imports_11 = "/static/icons/close_gray.svg";
  8004. const _imports_13 = "/static/icons/headset_green.svg";
  8005. const _imports_15 = "/static/icons/phone_green.svg";
  8006. const _sfc_main$l = {
  8007. ...logic
  8008. };
  8009. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  8010. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
  8011. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8012. return vue.openBlock(), vue.createElementBlock(
  8013. vue.Fragment,
  8014. null,
  8015. [
  8016. vue.createElementVNode("view", { class: "container" }, [
  8017. vue.createElementVNode("view", { class: "nav-bg" }, [
  8018. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8019. vue.createElementVNode("view", { class: "bg-circle-2" })
  8020. ]),
  8021. vue.createElementVNode("view", { class: "header-section" }, [
  8022. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8023. vue.createElementVNode("view", {
  8024. class: "user-card",
  8025. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8026. }, [
  8027. vue.createElementVNode("image", {
  8028. class: "avatar",
  8029. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8030. mode: "aspectFill"
  8031. }, null, 8, ["src"]),
  8032. vue.createElementVNode("view", { class: "info-content" }, [
  8033. vue.createElementVNode("view", { class: "name-row" }, [
  8034. vue.createElementVNode(
  8035. "text",
  8036. { class: "name" },
  8037. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8038. 1
  8039. /* TEXT */
  8040. ),
  8041. vue.createElementVNode("view", { class: "tags" }, [
  8042. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8043. key: 0,
  8044. class: "tag green"
  8045. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8046. key: 1,
  8047. class: "tag green"
  8048. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8049. key: 2,
  8050. class: "tag",
  8051. style: { "background": "#eee", "color": "#999" }
  8052. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8053. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8054. key: 3,
  8055. class: "tag blue"
  8056. }, "全职")) : vue.createCommentVNode("v-if", true),
  8057. vue.createElementVNode("image", {
  8058. class: "bike-icon",
  8059. src: _imports_0$1
  8060. })
  8061. ])
  8062. ]),
  8063. vue.createElementVNode("view", { class: "detail-row" }, [
  8064. vue.createElementVNode("image", {
  8065. class: "small-icon",
  8066. src: _imports_1$5
  8067. }),
  8068. vue.createElementVNode(
  8069. "text",
  8070. null,
  8071. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8072. 1
  8073. /* TEXT */
  8074. ),
  8075. vue.createElementVNode("image", {
  8076. class: "arrow-icon-small",
  8077. src: _imports_0
  8078. })
  8079. ]),
  8080. vue.createElementVNode("view", { class: "detail-row" }, [
  8081. vue.createElementVNode("image", {
  8082. class: "small-icon",
  8083. src: _imports_3$1
  8084. }),
  8085. vue.createElementVNode(
  8086. "text",
  8087. null,
  8088. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8089. 1
  8090. /* TEXT */
  8091. )
  8092. ])
  8093. ]),
  8094. vue.createElementVNode("image", {
  8095. class: "settings-icon",
  8096. src: _imports_4,
  8097. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8098. })
  8099. ]),
  8100. vue.createElementVNode("view", { class: "vip-card" }, [
  8101. vue.createElementVNode("view", { class: "vip-left" }, [
  8102. vue.createElementVNode("image", {
  8103. class: "vip-icon",
  8104. src: _imports_1$4
  8105. }),
  8106. vue.createElementVNode("view", { class: "vip-text" }, [
  8107. vue.createElementVNode(
  8108. "text",
  8109. { class: "vip-title" },
  8110. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.levelName) || "普通履约者"),
  8111. 1
  8112. /* TEXT */
  8113. ),
  8114. vue.createElementVNode(
  8115. "text",
  8116. { class: "vip-desc" },
  8117. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.levelDesc) || "完成更多订单即可升级"),
  8118. 1
  8119. /* TEXT */
  8120. )
  8121. ])
  8122. ]),
  8123. vue.createElementVNode("view", {
  8124. class: "vip-btn",
  8125. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8126. }, [
  8127. vue.createElementVNode("text", null, "查看权益"),
  8128. vue.createElementVNode("image", {
  8129. class: "arrow-icon-small",
  8130. src: _imports_6
  8131. })
  8132. ])
  8133. ])
  8134. ]),
  8135. vue.createElementVNode("view", { class: "stats-panel" }, [
  8136. vue.createElementVNode("view", {
  8137. class: "stat-item",
  8138. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8139. }, [
  8140. vue.createElementVNode("view", { class: "stat-header" }, [
  8141. vue.createElementVNode("view", { class: "red-bar" }),
  8142. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8143. vue.createElementVNode("image", {
  8144. class: "arrow-icon",
  8145. src: _imports_3
  8146. })
  8147. ]),
  8148. vue.createElementVNode("view", { class: "stat-value" }, [
  8149. vue.createElementVNode(
  8150. "text",
  8151. { class: "num" },
  8152. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8153. 1
  8154. /* TEXT */
  8155. ),
  8156. vue.createElementVNode("text", { class: "unit" }, "元")
  8157. ]),
  8158. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8159. ]),
  8160. vue.createElementVNode("view", { class: "divider" }),
  8161. vue.createElementVNode("view", {
  8162. class: "stat-item",
  8163. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8164. }, [
  8165. vue.createElementVNode("view", { class: "stat-header" }, [
  8166. vue.createElementVNode("view", { class: "green-bar" }),
  8167. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8168. vue.createElementVNode("image", {
  8169. class: "arrow-icon",
  8170. src: _imports_3
  8171. })
  8172. ]),
  8173. vue.createElementVNode("view", { class: "stat-value" }, [
  8174. vue.createElementVNode(
  8175. "text",
  8176. { class: "num" },
  8177. vue.toDisplayString(((_m = _ctx.profile) == null ? void 0 : _m.orderCount) || 0),
  8178. 1
  8179. /* TEXT */
  8180. ),
  8181. vue.createElementVNode("text", { class: "unit" }, "单")
  8182. ]),
  8183. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8184. ]),
  8185. vue.createElementVNode("view", { class: "divider" }),
  8186. vue.createElementVNode("view", {
  8187. class: "stat-item",
  8188. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8189. }, [
  8190. vue.createElementVNode("view", { class: "stat-header" }, [
  8191. vue.createElementVNode("view", { class: "orange-bar" }),
  8192. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8193. vue.createElementVNode("image", {
  8194. class: "arrow-icon",
  8195. src: _imports_3
  8196. })
  8197. ]),
  8198. vue.createElementVNode("view", { class: "stat-value" }, [
  8199. vue.createElementVNode(
  8200. "text",
  8201. { class: "num" },
  8202. vue.toDisplayString(((_n = _ctx.profile) == null ? void 0 : _n.points) || 0),
  8203. 1
  8204. /* TEXT */
  8205. ),
  8206. vue.createElementVNode("text", { class: "unit" }, "分")
  8207. ]),
  8208. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8209. ])
  8210. ]),
  8211. vue.createElementVNode("view", { class: "menu-list" }, [
  8212. vue.createElementVNode("view", {
  8213. class: "menu-item",
  8214. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToNotification && _ctx.navToNotification(...args))
  8215. }, [
  8216. vue.createElementVNode("image", {
  8217. class: "menu-icon",
  8218. src: _imports_8
  8219. }),
  8220. vue.createElementVNode("text", { class: "menu-text" }, "消息中心"),
  8221. vue.createElementVNode("view", { class: "menu-right" }, [
  8222. vue.createElementVNode("view", { class: "red-dot" }),
  8223. vue.createElementVNode("image", {
  8224. class: "arrow-icon",
  8225. src: _imports_3
  8226. })
  8227. ])
  8228. ]),
  8229. vue.createElementVNode("view", {
  8230. class: "menu-item",
  8231. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8232. }, [
  8233. vue.createElementVNode("image", {
  8234. class: "menu-icon",
  8235. src: _imports_9
  8236. }),
  8237. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8238. vue.createElementVNode("image", {
  8239. class: "arrow-icon",
  8240. src: _imports_3
  8241. })
  8242. ]),
  8243. vue.createElementVNode("view", {
  8244. class: "menu-item",
  8245. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8246. }, [
  8247. vue.createElementVNode("image", {
  8248. class: "menu-icon",
  8249. src: _imports_10
  8250. }),
  8251. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8252. vue.createElementVNode("image", {
  8253. class: "arrow-icon",
  8254. src: _imports_3
  8255. })
  8256. ])
  8257. ]),
  8258. vue.createElementVNode("view", {
  8259. class: "logout-btn",
  8260. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.logout && _ctx.logout(...args))
  8261. }, "退出登录"),
  8262. vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
  8263. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8264. key: 0,
  8265. class: "service-popup-mask",
  8266. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8267. }, [
  8268. vue.createElementVNode("view", {
  8269. class: "service-popup",
  8270. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  8271. }, ["stop"]))
  8272. }, [
  8273. vue.createElementVNode("view", { class: "service-header" }, [
  8274. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8275. vue.createElementVNode("image", {
  8276. class: "close-icon",
  8277. src: _imports_11,
  8278. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8279. })
  8280. ]),
  8281. vue.createElementVNode("view", { class: "qr-section" }, [
  8282. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8283. vue.createElementVNode("image", {
  8284. class: "qr-img",
  8285. src: _imports_1$8,
  8286. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8287. }),
  8288. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8289. ]),
  8290. vue.createElementVNode("view", { class: "service-list" }, [
  8291. vue.createElementVNode("view", {
  8292. class: "service-row",
  8293. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8294. }, [
  8295. vue.createElementVNode("image", {
  8296. class: "service-row-icon",
  8297. src: _imports_13
  8298. }),
  8299. vue.createElementVNode("view", { class: "service-info" }, [
  8300. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8301. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8302. ]),
  8303. vue.createElementVNode("image", {
  8304. class: "arrow-icon-small",
  8305. src: _imports_3
  8306. })
  8307. ]),
  8308. vue.createElementVNode("view", { class: "service-row" }, [
  8309. vue.createElementVNode("image", {
  8310. class: "service-row-icon",
  8311. src: _imports_14
  8312. }),
  8313. vue.createElementVNode("view", { class: "service-info" }, [
  8314. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8315. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8316. ]),
  8317. vue.createElementVNode("view", {
  8318. class: "call-btn",
  8319. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8320. }, [
  8321. vue.createElementVNode("image", {
  8322. class: "phone-icon-small",
  8323. src: _imports_15
  8324. }),
  8325. vue.createElementVNode("text", null, "拨打")
  8326. ])
  8327. ])
  8328. ])
  8329. ])
  8330. ])) : vue.createCommentVNode("v-if", true),
  8331. vue.createElementVNode(
  8332. "view",
  8333. {
  8334. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8335. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8336. onTouchmove: _cache[20] || (_cache[20] = vue.withModifiers(() => {
  8337. }, ["stop", "prevent"]))
  8338. },
  8339. [
  8340. vue.createElementVNode("view", {
  8341. class: "popup-modal",
  8342. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  8343. }, ["stop"]))
  8344. }, [
  8345. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8346. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8347. vue.createElementVNode("view", { class: "popup-actions" }, [
  8348. vue.createElementVNode("view", {
  8349. class: "popup-btn cancel",
  8350. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8351. }, "取消"),
  8352. vue.createElementVNode("view", {
  8353. class: "popup-btn confirm",
  8354. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8355. }, "确定")
  8356. ])
  8357. ])
  8358. ],
  8359. 34
  8360. /* CLASS, NEED_HYDRATION */
  8361. )
  8362. ]),
  8363. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8364. ],
  8365. 64
  8366. /* STABLE_FRAGMENT */
  8367. );
  8368. }
  8369. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8370. const _sfc_main$k = {
  8371. data() {
  8372. return {};
  8373. },
  8374. methods: {
  8375. navBack() {
  8376. uni.navigateBack({
  8377. delta: 1
  8378. });
  8379. },
  8380. navTo(type) {
  8381. let url = "";
  8382. switch (type) {
  8383. case "profile":
  8384. url = "/pages/mine/settings/profile/index";
  8385. break;
  8386. case "auth":
  8387. url = "/pages/mine/settings/auth/index";
  8388. break;
  8389. case "bank":
  8390. url = "/pages/mine/settings/bank/index";
  8391. break;
  8392. case "security":
  8393. url = "/pages/mine/settings/security/index";
  8394. break;
  8395. case "push":
  8396. url = "/pages/mine/settings/notification/index";
  8397. break;
  8398. case "about":
  8399. url = "/pages/mine/settings/about/index";
  8400. break;
  8401. default:
  8402. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8403. return;
  8404. }
  8405. uni.navigateTo({ url });
  8406. },
  8407. clearCache() {
  8408. uni.showToast({ title: "缓存已清理", icon: "none" });
  8409. }
  8410. }
  8411. };
  8412. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8413. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8414. vue.createElementVNode("view", { class: "custom-header" }, [
  8415. vue.createElementVNode("view", {
  8416. class: "header-left",
  8417. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8418. }, [
  8419. vue.createElementVNode("image", {
  8420. class: "back-icon",
  8421. src: _imports_0,
  8422. style: { "transform": "rotate(180deg)" }
  8423. })
  8424. ]),
  8425. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8426. vue.createElementVNode("view", { class: "header-right" })
  8427. ]),
  8428. vue.createElementVNode("view", { class: "header-placeholder" }),
  8429. vue.createElementVNode("view", { class: "group-card" }, [
  8430. vue.createElementVNode("view", {
  8431. class: "list-item",
  8432. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8433. }, [
  8434. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8435. vue.createElementVNode("image", {
  8436. class: "arrow-icon",
  8437. src: _imports_3
  8438. })
  8439. ]),
  8440. vue.createElementVNode("view", {
  8441. class: "list-item",
  8442. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8443. }, [
  8444. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8445. vue.createElementVNode("image", {
  8446. class: "arrow-icon",
  8447. src: _imports_3
  8448. })
  8449. ]),
  8450. vue.createElementVNode("view", {
  8451. class: "list-item",
  8452. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8453. }, [
  8454. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8455. vue.createElementVNode("view", { class: "item-right" }, [
  8456. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8457. vue.createElementVNode("image", {
  8458. class: "arrow-icon",
  8459. src: _imports_3
  8460. })
  8461. ])
  8462. ]),
  8463. vue.createElementVNode("view", {
  8464. class: "list-item no-border",
  8465. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8466. }, [
  8467. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8468. vue.createElementVNode("image", {
  8469. class: "arrow-icon",
  8470. src: _imports_3
  8471. })
  8472. ])
  8473. ]),
  8474. vue.createElementVNode("view", { class: "group-card" }, [
  8475. vue.createElementVNode("view", {
  8476. class: "list-item",
  8477. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8478. }, [
  8479. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8480. vue.createElementVNode("view", { class: "item-right" }, [
  8481. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8482. vue.createElementVNode("image", {
  8483. class: "arrow-icon",
  8484. src: _imports_3
  8485. })
  8486. ])
  8487. ]),
  8488. vue.createElementVNode("view", { class: "list-item" }, [
  8489. vue.createElementVNode("view", { class: "item-row-left" }, [
  8490. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8491. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8492. ]),
  8493. vue.createElementVNode("switch", {
  8494. checked: "",
  8495. color: "#FF5722",
  8496. style: { "transform": "scale(0.8)" }
  8497. })
  8498. ]),
  8499. vue.createElementVNode("view", {
  8500. class: "list-item",
  8501. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8502. }, [
  8503. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8504. vue.createElementVNode("view", { class: "item-right" }, [
  8505. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8506. vue.createElementVNode("image", {
  8507. class: "arrow-icon",
  8508. src: _imports_3
  8509. })
  8510. ])
  8511. ]),
  8512. vue.createElementVNode("view", {
  8513. class: "list-item no-border",
  8514. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8515. }, [
  8516. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8517. vue.createElementVNode("view", { class: "item-right" }, [
  8518. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8519. vue.createElementVNode("image", {
  8520. class: "arrow-icon",
  8521. src: _imports_3
  8522. })
  8523. ])
  8524. ])
  8525. ])
  8526. ]);
  8527. }
  8528. 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"]]);
  8529. const _sfc_main$j = {
  8530. data() {
  8531. return {
  8532. userInfo: {
  8533. name: "",
  8534. workType: "",
  8535. workStatus: "",
  8536. city: "",
  8537. avatar: "/static/touxiang.png",
  8538. stationName: ""
  8539. },
  8540. isStatusPickerShow: false,
  8541. isCityPickerShow: false,
  8542. // 城市级联选择器(与我要加入页面一致)
  8543. selectStep: 0,
  8544. selectedPathway: [],
  8545. currentCityList: [],
  8546. selectedCityId: null
  8547. };
  8548. },
  8549. onLoad() {
  8550. this.loadUserInfo();
  8551. uni.$on("updateName", (newName) => {
  8552. this.userInfo.name = newName;
  8553. });
  8554. },
  8555. onUnload() {
  8556. uni.$off("updateName");
  8557. },
  8558. methods: {
  8559. // 加载用户信息 @author steelwei
  8560. async loadUserInfo() {
  8561. uni.showLoading({ title: "加载中..." });
  8562. try {
  8563. const res = await getMyProfile();
  8564. if (res.code === 200) {
  8565. const data = res.data;
  8566. this.userInfo = {
  8567. name: data.realName || data.name,
  8568. workType: data.workType === "full_time" ? "全职" : "兼职",
  8569. workStatus: this.formatStatus(data.status),
  8570. city: data.cityName || "",
  8571. avatar: data.avatarUrl || "/static/touxiang.png",
  8572. stationName: data.stationName || "未分配站点"
  8573. };
  8574. } else {
  8575. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  8576. }
  8577. } catch (error) {
  8578. formatAppLog("error", "at pages/mine/settings/profile/index.vue:173", "加载用户信息失败:", error);
  8579. uni.showToast({ title: "网络错误", icon: "none" });
  8580. } finally {
  8581. uni.hideLoading();
  8582. }
  8583. },
  8584. // 格式化状态 @author steelwei
  8585. formatStatus(status) {
  8586. const statusMap = {
  8587. "busy": "接单中",
  8588. "resting": "休息中",
  8589. "disabled": "已禁用"
  8590. };
  8591. return statusMap[status] || status;
  8592. },
  8593. navBack() {
  8594. uni.navigateBack({ delta: 1 });
  8595. },
  8596. // 修改头像 @author steelwei
  8597. changeAvatar() {
  8598. uni.chooseImage({
  8599. count: 1,
  8600. success: async (res) => {
  8601. const tempFilePath = res.tempFilePaths[0];
  8602. uni.showLoading({ title: "上传中..." });
  8603. try {
  8604. const uploadRes = await uploadFile(tempFilePath);
  8605. if (uploadRes.code === 200) {
  8606. const { url, ossId } = uploadRes.data;
  8607. const result = await updateAvatar(ossId);
  8608. if (result.code === 200) {
  8609. this.userInfo.avatar = url;
  8610. uni.showToast({ title: "修改成功", icon: "success" });
  8611. } else {
  8612. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  8613. }
  8614. }
  8615. } catch (error) {
  8616. formatAppLog("error", "at pages/mine/settings/profile/index.vue:218", "修改头像失败:", error);
  8617. uni.showToast({ title: "上传失败", icon: "none" });
  8618. } finally {
  8619. uni.hideLoading();
  8620. }
  8621. }
  8622. });
  8623. },
  8624. editName() {
  8625. uni.navigateTo({
  8626. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  8627. });
  8628. },
  8629. showStatusPicker() {
  8630. this.isStatusPickerShow = true;
  8631. },
  8632. closeStatusPicker() {
  8633. this.isStatusPickerShow = false;
  8634. },
  8635. // 选择状态 @author steelwei
  8636. async selectStatus(statusText) {
  8637. const statusMap = {
  8638. "接单中": "busy",
  8639. "休息中": "resting"
  8640. };
  8641. const status = statusMap[statusText];
  8642. try {
  8643. const res = await updateStatus(status);
  8644. if (res.code === 200) {
  8645. this.userInfo.workStatus = statusText;
  8646. uni.showToast({ title: "状态已更新", icon: "success" });
  8647. } else {
  8648. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8649. }
  8650. } catch (error) {
  8651. formatAppLog("error", "at pages/mine/settings/profile/index.vue:258", "修改状态失败:", error);
  8652. uni.showToast({ title: "网络错误", icon: "none" });
  8653. } finally {
  8654. this.closeStatusPicker();
  8655. }
  8656. },
  8657. // 城市级联选择器(与我要加入页面一致) @author steelwei
  8658. async showCityPicker() {
  8659. this.isCityPickerShow = true;
  8660. if (this.selectedPathway.length === 0) {
  8661. await this.resetCityPicker();
  8662. }
  8663. },
  8664. async resetCityPicker() {
  8665. this.selectStep = 0;
  8666. this.selectedPathway = [];
  8667. await this.loadAreaChildren(0);
  8668. },
  8669. closeCityPicker() {
  8670. this.isCityPickerShow = false;
  8671. },
  8672. async loadAreaChildren(parentId) {
  8673. try {
  8674. const res = await getAreaChildren(parentId);
  8675. this.currentCityList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  8676. id: item.id,
  8677. name: item.name,
  8678. type: item.type,
  8679. parentId: item.parentId
  8680. }));
  8681. } catch (err) {
  8682. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载区域数据失败:", err);
  8683. this.currentCityList = [];
  8684. }
  8685. },
  8686. async selectCityItem(item) {
  8687. this.selectedPathway[this.selectStep] = item;
  8688. if (item.type === 0) {
  8689. this.selectStep++;
  8690. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  8691. await this.loadAreaChildren(item.id);
  8692. if (this.currentCityList.length === 0) {
  8693. this.selectedCityId = item.id;
  8694. this.confirmCity();
  8695. }
  8696. } else {
  8697. this.selectedCityId = item.id;
  8698. this.confirmCity();
  8699. }
  8700. },
  8701. async jumpToStep(step) {
  8702. this.selectStep = step;
  8703. if (step === 0) {
  8704. await this.loadAreaChildren(0);
  8705. } else {
  8706. const parent = this.selectedPathway[step - 1];
  8707. if (parent) {
  8708. await this.loadAreaChildren(parent.id);
  8709. }
  8710. }
  8711. },
  8712. // 确认城市选择 @author steelwei
  8713. async confirmCity() {
  8714. if (this.selectedPathway.length === 0) {
  8715. uni.showToast({ title: "请选择城市", icon: "none" });
  8716. return;
  8717. }
  8718. const cityName = this.selectedPathway.map((i) => i.name).join(" ");
  8719. const cityCode = String(this.selectedCityId);
  8720. try {
  8721. const res = await updateCity(cityCode, cityName);
  8722. if (res.code === 200) {
  8723. this.userInfo.city = cityName;
  8724. uni.showToast({ title: "修改成功", icon: "success" });
  8725. this.closeCityPicker();
  8726. this.selectedPathway = [];
  8727. } else {
  8728. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8729. }
  8730. } catch (error) {
  8731. formatAppLog("error", "at pages/mine/settings/profile/index.vue:346", "修改城市失败:", error);
  8732. uni.showToast({ title: "网络错误", icon: "none" });
  8733. }
  8734. }
  8735. }
  8736. };
  8737. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  8738. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8739. vue.createElementVNode("view", { class: "custom-header" }, [
  8740. vue.createElementVNode("view", {
  8741. class: "header-left",
  8742. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8743. }, [
  8744. vue.createElementVNode("image", {
  8745. class: "back-icon",
  8746. src: _imports_0,
  8747. style: { "transform": "rotate(180deg)" }
  8748. })
  8749. ]),
  8750. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  8751. vue.createElementVNode("view", { class: "header-right" })
  8752. ]),
  8753. vue.createElementVNode("view", { class: "header-placeholder" }),
  8754. vue.createElementVNode("view", { class: "group-card" }, [
  8755. vue.createElementVNode("view", {
  8756. class: "list-item",
  8757. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  8758. }, [
  8759. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  8760. vue.createElementVNode("view", { class: "item-right" }, [
  8761. vue.createElementVNode("image", {
  8762. class: "user-avatar",
  8763. src: $data.userInfo.avatar,
  8764. mode: "aspectFill"
  8765. }, null, 8, ["src"]),
  8766. vue.createElementVNode("image", {
  8767. class: "arrow-icon",
  8768. src: _imports_3
  8769. })
  8770. ])
  8771. ]),
  8772. vue.createElementVNode("view", {
  8773. class: "list-item",
  8774. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  8775. }, [
  8776. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  8777. vue.createElementVNode("view", { class: "item-right" }, [
  8778. vue.createElementVNode(
  8779. "text",
  8780. { class: "item-value" },
  8781. vue.toDisplayString($data.userInfo.name),
  8782. 1
  8783. /* TEXT */
  8784. ),
  8785. vue.createElementVNode("image", {
  8786. class: "arrow-icon",
  8787. src: _imports_3
  8788. })
  8789. ])
  8790. ])
  8791. ]),
  8792. vue.createElementVNode("view", { class: "group-card" }, [
  8793. vue.createElementVNode("view", {
  8794. class: "list-item",
  8795. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  8796. }, [
  8797. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  8798. vue.createElementVNode("view", { class: "item-right" }, [
  8799. vue.createElementVNode(
  8800. "text",
  8801. { class: "item-value-black" },
  8802. vue.toDisplayString($data.userInfo.workStatus),
  8803. 1
  8804. /* TEXT */
  8805. ),
  8806. vue.createElementVNode("image", {
  8807. class: "arrow-icon",
  8808. src: _imports_3
  8809. })
  8810. ])
  8811. ])
  8812. ]),
  8813. vue.createElementVNode("view", { class: "group-card" }, [
  8814. vue.createElementVNode("view", {
  8815. class: "list-item",
  8816. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  8817. }, [
  8818. vue.createElementVNode("text", { class: "item-title" }, "工作城市"),
  8819. vue.createElementVNode("view", { class: "item-right" }, [
  8820. vue.createElementVNode(
  8821. "text",
  8822. { class: "item-value" },
  8823. vue.toDisplayString($data.userInfo.city),
  8824. 1
  8825. /* TEXT */
  8826. ),
  8827. vue.createElementVNode("image", {
  8828. class: "arrow-icon",
  8829. src: _imports_3
  8830. })
  8831. ])
  8832. ]),
  8833. vue.createElementVNode("view", { class: "list-item no-border" }, [
  8834. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  8835. vue.createElementVNode("view", { class: "item-right" }, [
  8836. vue.createElementVNode(
  8837. "text",
  8838. { class: "item-value" },
  8839. vue.toDisplayString($data.userInfo.stationName || "未分配站点"),
  8840. 1
  8841. /* TEXT */
  8842. )
  8843. ])
  8844. ])
  8845. ]),
  8846. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8847. key: 0,
  8848. class: "popup-mask",
  8849. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8850. }, [
  8851. vue.createElementVNode("view", {
  8852. class: "popup-content",
  8853. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  8854. }, ["stop"]))
  8855. }, [
  8856. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  8857. vue.createElementVNode("view", {
  8858. class: "popup-item",
  8859. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  8860. }, "接单中"),
  8861. vue.createElementVNode("view", {
  8862. class: "popup-item",
  8863. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  8864. }, "休息中"),
  8865. vue.createElementVNode("view", {
  8866. class: "popup-cancel",
  8867. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8868. }, "取消")
  8869. ])
  8870. ])) : vue.createCommentVNode("v-if", true),
  8871. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8872. key: 1,
  8873. class: "popup-mask",
  8874. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8875. }, [
  8876. vue.createElementVNode("view", {
  8877. class: "popup-content",
  8878. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  8879. }, ["stop"]))
  8880. }, [
  8881. vue.createElementVNode("view", { class: "popup-header-row" }, [
  8882. vue.createElementVNode("text", {
  8883. class: "popup-btn-cancel",
  8884. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8885. }, "取消"),
  8886. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市"),
  8887. vue.createElementVNode("text", {
  8888. class: "popup-btn-confirm",
  8889. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  8890. }, "确定")
  8891. ]),
  8892. vue.createElementVNode("view", { class: "picker-body" }, [
  8893. vue.createElementVNode("view", { class: "timeline-area" }, [
  8894. (vue.openBlock(true), vue.createElementBlock(
  8895. vue.Fragment,
  8896. null,
  8897. vue.renderList($data.selectedPathway, (item, index) => {
  8898. return vue.openBlock(), vue.createElementBlock("view", {
  8899. class: "timeline-item",
  8900. key: index,
  8901. onClick: ($event) => $options.jumpToStep(index)
  8902. }, [
  8903. vue.createElementVNode("view", { class: "timeline-dot" }),
  8904. vue.createElementVNode(
  8905. "text",
  8906. null,
  8907. vue.toDisplayString(item.name),
  8908. 1
  8909. /* TEXT */
  8910. )
  8911. ], 8, ["onClick"]);
  8912. }),
  8913. 128
  8914. /* KEYED_FRAGMENT */
  8915. )),
  8916. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  8917. key: 0,
  8918. class: "timeline-item active"
  8919. }, [
  8920. vue.createElementVNode("view", { class: "timeline-dot" }),
  8921. vue.createElementVNode("text", null, "请选择")
  8922. ])) : vue.createCommentVNode("v-if", true)
  8923. ]),
  8924. vue.createElementVNode("scroll-view", {
  8925. "scroll-y": "",
  8926. class: "list-area"
  8927. }, [
  8928. (vue.openBlock(true), vue.createElementBlock(
  8929. vue.Fragment,
  8930. null,
  8931. vue.renderList($data.currentCityList, (item) => {
  8932. return vue.openBlock(), vue.createElementBlock("view", {
  8933. class: "list-item",
  8934. key: item.id,
  8935. onClick: ($event) => $options.selectCityItem(item)
  8936. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  8937. }),
  8938. 128
  8939. /* KEYED_FRAGMENT */
  8940. )),
  8941. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8942. key: 0,
  8943. style: { "padding": "20rpx", "color": "#999" }
  8944. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  8945. ])
  8946. ])
  8947. ])
  8948. ])) : vue.createCommentVNode("v-if", true)
  8949. ]);
  8950. }
  8951. 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"]]);
  8952. const _sfc_main$i = {
  8953. data() {
  8954. return {
  8955. authInfo: {
  8956. realName: "",
  8957. idCard: "",
  8958. idCardFront: "",
  8959. idCardBack: "",
  8960. serviceTypes: [],
  8961. authId: false,
  8962. authQual: false,
  8963. pendingAudit: false,
  8964. qualImages: []
  8965. }
  8966. };
  8967. },
  8968. onLoad() {
  8969. this.loadAuthInfo();
  8970. },
  8971. methods: {
  8972. navBack() {
  8973. uni.navigateBack({
  8974. delta: 1
  8975. });
  8976. },
  8977. async loadAuthInfo() {
  8978. try {
  8979. const res = await getAuthInfo();
  8980. if (res.code === 200 && res.data) {
  8981. this.authInfo = {
  8982. realName: res.data.realName || "",
  8983. idCard: res.data.idCard || "",
  8984. idCardFront: res.data.idCardFrontUrl || "",
  8985. idCardBack: res.data.idCardBackUrl || "",
  8986. serviceTypes: res.data.serviceTypeList || [],
  8987. authId: res.data.authId || false,
  8988. authQual: res.data.authQual || false,
  8989. pendingAudit: res.data.pendingAudit || false,
  8990. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  8991. };
  8992. }
  8993. } catch (e) {
  8994. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  8995. uni.showToast({ title: "加载失败", icon: "none" });
  8996. }
  8997. },
  8998. maskIdCard(idCard) {
  8999. if (!idCard || idCard.length < 8)
  9000. return idCard;
  9001. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9002. },
  9003. editAuth() {
  9004. uni.showModal({
  9005. title: "提示",
  9006. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9007. success: (res) => {
  9008. if (res.confirm) {
  9009. uni.navigateTo({
  9010. url: "/pages/mine/settings/auth/edit"
  9011. });
  9012. }
  9013. }
  9014. });
  9015. }
  9016. }
  9017. };
  9018. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  9019. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9020. vue.createElementVNode("view", { class: "custom-header" }, [
  9021. vue.createElementVNode("view", {
  9022. class: "header-left",
  9023. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9024. }, [
  9025. vue.createElementVNode("image", {
  9026. class: "back-icon",
  9027. src: _imports_0,
  9028. style: { "transform": "rotate(180deg)" }
  9029. })
  9030. ]),
  9031. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9032. vue.createElementVNode("view", { class: "header-right" })
  9033. ]),
  9034. vue.createElementVNode("view", { class: "header-placeholder" }),
  9035. vue.createElementVNode("view", { class: "card" }, [
  9036. vue.createElementVNode("view", { class: "section-header" }, [
  9037. vue.createElementVNode("view", { class: "orange-bar" }),
  9038. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9039. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9040. key: 0,
  9041. class: "tag-orange"
  9042. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9043. key: 1,
  9044. class: "tag-green"
  9045. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9046. key: 2,
  9047. class: "tag-gray"
  9048. }, "未认证"))
  9049. ]),
  9050. vue.createElementVNode("view", { class: "info-row" }, [
  9051. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9052. vue.createElementVNode(
  9053. "text",
  9054. { class: "value" },
  9055. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9056. 1
  9057. /* TEXT */
  9058. )
  9059. ]),
  9060. vue.createElementVNode("view", { class: "info-row" }, [
  9061. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9062. vue.createElementVNode(
  9063. "text",
  9064. { class: "value" },
  9065. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9066. 1
  9067. /* TEXT */
  9068. )
  9069. ]),
  9070. vue.createElementVNode("view", { class: "id-card-row" }, [
  9071. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9072. key: 0,
  9073. class: "id-card-box green-bg"
  9074. }, [
  9075. vue.createElementVNode("image", {
  9076. class: "id-card-img",
  9077. src: $data.authInfo.idCardFront,
  9078. mode: "aspectFill"
  9079. }, null, 8, ["src"]),
  9080. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9081. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9082. key: 1,
  9083. class: "id-card-box green-bg"
  9084. }, [
  9085. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9086. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9087. ])),
  9088. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9089. key: 2,
  9090. class: "id-card-box green-bg"
  9091. }, [
  9092. vue.createElementVNode("image", {
  9093. class: "id-card-img",
  9094. src: $data.authInfo.idCardBack,
  9095. mode: "aspectFill"
  9096. }, null, 8, ["src"]),
  9097. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9098. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9099. key: 3,
  9100. class: "id-card-box green-bg"
  9101. }, [
  9102. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9103. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9104. ]))
  9105. ])
  9106. ]),
  9107. vue.createElementVNode("view", { class: "card" }, [
  9108. vue.createElementVNode("view", { class: "section-header" }, [
  9109. vue.createElementVNode("view", { class: "orange-bar" }),
  9110. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9111. ]),
  9112. vue.createElementVNode("view", { class: "tags-row" }, [
  9113. (vue.openBlock(true), vue.createElementBlock(
  9114. vue.Fragment,
  9115. null,
  9116. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9117. return vue.openBlock(), vue.createElementBlock(
  9118. "view",
  9119. {
  9120. class: "service-tag",
  9121. key: index
  9122. },
  9123. vue.toDisplayString(type),
  9124. 1
  9125. /* TEXT */
  9126. );
  9127. }),
  9128. 128
  9129. /* KEYED_FRAGMENT */
  9130. )),
  9131. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9132. key: 0,
  9133. class: "empty-text"
  9134. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9135. ])
  9136. ]),
  9137. vue.createElementVNode("view", { class: "card" }, [
  9138. vue.createElementVNode("view", { class: "section-header" }, [
  9139. vue.createElementVNode("view", { class: "orange-bar" }),
  9140. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9141. ]),
  9142. vue.createElementVNode(
  9143. "text",
  9144. { class: "sub-title" },
  9145. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9146. 1
  9147. /* TEXT */
  9148. ),
  9149. vue.createElementVNode("view", { class: "cert-row" }, [
  9150. (vue.openBlock(true), vue.createElementBlock(
  9151. vue.Fragment,
  9152. null,
  9153. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9154. return vue.openBlock(), vue.createElementBlock("view", {
  9155. class: "cert-box yellow-bg",
  9156. key: index
  9157. }, [
  9158. vue.createElementVNode("image", {
  9159. class: "cert-img",
  9160. src: img,
  9161. mode: "aspectFill"
  9162. }, null, 8, ["src"])
  9163. ]);
  9164. }),
  9165. 128
  9166. /* KEYED_FRAGMENT */
  9167. )),
  9168. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9169. key: 0,
  9170. class: "empty-text"
  9171. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9172. ])
  9173. ]),
  9174. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9175. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9176. key: 0,
  9177. class: "action-btn disabled",
  9178. disabled: ""
  9179. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9180. key: 1,
  9181. class: "action-btn",
  9182. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9183. }, "修改认证信息")),
  9184. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9185. key: 2,
  9186. class: "tips"
  9187. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9188. key: 3,
  9189. class: "tips"
  9190. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9191. ])
  9192. ]);
  9193. }
  9194. 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"]]);
  9195. const _sfc_main$h = {
  9196. data() {
  9197. return {
  9198. idCardFront: "",
  9199. idCardBack: "",
  9200. idCardFrontOssId: "",
  9201. idCardBackOssId: "",
  9202. serviceOptions: [],
  9203. selectedServices: [],
  9204. qualifications: {},
  9205. qualOssIds: {}
  9206. };
  9207. },
  9208. async onLoad() {
  9209. await this.loadServiceOptions();
  9210. this.loadAuthInfo();
  9211. },
  9212. methods: {
  9213. async loadServiceOptions() {
  9214. try {
  9215. const res = await getServiceTypes();
  9216. this.serviceOptions = (res.data || []).map((item) => ({
  9217. id: String(item.id),
  9218. name: item.name
  9219. }));
  9220. } catch (e) {
  9221. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9222. }
  9223. },
  9224. async loadAuthInfo() {
  9225. try {
  9226. uni.showLoading({ title: "加载中..." });
  9227. const res = await getAuthInfo();
  9228. if (res.code === 200 && res.data) {
  9229. this.idCardFront = res.data.idCardFrontUrl || "";
  9230. this.idCardBack = res.data.idCardBackUrl || "";
  9231. this.idCardFrontOssId = res.data.idCardFront || "";
  9232. this.idCardBackOssId = res.data.idCardBack || "";
  9233. let serviceIds = [];
  9234. if (res.data.serviceTypes) {
  9235. serviceIds = [...new Set(
  9236. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9237. )];
  9238. }
  9239. this.selectedServices = serviceIds;
  9240. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9241. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9242. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9243. validNames.forEach((name, idx) => {
  9244. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9245. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9246. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9247. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9248. });
  9249. }
  9250. uni.hideLoading();
  9251. } catch (e) {
  9252. uni.hideLoading();
  9253. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9254. uni.showToast({ title: "加载失败", icon: "none" });
  9255. }
  9256. },
  9257. navBack() {
  9258. uni.navigateBack({ delta: 1 });
  9259. },
  9260. chooseImage(side) {
  9261. uni.chooseImage({
  9262. count: 1,
  9263. sizeType: ["compressed"],
  9264. sourceType: ["album", "camera"],
  9265. success: async (res) => {
  9266. const tempPath = res.tempFilePaths[0];
  9267. if (side === "front") {
  9268. this.idCardFront = tempPath;
  9269. } else {
  9270. this.idCardBack = tempPath;
  9271. }
  9272. try {
  9273. uni.showLoading({ title: "上传中..." });
  9274. const uploadRes = await uploadFile(tempPath);
  9275. if (side === "front") {
  9276. this.idCardFrontOssId = uploadRes.data.ossId;
  9277. } else {
  9278. this.idCardBackOssId = uploadRes.data.ossId;
  9279. }
  9280. uni.hideLoading();
  9281. uni.showToast({ title: "上传成功", icon: "success" });
  9282. } catch (err) {
  9283. uni.hideLoading();
  9284. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9285. uni.showToast({ title: "上传失败", icon: "none" });
  9286. }
  9287. }
  9288. });
  9289. },
  9290. deleteImage(side) {
  9291. if (side === "front") {
  9292. this.idCardFront = "";
  9293. this.idCardFrontOssId = "";
  9294. } else {
  9295. this.idCardBack = "";
  9296. this.idCardBackOssId = "";
  9297. }
  9298. },
  9299. getServiceName(serviceId) {
  9300. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9301. return found ? found.name : "";
  9302. },
  9303. toggleService(service) {
  9304. const index = this.selectedServices.indexOf(service.id);
  9305. if (index > -1) {
  9306. this.selectedServices.splice(index, 1);
  9307. this.$delete(this.qualifications, service.name);
  9308. this.$delete(this.qualOssIds, service.name);
  9309. } else {
  9310. this.selectedServices.push(service.id);
  9311. this.$set(this.qualifications, service.name, []);
  9312. this.$set(this.qualOssIds, service.name, []);
  9313. }
  9314. this.$forceUpdate();
  9315. },
  9316. chooseQualImage(service) {
  9317. uni.chooseImage({
  9318. count: 9,
  9319. sizeType: ["compressed"],
  9320. sourceType: ["album", "camera"],
  9321. success: async (res) => {
  9322. if (!this.qualifications[service]) {
  9323. this.qualifications[service] = [];
  9324. this.qualOssIds[service] = [];
  9325. }
  9326. for (const tempPath of res.tempFilePaths) {
  9327. this.qualifications[service].push(tempPath);
  9328. this.$forceUpdate();
  9329. try {
  9330. uni.showLoading({ title: "上传中..." });
  9331. const uploadRes = await uploadFile(tempPath);
  9332. this.qualOssIds[service].push(uploadRes.data.ossId);
  9333. uni.hideLoading();
  9334. } catch (err) {
  9335. uni.hideLoading();
  9336. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9337. }
  9338. }
  9339. }
  9340. });
  9341. },
  9342. deleteQualImage(service, index) {
  9343. this.qualifications[service].splice(index, 1);
  9344. if (this.qualOssIds[service]) {
  9345. this.qualOssIds[service].splice(index, 1);
  9346. }
  9347. this.$forceUpdate();
  9348. },
  9349. previewImage(service, index) {
  9350. uni.previewImage({
  9351. urls: this.qualifications[service],
  9352. current: index
  9353. });
  9354. },
  9355. async submitAuth() {
  9356. if (!this.idCardFront || !this.idCardBack) {
  9357. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9358. return;
  9359. }
  9360. if (this.selectedServices.length === 0) {
  9361. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9362. return;
  9363. }
  9364. for (const serviceId of this.selectedServices) {
  9365. const name = this.getServiceName(serviceId);
  9366. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9367. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9368. return;
  9369. }
  9370. }
  9371. uni.showModal({
  9372. title: "提示",
  9373. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9374. success: (res) => {
  9375. if (res.confirm) {
  9376. this.doSubmit();
  9377. }
  9378. }
  9379. });
  9380. },
  9381. async doSubmit() {
  9382. const allQualOssIds = [];
  9383. Object.values(this.qualOssIds).forEach((ids) => {
  9384. allQualOssIds.push(...ids);
  9385. });
  9386. const submitData = {
  9387. idCardFront: this.idCardFrontOssId,
  9388. idCardBack: this.idCardBackOssId,
  9389. serviceTypes: this.selectedServices.join(","),
  9390. // 逗号分隔的服务类型ID
  9391. qualifications: allQualOssIds.join(",")
  9392. // 逗号分隔的资质图片OSS ID
  9393. };
  9394. try {
  9395. uni.showLoading({ title: "提交中..." });
  9396. await updateAuthInfo(submitData);
  9397. uni.hideLoading();
  9398. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9399. setTimeout(() => {
  9400. uni.navigateBack({ delta: 1 });
  9401. }, 1500);
  9402. } catch (err) {
  9403. uni.hideLoading();
  9404. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9405. uni.showToast({ title: "提交失败", icon: "none" });
  9406. }
  9407. }
  9408. }
  9409. };
  9410. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9411. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9412. vue.createElementVNode("view", { class: "custom-header" }, [
  9413. vue.createElementVNode("view", {
  9414. class: "header-left",
  9415. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9416. }, [
  9417. vue.createElementVNode("image", {
  9418. class: "back-icon",
  9419. src: _imports_0,
  9420. style: { "transform": "rotate(180deg)" }
  9421. })
  9422. ]),
  9423. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9424. vue.createElementVNode("view", { class: "header-right" })
  9425. ]),
  9426. vue.createElementVNode("view", { class: "header-placeholder" }),
  9427. vue.createElementVNode("view", { class: "warning-tip" }, [
  9428. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9429. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9430. ]),
  9431. vue.createElementVNode("view", { class: "section-card" }, [
  9432. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9433. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9434. vue.createElementVNode("view", { class: "id-card-row" }, [
  9435. vue.createElementVNode("view", {
  9436. class: "id-card-upload",
  9437. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9438. }, [
  9439. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9440. key: 0,
  9441. src: $data.idCardFront,
  9442. class: "id-card-img",
  9443. mode: "aspectFill"
  9444. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9445. key: 1,
  9446. class: "id-card-placeholder"
  9447. }, [
  9448. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9449. ])),
  9450. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9451. key: 2,
  9452. class: "delete-btn",
  9453. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9454. }, "×")) : vue.createCommentVNode("v-if", true),
  9455. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9456. ]),
  9457. vue.createElementVNode("view", {
  9458. class: "id-card-upload",
  9459. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9460. }, [
  9461. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9462. key: 0,
  9463. src: $data.idCardBack,
  9464. class: "id-card-img",
  9465. mode: "aspectFill"
  9466. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9467. key: 1,
  9468. class: "id-card-placeholder"
  9469. }, [
  9470. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9471. ])),
  9472. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9473. key: 2,
  9474. class: "delete-btn",
  9475. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9476. }, "×")) : vue.createCommentVNode("v-if", true),
  9477. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9478. ])
  9479. ])
  9480. ]),
  9481. vue.createElementVNode("view", { class: "section-card" }, [
  9482. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9483. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9484. vue.createElementVNode("view", { class: "service-list" }, [
  9485. (vue.openBlock(true), vue.createElementBlock(
  9486. vue.Fragment,
  9487. null,
  9488. vue.renderList($data.serviceOptions, (service, index) => {
  9489. return vue.openBlock(), vue.createElementBlock("view", {
  9490. class: "service-item",
  9491. key: service.id,
  9492. onClick: ($event) => $options.toggleService(service)
  9493. }, [
  9494. vue.createElementVNode(
  9495. "text",
  9496. { class: "service-name" },
  9497. vue.toDisplayString(service.name),
  9498. 1
  9499. /* TEXT */
  9500. ),
  9501. vue.createElementVNode(
  9502. "view",
  9503. {
  9504. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9505. },
  9506. [
  9507. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9508. ],
  9509. 2
  9510. /* CLASS */
  9511. )
  9512. ], 8, ["onClick"]);
  9513. }),
  9514. 128
  9515. /* KEYED_FRAGMENT */
  9516. ))
  9517. ])
  9518. ]),
  9519. vue.createElementVNode("view", { class: "section-card" }, [
  9520. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9521. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9522. (vue.openBlock(true), vue.createElementBlock(
  9523. vue.Fragment,
  9524. null,
  9525. vue.renderList($data.selectedServices, (serviceId, index) => {
  9526. return vue.openBlock(), vue.createElementBlock("view", {
  9527. key: serviceId,
  9528. class: "qual-section"
  9529. }, [
  9530. vue.createElementVNode(
  9531. "text",
  9532. { class: "qual-title" },
  9533. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  9534. 1
  9535. /* TEXT */
  9536. ),
  9537. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  9538. (vue.openBlock(true), vue.createElementBlock(
  9539. vue.Fragment,
  9540. null,
  9541. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  9542. return vue.openBlock(), vue.createElementBlock("view", {
  9543. class: "qual-item",
  9544. key: imgIndex,
  9545. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  9546. }, [
  9547. vue.createElementVNode("image", {
  9548. src: img,
  9549. class: "qual-img",
  9550. mode: "aspectFill"
  9551. }, null, 8, ["src"]),
  9552. vue.createElementVNode("view", {
  9553. class: "delete-btn",
  9554. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  9555. }, "×", 8, ["onClick"])
  9556. ], 8, ["onClick"]);
  9557. }),
  9558. 128
  9559. /* KEYED_FRAGMENT */
  9560. )),
  9561. vue.createElementVNode("view", {
  9562. class: "qual-upload-btn",
  9563. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  9564. }, [
  9565. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  9566. ], 8, ["onClick"])
  9567. ])
  9568. ]);
  9569. }),
  9570. 128
  9571. /* KEYED_FRAGMENT */
  9572. )),
  9573. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9574. key: 0,
  9575. class: "empty-hint"
  9576. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  9577. ]),
  9578. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9579. vue.createElementVNode("button", {
  9580. class: "submit-btn",
  9581. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  9582. }, "提交审核")
  9583. ])
  9584. ]);
  9585. }
  9586. 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"]]);
  9587. const _imports_1$3 = "/static/icons/shield.svg";
  9588. const _sfc_main$g = {
  9589. data() {
  9590. return {
  9591. hasShieldIcon: false
  9592. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  9593. };
  9594. },
  9595. methods: {
  9596. navBack() {
  9597. uni.navigateBack({
  9598. delta: 1
  9599. });
  9600. },
  9601. editBank() {
  9602. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  9603. }
  9604. }
  9605. };
  9606. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  9607. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9608. vue.createElementVNode("view", { class: "custom-header" }, [
  9609. vue.createElementVNode("view", {
  9610. class: "header-left",
  9611. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9612. }, [
  9613. vue.createElementVNode("image", {
  9614. class: "back-icon",
  9615. src: _imports_0,
  9616. style: { "transform": "rotate(180deg)" }
  9617. })
  9618. ]),
  9619. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  9620. vue.createElementVNode("view", { class: "header-right" })
  9621. ]),
  9622. vue.createElementVNode("view", { class: "header-placeholder" }),
  9623. vue.createElementVNode("view", { class: "bank-card" }, [
  9624. vue.createElementVNode("view", { class: "card-top" }, [
  9625. vue.createElementVNode("view", { class: "bank-info" }, [
  9626. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  9627. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  9628. ]),
  9629. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  9630. ]),
  9631. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  9632. ]),
  9633. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  9634. vue.createElementVNode("view", { class: "card-bg-circle" })
  9635. ]),
  9636. vue.createElementVNode("button", {
  9637. class: "action-btn",
  9638. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  9639. }, "修改银行卡信息"),
  9640. vue.createElementVNode("view", { class: "security-tip" }, [
  9641. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  9642. key: 0,
  9643. class: "shield-icon",
  9644. src: _imports_1$3
  9645. })) : vue.createCommentVNode("v-if", true),
  9646. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  9647. ])
  9648. ]);
  9649. }
  9650. 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"]]);
  9651. const _sfc_main$f = {
  9652. data() {
  9653. return {
  9654. phone: "",
  9655. hasPassword: false
  9656. };
  9657. },
  9658. onLoad() {
  9659. this.loadProfile();
  9660. },
  9661. methods: {
  9662. navBack() {
  9663. uni.navigateBack({
  9664. delta: 1
  9665. });
  9666. },
  9667. async loadProfile() {
  9668. try {
  9669. const res = await getMyProfile();
  9670. if (res.code === 200 && res.data) {
  9671. this.phone = res.data.phone || "";
  9672. this.hasPassword = !!res.data.hasPassword;
  9673. }
  9674. } catch (e) {
  9675. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  9676. }
  9677. },
  9678. maskPhone(phone) {
  9679. if (!phone || phone.length < 11)
  9680. return phone;
  9681. return phone.substring(0, 3) + "****" + phone.substring(7);
  9682. },
  9683. changeMobile() {
  9684. uni.navigateTo({
  9685. url: "/pages/mine/settings/security/change-phone"
  9686. });
  9687. },
  9688. changePassword() {
  9689. uni.navigateTo({
  9690. url: "/pages/mine/settings/security/change-password"
  9691. });
  9692. },
  9693. async deleteAccount() {
  9694. uni.showModal({
  9695. title: "警示",
  9696. content: "注销账号后将无法恢复,确定要继续吗?",
  9697. success: async (res) => {
  9698. if (res.confirm) {
  9699. try {
  9700. const result = await deleteAccount();
  9701. if (result.code === 200) {
  9702. uni.showToast({ title: "账号已注销", icon: "success" });
  9703. setTimeout(() => {
  9704. uni.reLaunch({ url: "/pages/login/login" });
  9705. }, 1500);
  9706. } else {
  9707. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  9708. }
  9709. } catch (e) {
  9710. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  9711. uni.showToast({ title: "注销失败", icon: "none" });
  9712. }
  9713. }
  9714. }
  9715. });
  9716. }
  9717. }
  9718. };
  9719. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  9720. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9721. vue.createElementVNode("view", { class: "custom-header" }, [
  9722. vue.createElementVNode("view", {
  9723. class: "header-left",
  9724. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9725. }, [
  9726. vue.createElementVNode("image", {
  9727. class: "back-icon",
  9728. src: _imports_0,
  9729. style: { "transform": "rotate(180deg)" }
  9730. })
  9731. ]),
  9732. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  9733. vue.createElementVNode("view", { class: "header-right" })
  9734. ]),
  9735. vue.createElementVNode("view", { class: "header-placeholder" }),
  9736. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  9737. vue.createElementVNode("view", { class: "group-card" }, [
  9738. vue.createElementVNode("view", {
  9739. class: "list-item",
  9740. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  9741. }, [
  9742. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  9743. vue.createElementVNode("view", { class: "item-right" }, [
  9744. vue.createElementVNode(
  9745. "text",
  9746. { class: "item-value" },
  9747. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  9748. 1
  9749. /* TEXT */
  9750. ),
  9751. vue.createElementVNode("image", {
  9752. class: "arrow-icon",
  9753. src: _imports_3
  9754. })
  9755. ])
  9756. ]),
  9757. vue.createElementVNode("view", {
  9758. class: "list-item",
  9759. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  9760. }, [
  9761. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  9762. vue.createElementVNode("view", { class: "item-right" }, [
  9763. vue.createElementVNode(
  9764. "text",
  9765. { class: "item-value" },
  9766. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  9767. 1
  9768. /* TEXT */
  9769. ),
  9770. vue.createElementVNode("image", {
  9771. class: "arrow-icon",
  9772. src: _imports_3
  9773. })
  9774. ])
  9775. ])
  9776. ]),
  9777. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  9778. vue.createElementVNode("view", { class: "group-card" }, [
  9779. vue.createElementVNode("view", {
  9780. class: "list-item no-border",
  9781. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  9782. }, [
  9783. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  9784. vue.createElementVNode("image", {
  9785. class: "arrow-icon",
  9786. src: _imports_3
  9787. })
  9788. ])
  9789. ])
  9790. ]);
  9791. }
  9792. 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"]]);
  9793. const _sfc_main$e = {
  9794. data() {
  9795. return {
  9796. name: ""
  9797. };
  9798. },
  9799. onLoad(options) {
  9800. if (options.name) {
  9801. this.name = decodeURIComponent(options.name);
  9802. }
  9803. },
  9804. methods: {
  9805. navBack() {
  9806. uni.navigateBack({ delta: 1 });
  9807. },
  9808. // 提交修改 @author steelwei
  9809. async submitChange() {
  9810. if (!this.name || !this.name.trim()) {
  9811. uni.showToast({ title: "请输入姓名", icon: "none" });
  9812. return;
  9813. }
  9814. if (this.name.trim().length < 2) {
  9815. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  9816. return;
  9817. }
  9818. uni.showLoading({ title: "提交中..." });
  9819. try {
  9820. const res = await updateName(this.name.trim());
  9821. if (res.code === 200) {
  9822. uni.showToast({
  9823. title: "修改成功",
  9824. icon: "success",
  9825. duration: 2e3
  9826. });
  9827. uni.$emit("updateName", this.name.trim());
  9828. setTimeout(() => {
  9829. uni.navigateBack({ delta: 1 });
  9830. }, 2e3);
  9831. } else {
  9832. uni.showToast({
  9833. title: res.msg || "修改失败",
  9834. icon: "none"
  9835. });
  9836. }
  9837. } catch (error) {
  9838. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  9839. uni.showToast({ title: "网络错误", icon: "none" });
  9840. } finally {
  9841. uni.hideLoading();
  9842. }
  9843. }
  9844. }
  9845. };
  9846. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  9847. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9848. vue.createElementVNode("view", { class: "custom-header" }, [
  9849. vue.createElementVNode("view", {
  9850. class: "header-left",
  9851. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9852. }, [
  9853. vue.createElementVNode("image", {
  9854. class: "back-icon",
  9855. src: _imports_0,
  9856. style: { "transform": "rotate(180deg)" }
  9857. })
  9858. ]),
  9859. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  9860. vue.createElementVNode("view", { class: "header-right" })
  9861. ]),
  9862. vue.createElementVNode("view", { class: "header-placeholder" }),
  9863. vue.createElementVNode("view", { class: "form-card" }, [
  9864. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9865. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  9866. vue.withDirectives(vue.createElementVNode(
  9867. "input",
  9868. {
  9869. class: "form-input",
  9870. type: "text",
  9871. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  9872. placeholder: "请输入真实姓名",
  9873. "placeholder-class": "placeholder",
  9874. maxlength: "20"
  9875. },
  9876. null,
  9877. 512
  9878. /* NEED_PATCH */
  9879. ), [
  9880. [vue.vModelText, $data.name]
  9881. ])
  9882. ])
  9883. ]),
  9884. vue.createElementVNode("view", { class: "btn-area" }, [
  9885. vue.createElementVNode("button", {
  9886. class: "submit-btn",
  9887. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  9888. }, "确认修改")
  9889. ]),
  9890. vue.createElementVNode("view", { class: "tips" }, [
  9891. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  9892. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  9893. ])
  9894. ]);
  9895. }
  9896. 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"]]);
  9897. const _sfc_main$d = {
  9898. data() {
  9899. return {
  9900. oldPassword: "",
  9901. newPassword: "",
  9902. confirmPassword: ""
  9903. };
  9904. },
  9905. methods: {
  9906. navBack() {
  9907. uni.navigateBack({ delta: 1 });
  9908. },
  9909. // 提交修改 @author steelwei
  9910. async submitChange() {
  9911. if (!this.oldPassword) {
  9912. uni.showToast({ title: "请输入旧密码", icon: "none" });
  9913. return;
  9914. }
  9915. if (!this.newPassword) {
  9916. uni.showToast({ title: "请输入新密码", icon: "none" });
  9917. return;
  9918. }
  9919. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  9920. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  9921. return;
  9922. }
  9923. if (this.newPassword !== this.confirmPassword) {
  9924. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  9925. return;
  9926. }
  9927. uni.showLoading({ title: "提交中..." });
  9928. try {
  9929. const res = await updatePassword(this.oldPassword, this.newPassword);
  9930. if (res.code === 200) {
  9931. uni.showToast({
  9932. title: "修改成功",
  9933. icon: "success",
  9934. duration: 2e3
  9935. });
  9936. setTimeout(() => {
  9937. uni.navigateBack({ delta: 1 });
  9938. }, 2e3);
  9939. } else {
  9940. uni.showToast({
  9941. title: res.msg || "修改失败",
  9942. icon: "none"
  9943. });
  9944. }
  9945. } catch (error) {
  9946. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  9947. uni.showToast({ title: "网络错误", icon: "none" });
  9948. } finally {
  9949. uni.hideLoading();
  9950. }
  9951. }
  9952. }
  9953. };
  9954. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  9955. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9956. vue.createElementVNode("view", { class: "custom-header" }, [
  9957. vue.createElementVNode("view", {
  9958. class: "header-left",
  9959. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9960. }, [
  9961. vue.createElementVNode("image", {
  9962. class: "back-icon",
  9963. src: _imports_0,
  9964. style: { "transform": "rotate(180deg)" }
  9965. })
  9966. ]),
  9967. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  9968. vue.createElementVNode("view", { class: "header-right" })
  9969. ]),
  9970. vue.createElementVNode("view", { class: "header-placeholder" }),
  9971. vue.createElementVNode("view", { class: "form-card" }, [
  9972. vue.createElementVNode("view", { class: "form-item" }, [
  9973. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  9974. vue.withDirectives(vue.createElementVNode(
  9975. "input",
  9976. {
  9977. class: "form-input",
  9978. type: "password",
  9979. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  9980. placeholder: "请输入旧密码",
  9981. "placeholder-class": "placeholder"
  9982. },
  9983. null,
  9984. 512
  9985. /* NEED_PATCH */
  9986. ), [
  9987. [vue.vModelText, $data.oldPassword]
  9988. ])
  9989. ]),
  9990. vue.createElementVNode("view", { class: "form-item" }, [
  9991. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  9992. vue.withDirectives(vue.createElementVNode(
  9993. "input",
  9994. {
  9995. class: "form-input",
  9996. type: "password",
  9997. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  9998. placeholder: "请输入新密码(6-20位)",
  9999. "placeholder-class": "placeholder"
  10000. },
  10001. null,
  10002. 512
  10003. /* NEED_PATCH */
  10004. ), [
  10005. [vue.vModelText, $data.newPassword]
  10006. ])
  10007. ]),
  10008. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10009. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10010. vue.withDirectives(vue.createElementVNode(
  10011. "input",
  10012. {
  10013. class: "form-input",
  10014. type: "password",
  10015. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10016. placeholder: "请再次输入新密码",
  10017. "placeholder-class": "placeholder"
  10018. },
  10019. null,
  10020. 512
  10021. /* NEED_PATCH */
  10022. ), [
  10023. [vue.vModelText, $data.confirmPassword]
  10024. ])
  10025. ])
  10026. ]),
  10027. vue.createElementVNode("view", { class: "btn-area" }, [
  10028. vue.createElementVNode("button", {
  10029. class: "submit-btn",
  10030. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10031. }, "确认修改")
  10032. ])
  10033. ]);
  10034. }
  10035. 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"]]);
  10036. const _sfc_main$c = {
  10037. data() {
  10038. return {
  10039. phone: "",
  10040. code: "",
  10041. countdown: 0,
  10042. timer: null
  10043. };
  10044. },
  10045. onUnload() {
  10046. if (this.timer) {
  10047. clearInterval(this.timer);
  10048. }
  10049. },
  10050. methods: {
  10051. navBack() {
  10052. uni.navigateBack({ delta: 1 });
  10053. },
  10054. // 发送验证码 @author steelwei
  10055. sendCode() {
  10056. if (!this.phone) {
  10057. uni.showToast({ title: "请输入手机号", icon: "none" });
  10058. return;
  10059. }
  10060. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10061. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10062. return;
  10063. }
  10064. uni.showToast({ title: "验证码已发送", icon: "success" });
  10065. this.countdown = 60;
  10066. this.timer = setInterval(() => {
  10067. this.countdown--;
  10068. if (this.countdown <= 0) {
  10069. clearInterval(this.timer);
  10070. }
  10071. }, 1e3);
  10072. },
  10073. // 提交修改 @author steelwei
  10074. async submitChange() {
  10075. if (!this.phone) {
  10076. uni.showToast({ title: "请输入手机号", icon: "none" });
  10077. return;
  10078. }
  10079. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10080. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10081. return;
  10082. }
  10083. if (!this.code) {
  10084. uni.showToast({ title: "请输入验证码", icon: "none" });
  10085. return;
  10086. }
  10087. uni.showLoading({ title: "提交中..." });
  10088. try {
  10089. const res = await updatePhone(this.phone, this.code);
  10090. if (res.code === 200) {
  10091. uni.showToast({
  10092. title: "修改成功",
  10093. icon: "success",
  10094. duration: 2e3
  10095. });
  10096. setTimeout(() => {
  10097. uni.navigateBack({ delta: 1 });
  10098. }, 2e3);
  10099. } else {
  10100. uni.showToast({
  10101. title: res.msg || "修改失败",
  10102. icon: "none"
  10103. });
  10104. }
  10105. } catch (error) {
  10106. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10107. uni.showToast({ title: "网络错误", icon: "none" });
  10108. } finally {
  10109. uni.hideLoading();
  10110. }
  10111. }
  10112. }
  10113. };
  10114. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10115. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10116. vue.createElementVNode("view", { class: "custom-header" }, [
  10117. vue.createElementVNode("view", {
  10118. class: "header-left",
  10119. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10120. }, [
  10121. vue.createElementVNode("image", {
  10122. class: "back-icon",
  10123. src: _imports_0,
  10124. style: { "transform": "rotate(180deg)" }
  10125. })
  10126. ]),
  10127. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10128. vue.createElementVNode("view", { class: "header-right" })
  10129. ]),
  10130. vue.createElementVNode("view", { class: "header-placeholder" }),
  10131. vue.createElementVNode("view", { class: "form-card" }, [
  10132. vue.createElementVNode("view", { class: "form-item" }, [
  10133. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10134. vue.withDirectives(vue.createElementVNode(
  10135. "input",
  10136. {
  10137. class: "form-input",
  10138. type: "number",
  10139. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10140. placeholder: "请输入新手机号",
  10141. "placeholder-class": "placeholder",
  10142. maxlength: "11"
  10143. },
  10144. null,
  10145. 512
  10146. /* NEED_PATCH */
  10147. ), [
  10148. [vue.vModelText, $data.phone]
  10149. ])
  10150. ]),
  10151. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10152. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10153. vue.withDirectives(vue.createElementVNode(
  10154. "input",
  10155. {
  10156. class: "form-input",
  10157. type: "number",
  10158. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10159. placeholder: "请输入验证码",
  10160. "placeholder-class": "placeholder",
  10161. maxlength: "6"
  10162. },
  10163. null,
  10164. 512
  10165. /* NEED_PATCH */
  10166. ), [
  10167. [vue.vModelText, $data.code]
  10168. ]),
  10169. vue.createElementVNode("button", {
  10170. class: "code-btn",
  10171. disabled: $data.countdown > 0,
  10172. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10173. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10174. ])
  10175. ]),
  10176. vue.createElementVNode("view", { class: "btn-area" }, [
  10177. vue.createElementVNode("button", {
  10178. class: "submit-btn",
  10179. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10180. }, "确认修改")
  10181. ]),
  10182. vue.createElementVNode("view", { class: "tips" }, [
  10183. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10184. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10185. ])
  10186. ]);
  10187. }
  10188. 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"]]);
  10189. const _sfc_main$b = {
  10190. data() {
  10191. return {};
  10192. },
  10193. methods: {
  10194. navBack() {
  10195. uni.navigateBack({
  10196. delta: 1
  10197. });
  10198. },
  10199. switchChange(type, e) {
  10200. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10201. }
  10202. }
  10203. };
  10204. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10205. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10206. vue.createElementVNode("view", { class: "custom-header" }, [
  10207. vue.createElementVNode("view", {
  10208. class: "header-left",
  10209. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10210. }, [
  10211. vue.createElementVNode("image", {
  10212. class: "back-icon",
  10213. src: _imports_0,
  10214. style: { "transform": "rotate(180deg)" }
  10215. })
  10216. ]),
  10217. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10218. vue.createElementVNode("view", { class: "header-right" })
  10219. ]),
  10220. vue.createElementVNode("view", { class: "header-placeholder" }),
  10221. vue.createElementVNode("view", { class: "group-card" }, [
  10222. vue.createElementVNode("view", { class: "list-item" }, [
  10223. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10224. vue.createElementVNode(
  10225. "switch",
  10226. {
  10227. checked: "",
  10228. color: "#FF5722",
  10229. style: { "transform": "scale(0.8)" },
  10230. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10231. },
  10232. null,
  10233. 32
  10234. /* NEED_HYDRATION */
  10235. )
  10236. ]),
  10237. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10238. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10239. vue.createElementVNode(
  10240. "switch",
  10241. {
  10242. checked: "",
  10243. color: "#FF5722",
  10244. style: { "transform": "scale(0.8)" },
  10245. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10246. },
  10247. null,
  10248. 32
  10249. /* NEED_HYDRATION */
  10250. )
  10251. ])
  10252. ]),
  10253. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10254. ]);
  10255. }
  10256. 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"]]);
  10257. const _sfc_main$a = {
  10258. data() {
  10259. return {};
  10260. },
  10261. methods: {
  10262. navBack() {
  10263. uni.navigateBack({
  10264. delta: 1
  10265. });
  10266. }
  10267. }
  10268. };
  10269. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  10270. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10271. vue.createElementVNode("view", { class: "custom-header" }, [
  10272. vue.createElementVNode("view", {
  10273. class: "header-left",
  10274. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10275. }, [
  10276. vue.createElementVNode("image", {
  10277. class: "back-icon",
  10278. src: _imports_0,
  10279. style: { "transform": "rotate(180deg)" }
  10280. })
  10281. ]),
  10282. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10283. vue.createElementVNode("view", { class: "header-right" })
  10284. ]),
  10285. vue.createElementVNode("view", { class: "header-placeholder" }),
  10286. vue.createElementVNode("view", { class: "logo-area" }, [
  10287. vue.createElementVNode("image", {
  10288. class: "app-logo",
  10289. src: _imports_1$8,
  10290. mode: "aspectFit"
  10291. }),
  10292. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10293. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10294. ]),
  10295. vue.createElementVNode("view", { class: "group-card" }, [
  10296. vue.createElementVNode("view", { class: "list-item" }, [
  10297. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10298. vue.createElementVNode("image", {
  10299. class: "arrow-icon",
  10300. src: _imports_3
  10301. })
  10302. ]),
  10303. vue.createElementVNode("view", { class: "list-item" }, [
  10304. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10305. vue.createElementVNode("image", {
  10306. class: "arrow-icon",
  10307. src: _imports_3
  10308. })
  10309. ]),
  10310. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10311. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10312. vue.createElementVNode("view", { class: "item-right" }, [
  10313. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10314. vue.createElementVNode("image", {
  10315. class: "arrow-icon",
  10316. src: _imports_3
  10317. })
  10318. ])
  10319. ])
  10320. ])
  10321. ]);
  10322. }
  10323. 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"]]);
  10324. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10325. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10326. const _sfc_main$9 = {
  10327. data() {
  10328. return {
  10329. currentTab: 0,
  10330. list: [
  10331. {
  10332. title: "订单服务费用",
  10333. desc: "订单 T1002839 完成结算",
  10334. time: "2026-02-03 14:30",
  10335. amount: "20.00",
  10336. type: "income",
  10337. tag: "订单"
  10338. },
  10339. {
  10340. title: "奖励费用",
  10341. desc: "早高峰冲单奖励",
  10342. time: "2026-02-03 10:00",
  10343. amount: "15.00",
  10344. type: "income",
  10345. tag: "奖励"
  10346. },
  10347. {
  10348. title: "惩罚金额",
  10349. desc: "超时送达扣款",
  10350. time: "2026-02-02 18:20",
  10351. amount: "-10.00",
  10352. type: "expense",
  10353. tag: "惩罚"
  10354. },
  10355. {
  10356. title: "后台转账",
  10357. desc: "2026年1月工资发放",
  10358. time: "2026-02-01 09:00",
  10359. amount: "3500.00",
  10360. type: "income",
  10361. tag: "工资"
  10362. }
  10363. ]
  10364. };
  10365. },
  10366. computed: {
  10367. displayList() {
  10368. if (this.currentTab === 0)
  10369. return this.list;
  10370. if (this.currentTab === 1)
  10371. return this.list.filter((item) => item.type === "income");
  10372. if (this.currentTab === 2)
  10373. return this.list.filter((item) => item.type === "expense");
  10374. return [];
  10375. }
  10376. },
  10377. methods: {
  10378. navBack() {
  10379. uni.navigateBack();
  10380. },
  10381. navToBill() {
  10382. uni.navigateTo({
  10383. url: "/pages/mine/wallet/bill"
  10384. });
  10385. },
  10386. switchTab(index) {
  10387. this.currentTab = index;
  10388. }
  10389. }
  10390. };
  10391. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10392. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10393. vue.createElementVNode("view", { class: "nav-bar" }, [
  10394. vue.createElementVNode("view", {
  10395. class: "nav-left",
  10396. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10397. }, [
  10398. vue.createElementVNode("image", {
  10399. class: "back-icon",
  10400. src: _imports_0
  10401. })
  10402. ]),
  10403. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10404. vue.createElementVNode("view", { class: "nav-right" })
  10405. ]),
  10406. vue.createElementVNode("view", { class: "wallet-card" }, [
  10407. vue.createElementVNode("view", { class: "bg-circle big" }),
  10408. vue.createElementVNode("view", { class: "bg-circle small" }),
  10409. vue.createElementVNode("view", { class: "card-content" }, [
  10410. vue.createElementVNode("view", { class: "card-top" }, [
  10411. vue.createElementVNode("view", { class: "app-info" }, [
  10412. vue.createElementVNode("image", {
  10413. class: "app-logo",
  10414. src: _imports_1$2,
  10415. mode: "aspectFit"
  10416. }),
  10417. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10418. ]),
  10419. vue.createElementVNode("view", {
  10420. class: "bill-btn",
  10421. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10422. }, [
  10423. vue.createElementVNode("text", null, "账单")
  10424. ])
  10425. ]),
  10426. vue.createElementVNode("view", { class: "balance-container" }, [
  10427. vue.createElementVNode("view", { class: "balance-main" }, [
  10428. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10429. vue.createElementVNode("text", { class: "balance-num" }, "2575.00")
  10430. ]),
  10431. vue.createElementVNode("view", { class: "balance-pending" }, [
  10432. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10433. vue.createElementVNode("text", { class: "pending-num" }, "580.00")
  10434. ])
  10435. ])
  10436. ])
  10437. ]),
  10438. vue.createElementVNode("view", { class: "record-container" }, [
  10439. vue.createElementVNode("view", { class: "record-header" }, [
  10440. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10441. vue.createElementVNode("view", {
  10442. class: "header-more",
  10443. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10444. }, [
  10445. vue.createElementVNode("text", null, "查看全部"),
  10446. vue.createElementVNode("image", {
  10447. class: "more-icon",
  10448. src: _imports_2$2
  10449. })
  10450. ])
  10451. ]),
  10452. vue.createElementVNode("view", { class: "tabs-row" }, [
  10453. vue.createElementVNode(
  10454. "view",
  10455. {
  10456. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10457. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10458. },
  10459. [
  10460. vue.createElementVNode("text", null, "全部"),
  10461. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10462. key: 0,
  10463. class: "tab-line"
  10464. })) : vue.createCommentVNode("v-if", true)
  10465. ],
  10466. 2
  10467. /* CLASS */
  10468. ),
  10469. vue.createElementVNode(
  10470. "view",
  10471. {
  10472. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10473. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10474. },
  10475. [
  10476. vue.createElementVNode("text", null, "收入"),
  10477. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10478. key: 0,
  10479. class: "tab-line"
  10480. })) : vue.createCommentVNode("v-if", true)
  10481. ],
  10482. 2
  10483. /* CLASS */
  10484. ),
  10485. vue.createElementVNode(
  10486. "view",
  10487. {
  10488. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10489. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  10490. },
  10491. [
  10492. vue.createElementVNode("text", null, "支出"),
  10493. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10494. key: 0,
  10495. class: "tab-line"
  10496. })) : vue.createCommentVNode("v-if", true)
  10497. ],
  10498. 2
  10499. /* CLASS */
  10500. )
  10501. ]),
  10502. vue.createElementVNode("view", { class: "record-list" }, [
  10503. (vue.openBlock(true), vue.createElementBlock(
  10504. vue.Fragment,
  10505. null,
  10506. vue.renderList($options.displayList, (item, index) => {
  10507. return vue.openBlock(), vue.createElementBlock("view", {
  10508. class: "list-item",
  10509. key: index
  10510. }, [
  10511. vue.createElementVNode("view", { class: "item-left" }, [
  10512. vue.createElementVNode(
  10513. "text",
  10514. { class: "item-title" },
  10515. vue.toDisplayString(item.title),
  10516. 1
  10517. /* TEXT */
  10518. ),
  10519. vue.createElementVNode(
  10520. "text",
  10521. { class: "item-desc" },
  10522. vue.toDisplayString(item.desc),
  10523. 1
  10524. /* TEXT */
  10525. ),
  10526. vue.createElementVNode(
  10527. "text",
  10528. { class: "item-time" },
  10529. vue.toDisplayString(item.time),
  10530. 1
  10531. /* TEXT */
  10532. )
  10533. ]),
  10534. vue.createElementVNode("view", { class: "item-right" }, [
  10535. vue.createElementVNode(
  10536. "text",
  10537. {
  10538. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10539. },
  10540. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10541. 3
  10542. /* TEXT, CLASS */
  10543. ),
  10544. vue.createElementVNode("view", { class: "item-tag" }, [
  10545. vue.createElementVNode(
  10546. "text",
  10547. null,
  10548. vue.toDisplayString(item.tag),
  10549. 1
  10550. /* TEXT */
  10551. )
  10552. ])
  10553. ])
  10554. ]);
  10555. }),
  10556. 128
  10557. /* KEYED_FRAGMENT */
  10558. ))
  10559. ])
  10560. ])
  10561. ]);
  10562. }
  10563. 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"]]);
  10564. const _sfc_main$8 = {
  10565. data() {
  10566. return {
  10567. currentTab: 0,
  10568. // 模拟数据结构
  10569. groups: [
  10570. {
  10571. month: "2月 2026",
  10572. income: "35.00",
  10573. expense: "10.00",
  10574. items: [
  10575. {
  10576. title: "订单服务费用",
  10577. desc: "订单完成",
  10578. time: "02-03 14:30",
  10579. amount: "20.00",
  10580. type: "income",
  10581. tag: "订单"
  10582. },
  10583. {
  10584. title: "奖励费用",
  10585. desc: "早高峰奖励",
  10586. // shortened to match ui better
  10587. time: "02-03 10:00",
  10588. amount: "15.00",
  10589. type: "income",
  10590. tag: "奖励"
  10591. },
  10592. {
  10593. title: "惩罚金额",
  10594. desc: "超时送达",
  10595. time: "02-02 18:20",
  10596. amount: "-10.00",
  10597. type: "expense",
  10598. tag: "惩罚"
  10599. }
  10600. ]
  10601. },
  10602. {
  10603. month: "1月 2026",
  10604. income: "3500.00",
  10605. expense: "100.00",
  10606. items: [
  10607. {
  10608. title: "后台转账",
  10609. desc: "1月工资发放",
  10610. time: "01-31 09:00",
  10611. amount: "3500.00",
  10612. type: "income",
  10613. tag: "工资"
  10614. },
  10615. {
  10616. title: "装备扣款",
  10617. desc: "装备费用",
  10618. time: "01-15 10:00",
  10619. amount: "-100.00",
  10620. type: "expense",
  10621. tag: "扣款"
  10622. }
  10623. ]
  10624. }
  10625. ]
  10626. };
  10627. },
  10628. computed: {
  10629. displayGroups() {
  10630. if (this.currentTab === 0)
  10631. return this.groups;
  10632. return this.groups.map((group) => {
  10633. const filteredItems = group.items.filter((item) => {
  10634. const type = this.currentTab === 1 ? "income" : "expense";
  10635. return item.type === type;
  10636. });
  10637. return {
  10638. ...group,
  10639. items: filteredItems
  10640. };
  10641. }).filter((group) => group.items.length > 0);
  10642. }
  10643. },
  10644. methods: {
  10645. navBack() {
  10646. uni.navigateBack();
  10647. },
  10648. switchTab(index) {
  10649. this.currentTab = index;
  10650. }
  10651. }
  10652. };
  10653. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  10654. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10655. vue.createElementVNode("view", { class: "nav-bar" }, [
  10656. vue.createElementVNode("view", {
  10657. class: "nav-left",
  10658. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10659. }, [
  10660. vue.createElementVNode("image", {
  10661. class: "back-icon",
  10662. src: _imports_0
  10663. })
  10664. ]),
  10665. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  10666. vue.createElementVNode("view", { class: "nav-right" })
  10667. ]),
  10668. vue.createElementVNode("view", { class: "content-area" }, [
  10669. vue.createElementVNode("view", { class: "tabs-row" }, [
  10670. vue.createElementVNode(
  10671. "view",
  10672. {
  10673. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10674. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  10675. },
  10676. [
  10677. vue.createElementVNode("text", null, "全部"),
  10678. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10679. key: 0,
  10680. class: "tab-line"
  10681. })) : vue.createCommentVNode("v-if", true)
  10682. ],
  10683. 2
  10684. /* CLASS */
  10685. ),
  10686. vue.createElementVNode(
  10687. "view",
  10688. {
  10689. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10690. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  10691. },
  10692. [
  10693. vue.createElementVNode("text", null, "收入"),
  10694. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10695. key: 0,
  10696. class: "tab-line"
  10697. })) : vue.createCommentVNode("v-if", true)
  10698. ],
  10699. 2
  10700. /* CLASS */
  10701. ),
  10702. vue.createElementVNode(
  10703. "view",
  10704. {
  10705. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10706. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  10707. },
  10708. [
  10709. vue.createElementVNode("text", null, "支出"),
  10710. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10711. key: 0,
  10712. class: "tab-line"
  10713. })) : vue.createCommentVNode("v-if", true)
  10714. ],
  10715. 2
  10716. /* CLASS */
  10717. )
  10718. ]),
  10719. vue.createElementVNode("scroll-view", {
  10720. "scroll-y": "",
  10721. class: "bill-list"
  10722. }, [
  10723. (vue.openBlock(true), vue.createElementBlock(
  10724. vue.Fragment,
  10725. null,
  10726. vue.renderList($options.displayGroups, (group, gIndex) => {
  10727. return vue.openBlock(), vue.createElementBlock("view", {
  10728. key: gIndex,
  10729. class: "month-group"
  10730. }, [
  10731. vue.createElementVNode("view", { class: "group-header" }, [
  10732. vue.createElementVNode(
  10733. "text",
  10734. { class: "month-title" },
  10735. vue.toDisplayString(group.month),
  10736. 1
  10737. /* TEXT */
  10738. ),
  10739. vue.createElementVNode(
  10740. "text",
  10741. { class: "month-summary" },
  10742. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  10743. 1
  10744. /* TEXT */
  10745. )
  10746. ]),
  10747. (vue.openBlock(true), vue.createElementBlock(
  10748. vue.Fragment,
  10749. null,
  10750. vue.renderList(group.items, (item, index) => {
  10751. return vue.openBlock(), vue.createElementBlock("view", {
  10752. class: "list-item",
  10753. key: index
  10754. }, [
  10755. vue.createElementVNode(
  10756. "view",
  10757. {
  10758. class: vue.normalizeClass(["item-icon-box", item.type])
  10759. },
  10760. [
  10761. vue.createElementVNode(
  10762. "text",
  10763. { class: "item-icon-symbol" },
  10764. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  10765. 1
  10766. /* TEXT */
  10767. )
  10768. ],
  10769. 2
  10770. /* CLASS */
  10771. ),
  10772. vue.createElementVNode("view", { class: "item-center" }, [
  10773. vue.createElementVNode(
  10774. "text",
  10775. { class: "item-title" },
  10776. vue.toDisplayString(item.title),
  10777. 1
  10778. /* TEXT */
  10779. ),
  10780. vue.createElementVNode(
  10781. "text",
  10782. { class: "item-desc" },
  10783. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  10784. 1
  10785. /* TEXT */
  10786. )
  10787. ]),
  10788. vue.createElementVNode("view", { class: "item-right" }, [
  10789. vue.createElementVNode(
  10790. "text",
  10791. {
  10792. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10793. },
  10794. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10795. 3
  10796. /* TEXT, CLASS */
  10797. ),
  10798. vue.createElementVNode("view", { class: "item-tag" }, [
  10799. vue.createElementVNode(
  10800. "text",
  10801. null,
  10802. vue.toDisplayString(item.tag),
  10803. 1
  10804. /* TEXT */
  10805. )
  10806. ])
  10807. ])
  10808. ]);
  10809. }),
  10810. 128
  10811. /* KEYED_FRAGMENT */
  10812. ))
  10813. ]);
  10814. }),
  10815. 128
  10816. /* KEYED_FRAGMENT */
  10817. )),
  10818. vue.createElementVNode("view", { class: "list-padding-bottom" })
  10819. ])
  10820. ])
  10821. ]);
  10822. }
  10823. 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"]]);
  10824. const _sfc_main$7 = {
  10825. data() {
  10826. return {
  10827. currentIndex: 2,
  10828. // 默认选中 L3
  10829. levels: [
  10830. {
  10831. id: "L1",
  10832. name: "青铜履约者",
  10833. score: "需成长值 0",
  10834. isCurrent: false,
  10835. benefits: [
  10836. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" }
  10837. ]
  10838. },
  10839. {
  10840. id: "L2",
  10841. name: "白银履约者",
  10842. score: "需成长值 200",
  10843. isCurrent: false,
  10844. benefits: [
  10845. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" },
  10846. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单", icon: "" }
  10847. ]
  10848. },
  10849. {
  10850. id: "L3",
  10851. name: "黄金履约者",
  10852. score: "需成长值 500",
  10853. isCurrent: true,
  10854. benefits: [
  10855. { name: "极速提现", desc: "提现申请 2 小时内极速到账,无需等待。", icon: "" },
  10856. { name: "晋升奖励", desc: "晋升等级可获得现金红包奖励。", icon: "/static/icons/reward.svg" },
  10857. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单。", icon: "" }
  10858. ]
  10859. },
  10860. {
  10861. id: "L4",
  10862. name: "钻石履约者",
  10863. score: "需成长值 2000",
  10864. isCurrent: false,
  10865. benefits: [
  10866. { name: "专属客服", desc: "享受 7x24 小时专属客服通道。", icon: "/static/icons/service.svg" },
  10867. { name: "生日礼包", desc: "生日当天获赠专属礼包。", icon: "/static/icons/reward.svg" },
  10868. { name: "装备免费换", desc: "每年可免费更换一套履约装备。", icon: "" },
  10869. { name: "医疗互助", desc: "享受平台提供的医疗互助保障。", icon: "" }
  10870. ]
  10871. }
  10872. ],
  10873. isPopupShow: false,
  10874. currentBenefit: null
  10875. };
  10876. },
  10877. computed: {
  10878. currentLevel() {
  10879. return this.levels[this.currentIndex];
  10880. }
  10881. },
  10882. methods: {
  10883. navBack() {
  10884. uni.navigateBack({
  10885. delta: 1
  10886. });
  10887. },
  10888. swiperChange(e) {
  10889. this.currentIndex = e.detail.current;
  10890. },
  10891. changeLevel(index) {
  10892. this.currentIndex = index;
  10893. },
  10894. showBenefitDetail(benefit) {
  10895. this.currentBenefit = benefit;
  10896. this.isPopupShow = true;
  10897. },
  10898. closePopup() {
  10899. this.isPopupShow = false;
  10900. }
  10901. }
  10902. };
  10903. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  10904. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10905. vue.createElementVNode("view", { class: "custom-header" }, [
  10906. vue.createElementVNode("view", {
  10907. class: "header-left",
  10908. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10909. }, [
  10910. vue.createElementVNode("image", {
  10911. class: "back-icon",
  10912. src: _imports_0,
  10913. style: { "transform": "rotate(180deg)" }
  10914. })
  10915. ]),
  10916. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  10917. vue.createElementVNode("view", { class: "header-right" })
  10918. ]),
  10919. vue.createElementVNode("view", { class: "header-placeholder" }),
  10920. vue.createElementVNode("view", { class: "swiper-container" }, [
  10921. vue.createElementVNode("swiper", {
  10922. class: "level-swiper",
  10923. "previous-margin": "80rpx",
  10924. "next-margin": "80rpx",
  10925. current: $data.currentIndex,
  10926. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  10927. }, [
  10928. (vue.openBlock(true), vue.createElementBlock(
  10929. vue.Fragment,
  10930. null,
  10931. vue.renderList($data.levels, (level, index) => {
  10932. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  10933. key: index,
  10934. onClick: ($event) => $options.changeLevel(index)
  10935. }, [
  10936. vue.createElementVNode(
  10937. "view",
  10938. {
  10939. class: vue.normalizeClass(["level-card", "level-card-" + (index + 1)]),
  10940. style: vue.normalizeStyle({ transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)" })
  10941. },
  10942. [
  10943. vue.createElementVNode("view", { class: "card-content" }, [
  10944. vue.createElementVNode("view", { class: "card-header" }, [
  10945. vue.createElementVNode(
  10946. "view",
  10947. { class: "level-badge" },
  10948. vue.toDisplayString(level.id),
  10949. 1
  10950. /* TEXT */
  10951. ),
  10952. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  10953. key: 0,
  10954. class: "current-badge"
  10955. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  10956. ]),
  10957. vue.createElementVNode(
  10958. "text",
  10959. { class: "level-name" },
  10960. vue.toDisplayString(level.name),
  10961. 1
  10962. /* TEXT */
  10963. ),
  10964. vue.createElementVNode(
  10965. "text",
  10966. { class: "level-score" },
  10967. vue.toDisplayString(level.score),
  10968. 1
  10969. /* TEXT */
  10970. ),
  10971. vue.createElementVNode("image", {
  10972. class: "crown-overlay",
  10973. src: _imports_1$4,
  10974. mode: "aspectFit"
  10975. })
  10976. ])
  10977. ],
  10978. 6
  10979. /* CLASS, STYLE */
  10980. )
  10981. ], 8, ["onClick"]);
  10982. }),
  10983. 128
  10984. /* KEYED_FRAGMENT */
  10985. ))
  10986. ], 40, ["current"]),
  10987. vue.createElementVNode("view", { class: "swiper-dots" }, [
  10988. (vue.openBlock(true), vue.createElementBlock(
  10989. vue.Fragment,
  10990. null,
  10991. vue.renderList($data.levels, (item, index) => {
  10992. return vue.openBlock(), vue.createElementBlock(
  10993. "view",
  10994. {
  10995. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  10996. key: index
  10997. },
  10998. null,
  10999. 2
  11000. /* CLASS */
  11001. );
  11002. }),
  11003. 128
  11004. /* KEYED_FRAGMENT */
  11005. ))
  11006. ])
  11007. ]),
  11008. vue.createElementVNode("view", { class: "benefits-title-row" }, [
  11009. vue.createElementVNode(
  11010. "text",
  11011. { class: "benefits-title" },
  11012. vue.toDisplayString($options.currentLevel.id) + " 专属权益",
  11013. 1
  11014. /* TEXT */
  11015. ),
  11016. vue.createElementVNode(
  11017. "text",
  11018. { class: "benefits-count" },
  11019. "(" + vue.toDisplayString($options.currentLevel.benefits.length) + ")",
  11020. 1
  11021. /* TEXT */
  11022. )
  11023. ]),
  11024. vue.createElementVNode("view", { class: "benefits-grid" }, [
  11025. (vue.openBlock(true), vue.createElementBlock(
  11026. vue.Fragment,
  11027. null,
  11028. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11029. return vue.openBlock(), vue.createElementBlock("view", {
  11030. class: "benefit-item",
  11031. key: index,
  11032. onClick: ($event) => $options.showBenefitDetail(benefit)
  11033. }, [
  11034. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11035. benefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  11036. key: 0,
  11037. class: "benefit-icon",
  11038. src: benefit.icon,
  11039. mode: "aspectFit"
  11040. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11041. "view",
  11042. {
  11043. key: 1,
  11044. class: "benefit-icon-placeholder"
  11045. },
  11046. vue.toDisplayString(benefit.name[0]),
  11047. 1
  11048. /* TEXT */
  11049. ))
  11050. ]),
  11051. vue.createElementVNode(
  11052. "text",
  11053. { class: "benefit-name" },
  11054. vue.toDisplayString(benefit.name),
  11055. 1
  11056. /* TEXT */
  11057. )
  11058. ], 8, ["onClick"]);
  11059. }),
  11060. 128
  11061. /* KEYED_FRAGMENT */
  11062. ))
  11063. ]),
  11064. vue.createElementVNode(
  11065. "view",
  11066. {
  11067. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11068. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11069. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11070. }, ["stop", "prevent"]))
  11071. },
  11072. [
  11073. vue.createElementVNode("view", {
  11074. class: "popup-modal",
  11075. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11076. }, ["stop"]))
  11077. }, [
  11078. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11079. $data.currentBenefit && $data.currentBenefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  11080. key: 0,
  11081. class: "benefit-icon-large",
  11082. src: $data.currentBenefit.icon,
  11083. mode: "aspectFit"
  11084. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11085. "view",
  11086. {
  11087. key: 1,
  11088. class: "benefit-icon-placeholder-large"
  11089. },
  11090. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11091. 1
  11092. /* TEXT */
  11093. ))
  11094. ]),
  11095. vue.createElementVNode(
  11096. "text",
  11097. { class: "popup-title" },
  11098. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11099. 1
  11100. /* TEXT */
  11101. ),
  11102. vue.createElementVNode(
  11103. "text",
  11104. { class: "popup-desc" },
  11105. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.desc : ""),
  11106. 1
  11107. /* TEXT */
  11108. ),
  11109. vue.createElementVNode("button", {
  11110. class: "popup-btn",
  11111. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11112. }, "我知道了")
  11113. ])
  11114. ],
  11115. 34
  11116. /* CLASS, NEED_HYDRATION */
  11117. )
  11118. ]);
  11119. }
  11120. 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"]]);
  11121. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11122. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11123. const _sfc_main$6 = {
  11124. data() {
  11125. return {};
  11126. },
  11127. methods: {
  11128. navBack() {
  11129. uni.navigateBack();
  11130. },
  11131. navToOrderMsg() {
  11132. uni.navigateTo({
  11133. url: "/pages/mine/message/order"
  11134. });
  11135. },
  11136. navToSystemMsg() {
  11137. uni.navigateTo({
  11138. url: "/pages/mine/message/system"
  11139. });
  11140. }
  11141. }
  11142. };
  11143. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  11144. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11145. vue.createElementVNode("view", { class: "nav-bar" }, [
  11146. vue.createElementVNode("view", {
  11147. class: "nav-left",
  11148. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11149. }, [
  11150. vue.createElementVNode("image", {
  11151. class: "back-icon",
  11152. src: _imports_0,
  11153. style: { "transform": "rotate(180deg)" }
  11154. })
  11155. ]),
  11156. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11157. vue.createElementVNode("view", { class: "nav-right" }, [
  11158. vue.createElementVNode("view", { class: "more-dots" }, [
  11159. vue.createElementVNode("view", { class: "dot" }),
  11160. vue.createElementVNode("view", { class: "dot" }),
  11161. vue.createElementVNode("view", { class: "dot" })
  11162. ])
  11163. ])
  11164. ]),
  11165. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11166. vue.createElementVNode("view", { class: "message-list" }, [
  11167. vue.createElementVNode("view", {
  11168. class: "message-item",
  11169. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11170. }, [
  11171. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11172. vue.createElementVNode("image", {
  11173. class: "msg-icon",
  11174. src: _imports_1$1
  11175. }),
  11176. vue.createElementVNode("view", { class: "red-dot-badge" })
  11177. ]),
  11178. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11179. vue.createElementVNode("view", { class: "top-row" }, [
  11180. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11181. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11182. ]),
  11183. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11184. ])
  11185. ]),
  11186. vue.createElementVNode("view", {
  11187. class: "message-item",
  11188. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11189. }, [
  11190. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11191. vue.createElementVNode("image", {
  11192. class: "msg-icon",
  11193. src: _imports_2$1
  11194. })
  11195. ]),
  11196. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11197. vue.createElementVNode("view", { class: "top-row" }, [
  11198. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11199. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11200. ]),
  11201. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11202. ])
  11203. ])
  11204. ])
  11205. ]);
  11206. }
  11207. 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"]]);
  11208. const _sfc_main$5 = {
  11209. methods: {
  11210. navBack() {
  11211. uni.navigateBack();
  11212. }
  11213. }
  11214. };
  11215. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11216. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11217. vue.createElementVNode("view", { class: "nav-bar" }, [
  11218. vue.createElementVNode("view", {
  11219. class: "nav-left",
  11220. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11221. }, [
  11222. vue.createElementVNode("image", {
  11223. class: "back-icon",
  11224. src: _imports_0,
  11225. style: { "transform": "rotate(180deg)" }
  11226. })
  11227. ]),
  11228. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11229. vue.createElementVNode("view", { class: "nav-right" })
  11230. ]),
  11231. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11232. vue.createElementVNode("view", { class: "msg-group" }, [
  11233. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11234. vue.createElementVNode("view", { class: "msg-card" }, [
  11235. vue.createElementVNode("view", { class: "card-header" }, [
  11236. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11237. vue.createElementVNode("view", { class: "red-dot" })
  11238. ]),
  11239. vue.createElementVNode("view", { class: "card-body" }, [
  11240. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11241. ]),
  11242. vue.createElementVNode("view", { class: "card-footer" }, [
  11243. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11244. vue.createElementVNode("image", {
  11245. class: "arrow-icon",
  11246. src: _imports_3
  11247. })
  11248. ])
  11249. ]),
  11250. vue.createElementVNode("view", { class: "msg-card" }, [
  11251. vue.createElementVNode("view", { class: "card-header" }, [
  11252. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11253. ]),
  11254. vue.createElementVNode("view", { class: "card-body" }, [
  11255. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11256. ]),
  11257. vue.createElementVNode("view", { class: "card-footer" }, [
  11258. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11259. vue.createElementVNode("image", {
  11260. class: "arrow-icon",
  11261. src: _imports_3
  11262. })
  11263. ])
  11264. ])
  11265. ]),
  11266. vue.createElementVNode("view", { class: "msg-group" }, [
  11267. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11268. vue.createElementVNode("view", { class: "msg-card" }, [
  11269. vue.createElementVNode("view", { class: "card-header" }, [
  11270. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11271. ]),
  11272. vue.createElementVNode("view", { class: "card-body" }, [
  11273. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11274. ]),
  11275. vue.createElementVNode("view", { class: "card-footer" }, [
  11276. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11277. vue.createElementVNode("image", {
  11278. class: "arrow-icon",
  11279. src: _imports_3
  11280. })
  11281. ])
  11282. ])
  11283. ])
  11284. ]);
  11285. }
  11286. 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"]]);
  11287. const _sfc_main$4 = {
  11288. methods: {
  11289. navBack() {
  11290. uni.navigateBack();
  11291. },
  11292. navToDetail() {
  11293. uni.navigateTo({
  11294. url: "/pages/mine/message/detail"
  11295. });
  11296. }
  11297. }
  11298. };
  11299. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11300. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11301. vue.createElementVNode("view", { class: "nav-bar" }, [
  11302. vue.createElementVNode("view", {
  11303. class: "nav-left",
  11304. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11305. }, [
  11306. vue.createElementVNode("image", {
  11307. class: "back-icon",
  11308. src: _imports_0,
  11309. style: { "transform": "rotate(180deg)" }
  11310. })
  11311. ]),
  11312. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11313. vue.createElementVNode("view", { class: "nav-right" })
  11314. ]),
  11315. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11316. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11317. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11318. vue.createElementVNode("view", {
  11319. class: "sys-card",
  11320. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11321. }, [
  11322. vue.createElementVNode("view", { class: "sys-header" }, [
  11323. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11324. vue.createElementVNode("view", { class: "red-dot" })
  11325. ]),
  11326. vue.createElementVNode("view", { class: "sys-content" }, [
  11327. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11328. ]),
  11329. vue.createElementVNode("view", { class: "sys-footer" }, [
  11330. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11331. vue.createElementVNode("view", { class: "check-more" }, [
  11332. vue.createElementVNode("text", null, "查看详情"),
  11333. vue.createElementVNode("image", {
  11334. class: "arrow-icon-small",
  11335. src: _imports_3
  11336. })
  11337. ])
  11338. ])
  11339. ]),
  11340. vue.createElementVNode("view", { class: "sys-card" }, [
  11341. vue.createElementVNode("view", { class: "sys-header" }, [
  11342. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11343. ]),
  11344. vue.createElementVNode("view", { class: "sys-content" }, [
  11345. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11346. ]),
  11347. vue.createElementVNode("view", { class: "sys-footer" }, [
  11348. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11349. vue.createElementVNode("view", { class: "check-more" }, [
  11350. vue.createElementVNode("text", null, "查看详情"),
  11351. vue.createElementVNode("image", {
  11352. class: "arrow-icon-small",
  11353. src: _imports_3
  11354. })
  11355. ])
  11356. ])
  11357. ]),
  11358. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11359. vue.createElementVNode("view", { class: "sys-card" }, [
  11360. vue.createElementVNode("view", { class: "sys-header" }, [
  11361. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11362. ]),
  11363. vue.createElementVNode("view", { class: "sys-content" }, [
  11364. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11365. ]),
  11366. vue.createElementVNode("view", { class: "sys-footer" }, [
  11367. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11368. vue.createElementVNode("view", { class: "check-more" }, [
  11369. vue.createElementVNode("text", null, "查看详情"),
  11370. vue.createElementVNode("image", {
  11371. class: "arrow-icon-small",
  11372. src: _imports_3
  11373. })
  11374. ])
  11375. ])
  11376. ])
  11377. ])
  11378. ]);
  11379. }
  11380. 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"]]);
  11381. const _sfc_main$3 = {
  11382. methods: {
  11383. navBack() {
  11384. uni.navigateBack();
  11385. }
  11386. }
  11387. };
  11388. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11389. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11390. vue.createElementVNode("view", { class: "nav-bar" }, [
  11391. vue.createElementVNode("view", {
  11392. class: "nav-left",
  11393. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11394. }, [
  11395. vue.createElementVNode("image", {
  11396. class: "back-icon",
  11397. src: _imports_0,
  11398. style: { "transform": "rotate(180deg)" }
  11399. })
  11400. ]),
  11401. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11402. vue.createElementVNode("view", { class: "nav-right" })
  11403. ]),
  11404. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11405. vue.createElementVNode("view", { class: "detail-content" }, [
  11406. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11407. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11408. vue.createElementVNode("view", { class: "detail-body" }, [
  11409. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11410. ]),
  11411. vue.createElementVNode("view", { class: "detail-footer" }, [
  11412. vue.createElementVNode("view", { class: "divider" }),
  11413. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11414. ])
  11415. ])
  11416. ]);
  11417. }
  11418. 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"]]);
  11419. const _imports_1 = "/static/icons/diamond_white.svg";
  11420. const _imports_2 = "/static/icons/star_decor.svg";
  11421. const _sfc_main$2 = {
  11422. data() {
  11423. return {
  11424. currentTab: 0,
  11425. list: [
  11426. {
  11427. title: "订单完成奖励",
  11428. desc: "订单 T1002839 完成",
  11429. time: "2026-02-05 18:42",
  11430. amount: "10",
  11431. type: "income",
  11432. tag: "订单"
  11433. },
  11434. {
  11435. title: "好评奖励",
  11436. desc: "获得五星好评",
  11437. time: "2026-02-05 19:00",
  11438. amount: "5",
  11439. type: "income",
  11440. tag: "奖励"
  11441. },
  11442. {
  11443. title: "超时扣分",
  11444. desc: "订单 T1002830 超时送达",
  11445. time: "2026-02-04 10:20",
  11446. amount: "-10",
  11447. type: "expense",
  11448. tag: "惩罚"
  11449. }
  11450. ]
  11451. };
  11452. },
  11453. computed: {
  11454. displayList() {
  11455. if (this.currentTab === 0)
  11456. return this.list;
  11457. const type = this.currentTab === 1 ? "income" : "expense";
  11458. return this.list.filter((item) => item.type === type);
  11459. }
  11460. },
  11461. methods: {
  11462. navBack() {
  11463. uni.navigateBack();
  11464. },
  11465. navToDetail() {
  11466. uni.navigateTo({
  11467. url: "/pages/mine/points/detail"
  11468. });
  11469. },
  11470. navToEquity() {
  11471. },
  11472. switchTab(index) {
  11473. this.currentTab = index;
  11474. }
  11475. }
  11476. };
  11477. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  11478. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11479. vue.createElementVNode("view", { class: "nav-bar" }, [
  11480. vue.createElementVNode("view", {
  11481. class: "nav-left",
  11482. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11483. }, [
  11484. vue.createElementVNode("image", {
  11485. class: "back-icon",
  11486. src: _imports_0
  11487. })
  11488. ]),
  11489. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  11490. vue.createElementVNode("view", { class: "nav-right" })
  11491. ]),
  11492. vue.createElementVNode("view", { class: "points-card" }, [
  11493. vue.createElementVNode("view", { class: "card-header" }, [
  11494. vue.createElementVNode("view", {
  11495. class: "equity-btn",
  11496. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  11497. }, [
  11498. vue.createElementVNode("image", {
  11499. class: "equity-icon",
  11500. src: _imports_1
  11501. }),
  11502. vue.createElementVNode("text", null, "积分权益")
  11503. ]),
  11504. vue.createElementVNode("view", {
  11505. class: "detail-link",
  11506. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11507. }, [
  11508. vue.createElementVNode("text", null, "明细")
  11509. ])
  11510. ]),
  11511. vue.createElementVNode("view", { class: "card-body" }, [
  11512. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  11513. vue.createElementVNode("text", { class: "value" }, "1200")
  11514. ]),
  11515. vue.createElementVNode("image", {
  11516. class: "bg-decor",
  11517. src: _imports_2,
  11518. mode: "aspectFit"
  11519. })
  11520. ]),
  11521. vue.createElementVNode("view", { class: "record-container" }, [
  11522. vue.createElementVNode("view", { class: "record-header" }, [
  11523. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  11524. vue.createElementVNode("view", {
  11525. class: "header-more",
  11526. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11527. }, [
  11528. vue.createElementVNode("text", null, "查看全部"),
  11529. vue.createElementVNode("image", {
  11530. class: "more-icon",
  11531. src: _imports_3
  11532. })
  11533. ])
  11534. ]),
  11535. vue.createElementVNode("view", { class: "tabs-row" }, [
  11536. vue.createElementVNode(
  11537. "view",
  11538. {
  11539. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11540. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  11541. },
  11542. [
  11543. vue.createElementVNode("text", null, "全部"),
  11544. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11545. key: 0,
  11546. class: "tab-line"
  11547. })) : vue.createCommentVNode("v-if", true)
  11548. ],
  11549. 2
  11550. /* CLASS */
  11551. ),
  11552. vue.createElementVNode(
  11553. "view",
  11554. {
  11555. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11556. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  11557. },
  11558. [
  11559. vue.createElementVNode("text", null, "获取"),
  11560. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11561. key: 0,
  11562. class: "tab-line"
  11563. })) : vue.createCommentVNode("v-if", true)
  11564. ],
  11565. 2
  11566. /* CLASS */
  11567. ),
  11568. vue.createElementVNode(
  11569. "view",
  11570. {
  11571. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11572. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  11573. },
  11574. [
  11575. vue.createElementVNode("text", null, "扣减"),
  11576. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11577. key: 0,
  11578. class: "tab-line"
  11579. })) : vue.createCommentVNode("v-if", true)
  11580. ],
  11581. 2
  11582. /* CLASS */
  11583. )
  11584. ]),
  11585. vue.createElementVNode("view", { class: "record-list" }, [
  11586. (vue.openBlock(true), vue.createElementBlock(
  11587. vue.Fragment,
  11588. null,
  11589. vue.renderList($options.displayList, (item, index) => {
  11590. return vue.openBlock(), vue.createElementBlock("view", {
  11591. class: "list-item",
  11592. key: index
  11593. }, [
  11594. vue.createElementVNode("view", { class: "item-left" }, [
  11595. vue.createElementVNode(
  11596. "text",
  11597. { class: "item-title" },
  11598. vue.toDisplayString(item.title),
  11599. 1
  11600. /* TEXT */
  11601. ),
  11602. vue.createElementVNode(
  11603. "text",
  11604. { class: "item-desc" },
  11605. vue.toDisplayString(item.desc),
  11606. 1
  11607. /* TEXT */
  11608. ),
  11609. vue.createElementVNode(
  11610. "text",
  11611. { class: "item-time" },
  11612. vue.toDisplayString(item.time),
  11613. 1
  11614. /* TEXT */
  11615. )
  11616. ]),
  11617. vue.createElementVNode("view", { class: "item-right" }, [
  11618. vue.createElementVNode(
  11619. "text",
  11620. {
  11621. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11622. },
  11623. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11624. 3
  11625. /* TEXT, CLASS */
  11626. ),
  11627. vue.createElementVNode("view", { class: "item-tag" }, [
  11628. vue.createElementVNode(
  11629. "text",
  11630. null,
  11631. vue.toDisplayString(item.tag),
  11632. 1
  11633. /* TEXT */
  11634. )
  11635. ])
  11636. ])
  11637. ]);
  11638. }),
  11639. 128
  11640. /* KEYED_FRAGMENT */
  11641. ))
  11642. ])
  11643. ])
  11644. ]);
  11645. }
  11646. 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"]]);
  11647. const _sfc_main$1 = {
  11648. data() {
  11649. return {
  11650. currentTab: 0,
  11651. // 模拟数据结构
  11652. groups: [
  11653. {
  11654. month: "2月 2026",
  11655. income: "15",
  11656. expense: "10",
  11657. items: [
  11658. {
  11659. title: "订单完成奖励",
  11660. desc: "订单完成",
  11661. time: "02-05 18:42",
  11662. amount: "10",
  11663. type: "income",
  11664. tag: "订单"
  11665. },
  11666. {
  11667. title: "好评奖励",
  11668. desc: "五星好评",
  11669. time: "02-05 19:00",
  11670. amount: "5",
  11671. type: "income",
  11672. tag: "奖励"
  11673. },
  11674. {
  11675. title: "超时扣分",
  11676. desc: "订单超时",
  11677. time: "02-04 10:20",
  11678. amount: "-10",
  11679. type: "expense",
  11680. tag: "惩罚"
  11681. }
  11682. ]
  11683. },
  11684. {
  11685. month: "1月 2026",
  11686. income: "100",
  11687. expense: "0",
  11688. items: [
  11689. {
  11690. title: "新用户奖励",
  11691. desc: "注册赠送",
  11692. time: "01-10 09:00",
  11693. amount: "100",
  11694. type: "income",
  11695. tag: "系统"
  11696. }
  11697. ]
  11698. }
  11699. ]
  11700. };
  11701. },
  11702. computed: {
  11703. displayGroups() {
  11704. if (this.currentTab === 0)
  11705. return this.groups;
  11706. return this.groups.map((group) => {
  11707. const filteredItems = group.items.filter((item) => {
  11708. const type = this.currentTab === 1 ? "income" : "expense";
  11709. return item.type === type;
  11710. });
  11711. return {
  11712. ...group,
  11713. items: filteredItems
  11714. };
  11715. }).filter((group) => group.items.length > 0);
  11716. }
  11717. },
  11718. methods: {
  11719. navBack() {
  11720. uni.navigateBack();
  11721. },
  11722. switchTab(index) {
  11723. this.currentTab = index;
  11724. }
  11725. }
  11726. };
  11727. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  11728. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11729. vue.createElementVNode("view", { class: "nav-bar" }, [
  11730. vue.createElementVNode("view", {
  11731. class: "nav-left",
  11732. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11733. }, [
  11734. vue.createElementVNode("image", {
  11735. class: "back-icon",
  11736. src: _imports_0
  11737. })
  11738. ]),
  11739. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  11740. vue.createElementVNode("view", { class: "nav-right" })
  11741. ]),
  11742. vue.createElementVNode("view", { class: "content-area" }, [
  11743. vue.createElementVNode("view", { class: "tabs-row" }, [
  11744. vue.createElementVNode(
  11745. "view",
  11746. {
  11747. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11748. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11749. },
  11750. [
  11751. vue.createElementVNode("text", null, "全部"),
  11752. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11753. key: 0,
  11754. class: "tab-line"
  11755. })) : vue.createCommentVNode("v-if", true)
  11756. ],
  11757. 2
  11758. /* CLASS */
  11759. ),
  11760. vue.createElementVNode(
  11761. "view",
  11762. {
  11763. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11764. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11765. },
  11766. [
  11767. vue.createElementVNode("text", null, "获取"),
  11768. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11769. key: 0,
  11770. class: "tab-line"
  11771. })) : vue.createCommentVNode("v-if", true)
  11772. ],
  11773. 2
  11774. /* CLASS */
  11775. ),
  11776. vue.createElementVNode(
  11777. "view",
  11778. {
  11779. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11780. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11781. },
  11782. [
  11783. vue.createElementVNode("text", null, "扣减"),
  11784. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11785. key: 0,
  11786. class: "tab-line"
  11787. })) : vue.createCommentVNode("v-if", true)
  11788. ],
  11789. 2
  11790. /* CLASS */
  11791. )
  11792. ]),
  11793. vue.createElementVNode("scroll-view", {
  11794. "scroll-y": "",
  11795. class: "bill-list"
  11796. }, [
  11797. (vue.openBlock(true), vue.createElementBlock(
  11798. vue.Fragment,
  11799. null,
  11800. vue.renderList($options.displayGroups, (group, gIndex) => {
  11801. return vue.openBlock(), vue.createElementBlock("view", {
  11802. key: gIndex,
  11803. class: "month-group"
  11804. }, [
  11805. vue.createElementVNode("view", { class: "group-header" }, [
  11806. vue.createElementVNode(
  11807. "text",
  11808. { class: "month-title" },
  11809. vue.toDisplayString(group.month),
  11810. 1
  11811. /* TEXT */
  11812. ),
  11813. vue.createElementVNode(
  11814. "text",
  11815. { class: "month-summary" },
  11816. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  11817. 1
  11818. /* TEXT */
  11819. )
  11820. ]),
  11821. (vue.openBlock(true), vue.createElementBlock(
  11822. vue.Fragment,
  11823. null,
  11824. vue.renderList(group.items, (item, index) => {
  11825. return vue.openBlock(), vue.createElementBlock("view", {
  11826. class: "list-item",
  11827. key: index
  11828. }, [
  11829. vue.createElementVNode(
  11830. "view",
  11831. {
  11832. class: vue.normalizeClass(["item-icon-box", item.type])
  11833. },
  11834. [
  11835. vue.createElementVNode(
  11836. "text",
  11837. { class: "item-icon-symbol" },
  11838. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11839. 1
  11840. /* TEXT */
  11841. )
  11842. ],
  11843. 2
  11844. /* CLASS */
  11845. ),
  11846. vue.createElementVNode("view", { class: "item-center" }, [
  11847. vue.createElementVNode(
  11848. "text",
  11849. { class: "item-title" },
  11850. vue.toDisplayString(item.title),
  11851. 1
  11852. /* TEXT */
  11853. ),
  11854. vue.createElementVNode(
  11855. "text",
  11856. { class: "item-desc" },
  11857. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11858. 1
  11859. /* TEXT */
  11860. )
  11861. ]),
  11862. vue.createElementVNode("view", { class: "item-right" }, [
  11863. vue.createElementVNode(
  11864. "text",
  11865. {
  11866. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11867. },
  11868. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11869. 3
  11870. /* TEXT, CLASS */
  11871. ),
  11872. vue.createElementVNode("view", { class: "item-tag" }, [
  11873. vue.createElementVNode(
  11874. "text",
  11875. null,
  11876. vue.toDisplayString(item.tag),
  11877. 1
  11878. /* TEXT */
  11879. )
  11880. ])
  11881. ])
  11882. ]);
  11883. }),
  11884. 128
  11885. /* KEYED_FRAGMENT */
  11886. ))
  11887. ]);
  11888. }),
  11889. 128
  11890. /* KEYED_FRAGMENT */
  11891. )),
  11892. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11893. ])
  11894. ])
  11895. ]);
  11896. }
  11897. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  11898. __definePage("pages/login/login", PagesLoginLogin);
  11899. __definePage("pages/recruit/landing", PagesRecruitLanding);
  11900. __definePage("pages/recruit/form", PagesRecruitForm);
  11901. __definePage("pages/recruit/auth", PagesRecruitAuth);
  11902. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  11903. __definePage("pages/recruit/success", PagesRecruitSuccess);
  11904. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  11905. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  11906. __definePage("pages/home/index", PagesHomeIndex);
  11907. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  11908. __definePage("pages/orders/index", PagesOrdersIndex);
  11909. __definePage("pages/orders/detail", PagesOrdersDetail);
  11910. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  11911. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  11912. __definePage("pages/mine/rewards", PagesMineRewards);
  11913. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  11914. __definePage("pages/mine/index", PagesMineIndex);
  11915. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  11916. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  11917. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  11918. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  11919. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  11920. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  11921. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  11922. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  11923. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  11924. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  11925. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  11926. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  11927. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  11928. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  11929. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  11930. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  11931. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  11932. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  11933. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  11934. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  11935. const _sfc_main = {
  11936. onLaunch: function() {
  11937. formatAppLog("log", "at App.vue:6", "App Launch");
  11938. if (isLoggedIn()) {
  11939. uni.switchTab({
  11940. url: "/pages/home/index"
  11941. });
  11942. }
  11943. },
  11944. onShow: function() {
  11945. formatAppLog("log", "at App.vue:15", "App Show");
  11946. },
  11947. onHide: function() {
  11948. formatAppLog("log", "at App.vue:18", "App Hide");
  11949. }
  11950. };
  11951. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  11952. function createApp() {
  11953. const app = vue.createVueApp(App);
  11954. return {
  11955. app
  11956. };
  11957. }
  11958. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  11959. uni.Vuex = __Vuex__;
  11960. uni.Pinia = __Pinia__;
  11961. __app__.provide("__globalStyles", __uniConfig.styles);
  11962. __app__._component.mpType = "app";
  11963. __app__._component.render = () => {
  11964. };
  11965. __app__.mount("#app");
  11966. })(Vue);