app-service.js 489 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal();
  15. ArrayBuffer = global.ArrayBuffer;
  16. Int8Array = global.Int8Array;
  17. Uint8Array = global.Uint8Array;
  18. Uint8ClampedArray = global.Uint8ClampedArray;
  19. Int16Array = global.Int16Array;
  20. Uint16Array = global.Uint16Array;
  21. Int32Array = global.Int32Array;
  22. Uint32Array = global.Uint32Array;
  23. Float32Array = global.Float32Array;
  24. Float64Array = global.Float64Array;
  25. BigInt64Array = global.BigInt64Array;
  26. BigUint64Array = global.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. const _export_sfc = (sfc, props) => {
  35. const target = sfc.__vccOpts || sfc;
  36. for (const [key, val] of props) {
  37. target[key] = val;
  38. }
  39. return target;
  40. };
  41. const _sfc_main$D = {
  42. name: "privacy-popup",
  43. props: {
  44. visible: {
  45. type: Boolean,
  46. default: false
  47. },
  48. title: {
  49. type: String,
  50. default: "协议标题"
  51. },
  52. content: {
  53. type: String,
  54. // 备用,主要用 slot
  55. default: ""
  56. }
  57. },
  58. methods: {
  59. close() {
  60. this.$emit("close");
  61. }
  62. }
  63. };
  64. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  65. return $props.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  66. key: 0,
  67. class: "popup-mask",
  68. onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  69. }, ["stop"]))
  70. }, [
  71. vue.createElementVNode("view", { class: "popup-content" }, [
  72. vue.createElementVNode("view", { class: "popup-header" }, [
  73. vue.createElementVNode(
  74. "text",
  75. { class: "popup-title" },
  76. vue.toDisplayString($props.title),
  77. 1
  78. /* TEXT */
  79. ),
  80. vue.createElementVNode("view", {
  81. class: "close-icon",
  82. onClick: _cache[0] || (_cache[0] = (...args) => $options.close && $options.close(...args))
  83. }, "×")
  84. ]),
  85. vue.createElementVNode("scroll-view", {
  86. "scroll-y": "",
  87. class: "popup-body"
  88. }, [
  89. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  90. vue.createElementVNode(
  91. "text",
  92. { class: "default-text" },
  93. vue.toDisplayString($props.content),
  94. 1
  95. /* TEXT */
  96. )
  97. ], true)
  98. ]),
  99. vue.createElementVNode("view", { class: "popup-footer" }, [
  100. vue.createElementVNode("button", {
  101. class: "confirm-btn",
  102. onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args))
  103. }, "我知道了")
  104. ])
  105. ])
  106. ])) : vue.createCommentVNode("v-if", true);
  107. }
  108. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-af3fbef1"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/privacy-popup/privacy-popup.vue"]]);
  109. function formatAppLog(type, filename, ...args) {
  110. if (uni.__log__) {
  111. uni.__log__(type, filename, ...args);
  112. } else {
  113. console[type].apply(console, [...args, filename]);
  114. }
  115. }
  116. function resolveEasycom(component, easycom) {
  117. return typeof component === "string" ? easycom : component;
  118. }
  119. const BASE_URL = "http://192.168.0.105:8080";
  120. const CLIENT_ID = "fe63fea7be31b0200b496d08bc6b517d";
  121. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  122. const TOKEN_KEY = "fulfiller_token";
  123. const USER_INFO_KEY = "fulfiller_user_info";
  124. function getToken() {
  125. return uni.getStorageSync(TOKEN_KEY) || "";
  126. }
  127. function setToken(token) {
  128. uni.setStorageSync(TOKEN_KEY, token);
  129. }
  130. function removeToken() {
  131. uni.removeStorageSync(TOKEN_KEY);
  132. }
  133. function isLoggedIn() {
  134. return !!getToken();
  135. }
  136. function removeUserInfo() {
  137. uni.removeStorageSync(USER_INFO_KEY);
  138. }
  139. function clearAuth() {
  140. removeToken();
  141. removeUserInfo();
  142. }
  143. function request(options = {}) {
  144. const {
  145. url,
  146. method = "GET",
  147. data,
  148. header = {},
  149. needToken = true
  150. } = options;
  151. const headers = {
  152. "Content-Type": "application/json;charset=utf-8",
  153. "clientid": CLIENT_ID,
  154. "X-Platform-Code": PLATFORM_CODE,
  155. ...header
  156. };
  157. if (needToken) {
  158. const token = getToken();
  159. if (token) {
  160. headers["Authorization"] = "Bearer " + token;
  161. }
  162. }
  163. return new Promise((resolve, reject) => {
  164. uni.request({
  165. url: BASE_URL + url,
  166. method: method.toUpperCase(),
  167. data,
  168. header: headers,
  169. success: (res) => {
  170. formatAppLog("log", "at utils/request.js:50", res);
  171. const statusCode = res.statusCode;
  172. const code = res.data.code;
  173. const msg = res.data.msg;
  174. res.data.data;
  175. if (statusCode !== 200) {
  176. const errorMsg = msg || `请求失败(${statusCode})`;
  177. uni.showToast({ title: errorMsg, icon: "none" });
  178. return reject(new Error(errorMsg));
  179. }
  180. if (code === 401) {
  181. clearAuth();
  182. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  183. setTimeout(() => {
  184. uni.reLaunch({ url: "/pages/login/login" });
  185. }, 1500);
  186. return reject(new Error("未授权"));
  187. }
  188. if (code !== void 0 && code !== 200) {
  189. const errorMsg = msg || "操作失败";
  190. uni.showToast({ title: errorMsg, icon: "none" });
  191. return reject(new Error(errorMsg));
  192. }
  193. resolve(res.data);
  194. },
  195. fail: (err) => {
  196. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  197. reject(err);
  198. }
  199. });
  200. });
  201. }
  202. function loginByPassword(username, password) {
  203. return request({
  204. url: "/auth/login",
  205. method: "POST",
  206. needToken: false,
  207. data: {
  208. // tenantId: TENANT_ID,
  209. // platformId: PLATFORM_ID,
  210. userSource: 1,
  211. username,
  212. password,
  213. clientId: CLIENT_ID,
  214. grantType: "password",
  215. source: 1
  216. }
  217. });
  218. }
  219. function logout() {
  220. return request({
  221. url: "/auth/logout",
  222. method: "POST"
  223. });
  224. }
  225. const logic$9 = {
  226. data() {
  227. return {
  228. currentTab: 1,
  229. // 0: 免密, 1: 密码
  230. mobile: "",
  231. code: "",
  232. password: "",
  233. showPassword: false,
  234. isAgreed: false,
  235. countDown: 0,
  236. timer: null,
  237. showAgreementModal: false,
  238. agreementTitle: "",
  239. agreementContent: "",
  240. loginLoading: false
  241. };
  242. },
  243. methods: {
  244. showAgreement(type) {
  245. this.agreementTitle = type === 1 ? "用户服务协议" : "隐私政策";
  246. if (type === 1) {
  247. this.agreementContent = "1. 服务条款\n欢迎使用宠宝平台。您在使用本服务时需遵守以下条款...\n\n2. 用户责任\n用户需对自己的行为负责...\n\n3. 账号管理\n请妥善保管您的账号密码...";
  248. } else {
  249. this.agreementContent = "1. 信息收集\n为了提供服务,我们需要收集您的手机号、地理位置、设备信息等必要数据。\n\n2. 信息使用\n您的位置信息将用于订单匹配和路径规划;您的联系方式将用于接单通知和客户沟通。\n\n3. 信息保护\n我们将采取严格的安全措施保护您的个人信息,未经授权不会向第三方披露。";
  250. }
  251. this.showAgreementModal = true;
  252. },
  253. /* async getVerifyCode() {
  254. if (this.currentTab === 1) return;
  255. if (this.countDown > 0) return;
  256. if (!this.mobile || this.mobile.length !== 11) {
  257. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  258. return;
  259. }
  260. try {
  261. const res = await sendSmsCode(this.mobile);
  262. // 发送成功,启动倒计时
  263. this.countDown = 60;
  264. this.timer = setInterval(() => {
  265. this.countDown--;
  266. if (this.countDown <= 0) {
  267. clearInterval(this.timer);
  268. }
  269. }, 1000);
  270. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  271. const devCode = res.data;
  272. if (devCode) {
  273. this.code = devCode;
  274. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  275. } else {
  276. uni.showToast({ title: '验证码已发送', icon: 'none' });
  277. }
  278. } catch (err) {
  279. __f__('error','at pages/login/logic.js:60','发送验证码失败:', err);
  280. }
  281. }, */
  282. async handleLogin() {
  283. var _a;
  284. if (!this.isAgreed) {
  285. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  286. return;
  287. }
  288. if (!this.mobile) {
  289. uni.showToast({ title: "请输入手机号", icon: "none" });
  290. return;
  291. }
  292. if (!this.password) {
  293. uni.showToast({ title: "请输入密码", icon: "none" });
  294. return;
  295. }
  296. if (this.loginLoading)
  297. return;
  298. this.loginLoading = true;
  299. uni.showLoading({
  300. title: "登录中...",
  301. mask: true
  302. });
  303. try {
  304. let res;
  305. res = await loginByPassword(this.mobile, this.password);
  306. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  307. if (token) {
  308. setToken(token);
  309. }
  310. uni.showToast({ title: "登录成功", icon: "success" });
  311. setTimeout(() => {
  312. uni.switchTab({
  313. url: "/pages/home/index"
  314. });
  315. }, 1e3);
  316. } catch (err) {
  317. formatAppLog("error", "at pages/login/logic.js:123", "登录失败:", err);
  318. } finally {
  319. this.loginLoading = false;
  320. uni.hideLoading();
  321. }
  322. },
  323. goToRecruit() {
  324. uni.navigateTo({
  325. url: "/pages/recruit/landing"
  326. });
  327. },
  328. goToForgotPwd() {
  329. uni.navigateTo({
  330. url: "/pages/login/reset-pwd-verify"
  331. });
  332. }
  333. }
  334. };
  335. const _imports_0$3 = "/static/header.png";
  336. const _imports_1$8 = "/static/logo.png";
  337. const _sfc_main$C = {
  338. ...logic$9,
  339. components: {
  340. PrivacyPopup: __easycom_0
  341. }
  342. };
  343. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  344. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  345. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  346. vue.createElementVNode("view", { class: "banner-area" }, [
  347. vue.createElementVNode("image", {
  348. class: "banner-img",
  349. src: _imports_0$3,
  350. mode: "widthFix"
  351. })
  352. ]),
  353. vue.createElementVNode("view", { class: "content-card" }, [
  354. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  355. vue.createElementVNode("image", {
  356. class: "logo-img",
  357. src: _imports_1$8,
  358. mode: "widthFix"
  359. })
  360. ]),
  361. vue.createElementVNode("view", { class: "tabs" }, [
  362. vue.createElementVNode("view", { class: "tab-item active" }, [
  363. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  364. vue.createElementVNode("view", { class: "tab-indicator" })
  365. ])
  366. ]),
  367. vue.createElementVNode("view", { class: "form-area" }, [
  368. vue.createElementVNode("view", { class: "input-group" }, [
  369. vue.createElementVNode("view", { class: "area-code" }, [
  370. vue.createElementVNode("text", null, "+86"),
  371. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  372. ]),
  373. vue.withDirectives(vue.createElementVNode(
  374. "input",
  375. {
  376. class: "input",
  377. type: "number",
  378. placeholder: "手机号",
  379. "placeholder-style": "color: #ccc",
  380. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  381. maxlength: "11"
  382. },
  383. null,
  384. 512
  385. /* NEED_PATCH */
  386. ), [
  387. [vue.vModelText, _ctx.mobile]
  388. ])
  389. ]),
  390. vue.createElementVNode("view", { class: "input-group" }, [
  391. vue.withDirectives(vue.createElementVNode("input", {
  392. class: "input",
  393. password: !_ctx.showPassword,
  394. type: "text",
  395. placeholder: "请输入密码",
  396. "placeholder-style": "color: #ccc",
  397. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  398. }, null, 8, ["password"]), [
  399. [vue.vModelText, _ctx.password]
  400. ]),
  401. vue.createElementVNode("view", {
  402. class: "eye-icon",
  403. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  404. }, [
  405. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  406. key: 0,
  407. class: "svg-icon",
  408. viewBox: "0 0 24 24",
  409. fill: "none",
  410. xmlns: "http://www.w3.org/2000/svg"
  411. }, [
  412. vue.createElementVNode("path", {
  413. 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",
  414. fill: "#CCCCCC"
  415. })
  416. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  417. key: 1,
  418. class: "svg-icon",
  419. viewBox: "0 0 24 24",
  420. fill: "none",
  421. xmlns: "http://www.w3.org/2000/svg"
  422. }, [
  423. vue.createElementVNode("path", {
  424. d: "M12 7C7 7 2.73 10.11 1 14.5",
  425. stroke: "#CCCCCC",
  426. "stroke-width": "2",
  427. "stroke-linecap": "round"
  428. }),
  429. vue.createElementVNode("path", {
  430. d: "M23 14.5C21.27 10.11 17 7 12 7",
  431. stroke: "#CCCCCC",
  432. "stroke-width": "2",
  433. "stroke-linecap": "round"
  434. }),
  435. vue.createElementVNode("path", {
  436. d: "M12 7V4",
  437. stroke: "#CCCCCC",
  438. "stroke-width": "2",
  439. "stroke-linecap": "round"
  440. }),
  441. vue.createElementVNode("path", {
  442. d: "M16 8L18 5",
  443. stroke: "#CCCCCC",
  444. "stroke-width": "2",
  445. "stroke-linecap": "round"
  446. }),
  447. vue.createElementVNode("path", {
  448. d: "M8 8L6 5",
  449. stroke: "#CCCCCC",
  450. "stroke-width": "2",
  451. "stroke-linecap": "round"
  452. }),
  453. vue.createElementVNode("path", {
  454. d: "M20 10L22 8",
  455. stroke: "#CCCCCC",
  456. "stroke-width": "2",
  457. "stroke-linecap": "round"
  458. }),
  459. vue.createElementVNode("path", {
  460. d: "M4 10L2 8",
  461. stroke: "#CCCCCC",
  462. "stroke-width": "2",
  463. "stroke-linecap": "round"
  464. })
  465. ]))
  466. ])
  467. ]),
  468. vue.createElementVNode("button", {
  469. class: "login-btn",
  470. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  471. }, "登 录"),
  472. vue.createElementVNode("view", { class: "agreement" }, [
  473. vue.createElementVNode(
  474. "view",
  475. {
  476. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  477. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  478. },
  479. [
  480. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  481. key: 0,
  482. class: "check-mark"
  483. }, "✓")) : vue.createCommentVNode("v-if", true)
  484. ],
  485. 2
  486. /* CLASS */
  487. ),
  488. vue.createElementVNode("text", { class: "agree-text" }, [
  489. vue.createTextVNode(" 我已经阅读并同意 "),
  490. vue.createElementVNode("text", {
  491. class: "link",
  492. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  493. }, "《用户服务协议》"),
  494. vue.createTextVNode(" 和 "),
  495. vue.createElementVNode("text", {
  496. class: "link",
  497. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  498. }, "《隐私政策》")
  499. ])
  500. ])
  501. ]),
  502. vue.createElementVNode("view", {
  503. class: "footer-recruit",
  504. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  505. }, [
  506. vue.createElementVNode("view", { class: "recruit-badge" }, [
  507. (vue.openBlock(), vue.createElementBlock("svg", {
  508. class: "svg-icon flag-icon",
  509. viewBox: "0 0 24 24",
  510. fill: "none",
  511. xmlns: "http://www.w3.org/2000/svg",
  512. style: { "width": "30rpx", "height": "30rpx" }
  513. }, [
  514. vue.createElementVNode("path", {
  515. d: "M4 14V4H18L17 9L18 14H4Z",
  516. stroke: "#FF5722",
  517. "stroke-width": "2",
  518. "stroke-linejoin": "round"
  519. }),
  520. vue.createElementVNode("path", {
  521. d: "M4 22V14",
  522. stroke: "#FF5722",
  523. "stroke-width": "2",
  524. "stroke-linecap": "round"
  525. })
  526. ])),
  527. vue.createElementVNode("text", null, " 宠宝履约者招募")
  528. ])
  529. ]),
  530. vue.createVNode(_component_privacy_popup, {
  531. visible: _ctx.showAgreementModal,
  532. title: _ctx.agreementTitle,
  533. content: _ctx.agreementContent,
  534. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  535. }, null, 8, ["visible", "title", "content"])
  536. ])
  537. ]);
  538. }
  539. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  540. const logic$8 = {
  541. data() {
  542. return {
  543. statusBarHeight: 20
  544. // 默认状态栏高度
  545. };
  546. },
  547. onLoad() {
  548. const sysInfo = uni.getSystemInfoSync();
  549. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  550. },
  551. methods: {
  552. goBack() {
  553. const pages = getCurrentPages();
  554. if (pages.length > 1) {
  555. uni.navigateBack();
  556. } else {
  557. uni.reLaunch({
  558. url: "/pages/login/login"
  559. });
  560. }
  561. },
  562. goToForm() {
  563. uni.navigateTo({
  564. url: "/pages/recruit/form"
  565. });
  566. }
  567. }
  568. };
  569. const _sfc_main$B = logic$8;
  570. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  571. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  572. vue.createElementVNode(
  573. "view",
  574. {
  575. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  576. },
  577. null,
  578. 4
  579. /* STYLE */
  580. ),
  581. vue.createElementVNode("view", { class: "nav-bar" }, [
  582. vue.createElementVNode("view", {
  583. class: "back-icon",
  584. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  585. }, "‹")
  586. ]),
  587. vue.createElementVNode("view", { class: "header-area" }, [
  588. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  589. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  590. ]),
  591. vue.createElementVNode("view", { class: "content-card" }, [
  592. vue.createElementVNode("view", { class: "benefit-item" }, [
  593. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  594. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  595. ]),
  596. vue.createElementVNode("view", { class: "info" }, [
  597. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  598. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  599. ])
  600. ]),
  601. vue.createElementVNode("view", { class: "benefit-item" }, [
  602. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  603. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  604. ]),
  605. vue.createElementVNode("view", { class: "info" }, [
  606. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  607. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  608. ])
  609. ]),
  610. vue.createElementVNode("view", { class: "benefit-item" }, [
  611. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  612. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  613. ]),
  614. vue.createElementVNode("view", { class: "info" }, [
  615. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  616. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  617. ])
  618. ])
  619. ]),
  620. vue.createElementVNode("view", { class: "footer-area" }, [
  621. vue.createElementVNode("button", {
  622. class: "join-btn",
  623. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  624. }, "我要加入"),
  625. vue.createElementVNode("view", { class: "faq" }, [
  626. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  627. vue.createTextVNode(" 常见问题 ")
  628. ])
  629. ])
  630. ]);
  631. }
  632. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  633. function getMyProfile() {
  634. return request({
  635. url: "/fulfiller/fulfiller/my",
  636. method: "GET"
  637. });
  638. }
  639. function submitAudit(data) {
  640. return request({
  641. url: "/fulfiller/app/audit/submit",
  642. method: "POST",
  643. needToken: false,
  644. data
  645. });
  646. }
  647. function getServiceTypes() {
  648. return request({
  649. url: "/fulfiller/app/service/list",
  650. method: "GET",
  651. needToken: false
  652. });
  653. }
  654. function getAreaChildren(parentId = 0) {
  655. return request({
  656. url: "/fulfiller/app/area/children",
  657. method: "GET",
  658. needToken: false,
  659. data: { parentId }
  660. });
  661. }
  662. function uploadFile(filePath) {
  663. return new Promise((resolve, reject) => {
  664. const token = uni.getStorageSync("fulfiller_token");
  665. uni.uploadFile({
  666. url: BASE_URL + "/fulfiller/app/upload",
  667. filePath,
  668. name: "file",
  669. header: {
  670. "clientid": CLIENT_ID,
  671. "X-Platform-Code": PLATFORM_CODE,
  672. "Authorization": token ? `Bearer ${token}` : ""
  673. },
  674. success: (res) => {
  675. try {
  676. const data = JSON.parse(res.data);
  677. if (data.code === 200) {
  678. resolve(data);
  679. } else {
  680. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  681. reject(data);
  682. }
  683. } catch (e) {
  684. reject(e);
  685. }
  686. },
  687. fail: (err) => {
  688. uni.showToast({ title: "上传失败", icon: "none" });
  689. reject(err);
  690. }
  691. });
  692. });
  693. }
  694. function updateAvatar(avatar) {
  695. return request({
  696. url: "/fulfiller/fulfiller/my/avatar",
  697. method: "PUT",
  698. data: { avatar }
  699. });
  700. }
  701. function updateName(name) {
  702. return request({
  703. url: "/fulfiller/fulfiller/my/name",
  704. method: "PUT",
  705. data: { name }
  706. });
  707. }
  708. function updateStatus(status) {
  709. return request({
  710. url: "/fulfiller/fulfiller/my/status",
  711. method: "PUT",
  712. data: { status }
  713. });
  714. }
  715. function updateCity(cityCode, cityName) {
  716. return request({
  717. url: "/fulfiller/fulfiller/my/city",
  718. method: "PUT",
  719. data: { cityCode, cityName }
  720. });
  721. }
  722. function getAuthInfo() {
  723. return request({
  724. url: "/fulfiller/fulfiller/my/auth",
  725. method: "GET"
  726. });
  727. }
  728. function updatePhone(phone, code) {
  729. return request({
  730. url: "/fulfiller/fulfiller/my/phone",
  731. method: "PUT",
  732. data: { phone, code }
  733. });
  734. }
  735. function updatePassword(oldPassword, newPassword) {
  736. return request({
  737. url: "/fulfiller/fulfiller/my/password",
  738. method: "PUT",
  739. data: { oldPassword, newPassword }
  740. });
  741. }
  742. function deleteAccount() {
  743. return request({
  744. url: "/fulfiller/fulfiller/my/account",
  745. method: "DELETE"
  746. });
  747. }
  748. function updateAuthInfo(data) {
  749. return request({
  750. url: "/fulfiller/fulfiller/my/auth",
  751. method: "POST",
  752. data
  753. });
  754. }
  755. function getPendingOrders(params) {
  756. return request({
  757. url: "/order/subOrder/listPendingAccept",
  758. method: "GET",
  759. data: params
  760. });
  761. }
  762. function acceptOrder(orderId) {
  763. return request({
  764. url: "/order/subOrder/accept",
  765. method: "PUT",
  766. data: { orderId }
  767. });
  768. }
  769. function getOrderCount() {
  770. return request({
  771. url: "/order/subOrder/count",
  772. method: "GET"
  773. });
  774. }
  775. function getOrderStats() {
  776. return request({
  777. url: "/order/subOrderLog/count",
  778. method: "GET"
  779. });
  780. }
  781. function getStatisticOrders(params) {
  782. return request({
  783. url: "/order/subOrder/listOnStatistic",
  784. method: "GET",
  785. data: params
  786. });
  787. }
  788. function getMyOrders(params) {
  789. return request({
  790. url: "/order/subOrder/listOnMyOrder",
  791. method: "GET",
  792. data: params
  793. });
  794. }
  795. function getOrderInfo(id) {
  796. return request({
  797. url: `/order/subOrder/getInfo?id=${id}`,
  798. method: "GET"
  799. });
  800. }
  801. function getOrderLogs(orderId) {
  802. return request({
  803. url: `/order/subOrderLog/list?orderId=${orderId}`,
  804. method: "GET"
  805. });
  806. }
  807. function clockIn(data) {
  808. return request({
  809. url: "/order/subOrder/clockIn",
  810. method: "PUT",
  811. data
  812. });
  813. }
  814. function uploadAnamaly(data) {
  815. return request({
  816. url: "/fulfiller/anamaly/upload",
  817. method: "POST",
  818. data
  819. });
  820. }
  821. function getAnomalyList(orderId) {
  822. return request({
  823. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  824. method: "GET"
  825. });
  826. }
  827. function submitNursingSummary(data) {
  828. return request({
  829. url: "/order/subOrder/nursingSummary",
  830. method: "PUT",
  831. data
  832. });
  833. }
  834. const logic$7 = {
  835. data() {
  836. return {
  837. formData: {
  838. mobile: "",
  839. code: "",
  840. name: "",
  841. gender: 1,
  842. // 1男 2女
  843. birthday: "",
  844. password: "",
  845. serviceType: [],
  846. city: "",
  847. station: "",
  848. stationId: null
  849. },
  850. showPwd: false,
  851. isAgreed: false,
  852. serviceTypes: [],
  853. // 验证码倒计时
  854. countDown: 0,
  855. timer: null,
  856. // 日期选择器相关
  857. showPicker: false,
  858. years: [],
  859. months: [],
  860. days: [],
  861. pickerValue: [0, 0, 0],
  862. tempYear: 0,
  863. tempMonth: 0,
  864. tempDay: 0,
  865. // 城市选择器相关(从后端加载)
  866. showCityPicker: false,
  867. selectStep: 0,
  868. selectedPathway: [],
  869. currentList: [],
  870. selectedCityId: null,
  871. // 站点选择器相关(从后端加载)
  872. showStationPicker: false,
  873. stationList: [],
  874. // 协议弹窗
  875. showPrivacy: false,
  876. privacyTitle: "",
  877. privacyContent: ""
  878. };
  879. },
  880. created() {
  881. this.initDateData();
  882. this.loadServiceTypes();
  883. },
  884. beforeDestroy() {
  885. if (this.timer)
  886. clearInterval(this.timer);
  887. },
  888. methods: {
  889. initDateData() {
  890. const now = /* @__PURE__ */ new Date();
  891. const currentYear = now.getFullYear();
  892. for (let i = 1980; i <= currentYear + 5; i++) {
  893. this.years.push(i);
  894. }
  895. for (let i = 1; i <= 12; i++) {
  896. this.months.push(i);
  897. }
  898. for (let i = 1; i <= 31; i++) {
  899. this.days.push(i);
  900. }
  901. },
  902. // 打开选择器
  903. openPicker() {
  904. const dateStr = this.formData.birthday || "2000-01-01";
  905. const [y, m, d] = dateStr.split("-").map(Number);
  906. const yIndex = this.years.indexOf(y);
  907. const mIndex = this.months.indexOf(m);
  908. const dIndex = this.days.indexOf(d);
  909. this.pickerValue = [
  910. yIndex > -1 ? yIndex : 0,
  911. mIndex > -1 ? mIndex : 0,
  912. dIndex > -1 ? dIndex : 0
  913. ];
  914. this.tempYear = this.years[this.pickerValue[0]];
  915. this.tempMonth = this.months[this.pickerValue[1]];
  916. this.tempDay = this.days[this.pickerValue[2]];
  917. this.showPicker = true;
  918. },
  919. closePicker() {
  920. this.showPicker = false;
  921. },
  922. onPickerChange(e) {
  923. const val = e.detail.value;
  924. this.tempYear = this.years[val[0]];
  925. this.tempMonth = this.months[val[1]];
  926. this.tempDay = this.days[val[2]];
  927. },
  928. confirmPicker() {
  929. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  930. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  931. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  932. this.closePicker();
  933. },
  934. async loadServiceTypes() {
  935. try {
  936. const res = await getServiceTypes();
  937. this.serviceTypes = (res.data || []).map((item) => ({
  938. id: item.id,
  939. name: item.name
  940. }));
  941. } catch (err) {
  942. formatAppLog("error", "at pages/recruit/logic.js:131", "加载服务类型失败:", err);
  943. this.serviceTypes = [];
  944. }
  945. },
  946. toggleService(item) {
  947. const idx = this.formData.serviceType.indexOf(item.id);
  948. if (idx > -1) {
  949. this.formData.serviceType.splice(idx, 1);
  950. } else {
  951. this.formData.serviceType.push(item.id);
  952. }
  953. },
  954. // 验证码
  955. /* async getVerifyCode() {
  956. if (this.countDown > 0) return;
  957. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  958. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  959. return;
  960. }
  961. try {
  962. const res = await sendSmsCode(this.formData.mobile);
  963. this.countDown = 60;
  964. this.timer = setInterval(() => {
  965. this.countDown--;
  966. if (this.countDown <= 0) clearInterval(this.timer);
  967. }, 1000);
  968. // TODO 【生产环境必须删除】开发模式自动填入验证码
  969. const devCode = res.data;
  970. if (devCode) {
  971. this.formData.code = devCode;
  972. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  973. } else {
  974. uni.showToast({ title: '验证码已发送', icon: 'none' });
  975. }
  976. } catch (err) {
  977. __f__('error','at pages/recruit/logic.js:168','发送验证码失败:', err);
  978. }
  979. }, */
  980. // 城市选择器 logic(从后端加载)
  981. async openCityPicker() {
  982. this.showCityPicker = true;
  983. if (this.selectedPathway.length === 0) {
  984. await this.resetCityPicker();
  985. }
  986. },
  987. async resetCityPicker() {
  988. this.selectStep = 0;
  989. this.selectedPathway = [];
  990. await this.loadAreaChildren(0);
  991. },
  992. closeCityPicker() {
  993. this.showCityPicker = false;
  994. },
  995. async loadAreaChildren(parentId) {
  996. try {
  997. const res = await getAreaChildren(parentId);
  998. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  999. id: item.id,
  1000. name: item.name,
  1001. type: item.type,
  1002. parentId: item.parentId
  1003. }));
  1004. } catch (err) {
  1005. formatAppLog("error", "at pages/recruit/logic.js:200", "加载区域数据失败:", err);
  1006. this.currentList = [];
  1007. }
  1008. },
  1009. async selectCityItem(item) {
  1010. this.selectedPathway[this.selectStep] = item;
  1011. if (item.type === 0) {
  1012. this.selectStep++;
  1013. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1014. await this.loadAreaChildren(item.id);
  1015. if (this.currentList.length === 0) {
  1016. this.selectedCityId = item.id;
  1017. this.confirmCity();
  1018. }
  1019. } else {
  1020. this.selectedCityId = item.id;
  1021. this.confirmCity();
  1022. }
  1023. },
  1024. async jumpToStep(step) {
  1025. this.selectStep = step;
  1026. if (step === 0) {
  1027. await this.loadAreaChildren(0);
  1028. } else {
  1029. const parent = this.selectedPathway[step - 1];
  1030. if (parent) {
  1031. await this.loadAreaChildren(parent.id);
  1032. }
  1033. }
  1034. },
  1035. confirmCity() {
  1036. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1037. this.formData.city = fullPath;
  1038. this.formData.station = "";
  1039. this.formData.stationId = null;
  1040. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1041. if (lastSelected) {
  1042. this.loadStations(lastSelected.id);
  1043. }
  1044. this.closeCityPicker();
  1045. },
  1046. // 站点选择器(从后端加载,只取type=2的站点)
  1047. async loadStations(parentId) {
  1048. try {
  1049. const res = await getAreaChildren(parentId);
  1050. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1051. id: item.id,
  1052. name: item.name
  1053. }));
  1054. } catch (err) {
  1055. formatAppLog("error", "at pages/recruit/logic.js:259", "加载站点数据失败:", err);
  1056. this.stationList = [];
  1057. }
  1058. },
  1059. openStationPicker() {
  1060. if (this.stationList.length === 0) {
  1061. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1062. return;
  1063. }
  1064. this.showStationPicker = true;
  1065. },
  1066. closeStationPicker() {
  1067. this.showStationPicker = false;
  1068. },
  1069. selectStation(item) {
  1070. this.formData.station = item.name;
  1071. this.formData.stationId = item.id;
  1072. this.closeStationPicker();
  1073. },
  1074. openPrivacy() {
  1075. this.privacyTitle = "宠宝履约者说明";
  1076. this.privacyContent = "1. 履约职责\n作为宠宝履约者,您需要按照平台标准完成宠物接送、喂遛或洗护服务,确保宠物安全与健康。\n\n2. 结算方式\n服务费用将根据订单类型和距离计算,定期结算至您的账户。具体结算周期请查看钱包说明。\n\n3. 行为规范\n请在这个过程中保持专业,穿着整洁,礼貌待人。严禁虐待宠物,违反者将承担法律责任。";
  1077. this.showPrivacy = true;
  1078. },
  1079. goToAuth() {
  1080. if (!this.isAgreed) {
  1081. uni.showToast({ title: "请勾选协议", icon: "none" });
  1082. return;
  1083. }
  1084. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1085. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1086. return;
  1087. }
  1088. if (!this.formData.name) {
  1089. uni.showToast({ title: "请输入姓名", icon: "none" });
  1090. return;
  1091. }
  1092. if (this.formData.serviceType.length === 0) {
  1093. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1094. return;
  1095. }
  1096. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1097. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1098. const services = JSON.stringify(selectedServices);
  1099. uni.navigateTo({
  1100. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1101. });
  1102. }
  1103. }
  1104. };
  1105. const _sfc_main$A = {
  1106. ...logic$7,
  1107. components: {
  1108. PrivacyPopup: __easycom_0
  1109. }
  1110. };
  1111. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1112. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  1113. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1114. vue.createElementVNode("view", { class: "card" }, [
  1115. vue.createElementVNode("view", { class: "form-item" }, [
  1116. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1117. vue.createElementVNode("view", { class: "input-box" }, [
  1118. vue.createElementVNode("view", { class: "prefix-area" }, [
  1119. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1120. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1121. ]),
  1122. vue.withDirectives(vue.createElementVNode(
  1123. "input",
  1124. {
  1125. class: "input",
  1126. type: "number",
  1127. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1128. },
  1129. null,
  1130. 512
  1131. /* NEED_PATCH */
  1132. ), [
  1133. [vue.vModelText, _ctx.formData.mobile]
  1134. ])
  1135. ])
  1136. ]),
  1137. vue.createElementVNode("view", { class: "form-item" }, [
  1138. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1139. vue.createElementVNode("view", { class: "input-box" }, [
  1140. vue.withDirectives(vue.createElementVNode(
  1141. "input",
  1142. {
  1143. class: "input",
  1144. type: "text",
  1145. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1146. },
  1147. null,
  1148. 512
  1149. /* NEED_PATCH */
  1150. ), [
  1151. [vue.vModelText, _ctx.formData.name]
  1152. ])
  1153. ])
  1154. ]),
  1155. vue.createElementVNode("view", { class: "form-item" }, [
  1156. vue.createElementVNode("text", { class: "label" }, "性别"),
  1157. vue.createElementVNode("view", { class: "gender-group" }, [
  1158. vue.createElementVNode("view", {
  1159. class: "radio-item",
  1160. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1161. }, [
  1162. vue.createElementVNode(
  1163. "text",
  1164. {
  1165. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1166. },
  1167. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1168. 3
  1169. /* TEXT, CLASS */
  1170. ),
  1171. vue.createElementVNode(
  1172. "text",
  1173. {
  1174. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1175. },
  1176. " 男",
  1177. 2
  1178. /* CLASS */
  1179. )
  1180. ]),
  1181. vue.createElementVNode("view", {
  1182. class: "radio-item",
  1183. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1184. }, [
  1185. vue.createElementVNode(
  1186. "text",
  1187. {
  1188. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1189. },
  1190. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1191. 3
  1192. /* TEXT, CLASS */
  1193. ),
  1194. vue.createElementVNode(
  1195. "text",
  1196. {
  1197. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1198. },
  1199. " 女",
  1200. 2
  1201. /* CLASS */
  1202. )
  1203. ])
  1204. ])
  1205. ]),
  1206. vue.createElementVNode("view", { class: "form-item" }, [
  1207. vue.createElementVNode("text", { class: "label" }, "生日"),
  1208. vue.createElementVNode("view", {
  1209. class: "input-box",
  1210. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1211. }, [
  1212. vue.createElementVNode(
  1213. "text",
  1214. null,
  1215. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1216. 1
  1217. /* TEXT */
  1218. ),
  1219. (vue.openBlock(), vue.createElementBlock("svg", {
  1220. class: "arrow-right",
  1221. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1222. viewBox: "0 0 1024 1024",
  1223. version: "1.1",
  1224. xmlns: "http://www.w3.org/2000/svg"
  1225. }, [
  1226. vue.createElementVNode("path", {
  1227. 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",
  1228. fill: "#CCCCCC"
  1229. })
  1230. ]))
  1231. ])
  1232. ]),
  1233. vue.createElementVNode("view", { class: "form-item" }, [
  1234. vue.createElementVNode("text", { class: "label" }, "密码"),
  1235. vue.createElementVNode("view", { class: "input-box" }, [
  1236. vue.withDirectives(vue.createElementVNode("input", {
  1237. class: "input",
  1238. password: !_ctx.showPwd,
  1239. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1240. placeholder: "设置登录密码"
  1241. }, null, 8, ["password"]), [
  1242. [vue.vModelText, _ctx.formData.password]
  1243. ]),
  1244. vue.createElementVNode("view", {
  1245. class: "monkey-icon",
  1246. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1247. }, [
  1248. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1249. key: 0,
  1250. class: "svg-icon",
  1251. viewBox: "0 0 24 24",
  1252. fill: "none",
  1253. xmlns: "http://www.w3.org/2000/svg"
  1254. }, [
  1255. vue.createElementVNode("path", {
  1256. 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",
  1257. fill: "#CCCCCC"
  1258. })
  1259. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1260. key: 1,
  1261. class: "svg-icon",
  1262. viewBox: "0 0 24 24",
  1263. fill: "none",
  1264. xmlns: "http://www.w3.org/2000/svg"
  1265. }, [
  1266. vue.createElementVNode("path", {
  1267. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1268. stroke: "#CCCCCC",
  1269. "stroke-width": "2",
  1270. "stroke-linecap": "round"
  1271. }),
  1272. vue.createElementVNode("path", {
  1273. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1274. stroke: "#CCCCCC",
  1275. "stroke-width": "2",
  1276. "stroke-linecap": "round"
  1277. }),
  1278. vue.createElementVNode("path", {
  1279. d: "M12 7V4",
  1280. stroke: "#CCCCCC",
  1281. "stroke-width": "2",
  1282. "stroke-linecap": "round"
  1283. }),
  1284. vue.createElementVNode("path", {
  1285. d: "M16 8L18 5",
  1286. stroke: "#CCCCCC",
  1287. "stroke-width": "2",
  1288. "stroke-linecap": "round"
  1289. }),
  1290. vue.createElementVNode("path", {
  1291. d: "M8 8L6 5",
  1292. stroke: "#CCCCCC",
  1293. "stroke-width": "2",
  1294. "stroke-linecap": "round"
  1295. }),
  1296. vue.createElementVNode("path", {
  1297. d: "M20 10L22 8",
  1298. stroke: "#CCCCCC",
  1299. "stroke-width": "2",
  1300. "stroke-linecap": "round"
  1301. }),
  1302. vue.createElementVNode("path", {
  1303. d: "M4 10L2 8",
  1304. stroke: "#CCCCCC",
  1305. "stroke-width": "2",
  1306. "stroke-linecap": "round"
  1307. })
  1308. ]))
  1309. ])
  1310. ])
  1311. ])
  1312. ]),
  1313. vue.createElementVNode("view", { class: "card" }, [
  1314. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1315. vue.createElementVNode("view", { class: "service-types" }, [
  1316. (vue.openBlock(true), vue.createElementBlock(
  1317. vue.Fragment,
  1318. null,
  1319. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1320. return vue.openBlock(), vue.createElementBlock("view", {
  1321. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1322. key: item.id,
  1323. onClick: ($event) => _ctx.toggleService(item)
  1324. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1325. }),
  1326. 128
  1327. /* KEYED_FRAGMENT */
  1328. ))
  1329. ]),
  1330. vue.createElementVNode("view", { class: "form-item" }, [
  1331. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1332. vue.createElementVNode("view", {
  1333. class: "input-box",
  1334. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1335. }, [
  1336. vue.createElementVNode(
  1337. "text",
  1338. {
  1339. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1340. },
  1341. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1342. 5
  1343. /* TEXT, STYLE */
  1344. ),
  1345. (vue.openBlock(), vue.createElementBlock("svg", {
  1346. class: "arrow-right",
  1347. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1348. viewBox: "0 0 1024 1024",
  1349. version: "1.1",
  1350. xmlns: "http://www.w3.org/2000/svg"
  1351. }, [
  1352. vue.createElementVNode("path", {
  1353. 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",
  1354. fill: "#CCCCCC"
  1355. })
  1356. ]))
  1357. ])
  1358. ]),
  1359. vue.createElementVNode("view", { class: "form-item" }, [
  1360. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1361. vue.createElementVNode("view", {
  1362. class: "input-box",
  1363. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1364. }, [
  1365. vue.createElementVNode(
  1366. "text",
  1367. {
  1368. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1369. },
  1370. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1371. 5
  1372. /* TEXT, STYLE */
  1373. ),
  1374. (vue.openBlock(), vue.createElementBlock("svg", {
  1375. class: "arrow-right",
  1376. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1377. viewBox: "0 0 1024 1024",
  1378. version: "1.1",
  1379. xmlns: "http://www.w3.org/2000/svg"
  1380. }, [
  1381. vue.createElementVNode("path", {
  1382. 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",
  1383. fill: "#CCCCCC"
  1384. })
  1385. ]))
  1386. ])
  1387. ])
  1388. ]),
  1389. vue.createElementVNode(
  1390. "view",
  1391. {
  1392. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1393. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1394. },
  1395. [
  1396. vue.createElementVNode("view", {
  1397. class: "picker-content",
  1398. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  1399. }, ["stop"]))
  1400. }, [
  1401. vue.createElementVNode("view", { class: "picker-header" }, [
  1402. vue.createElementVNode("text", {
  1403. class: "picker-btn-cancel",
  1404. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1405. }, "取消"),
  1406. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1407. vue.createElementVNode("text", {
  1408. class: "picker-btn-confirm",
  1409. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1410. }, "确定")
  1411. ]),
  1412. vue.createElementVNode("view", { class: "picker-body" }, [
  1413. vue.createElementVNode("view", { class: "timeline-area" }, [
  1414. (vue.openBlock(true), vue.createElementBlock(
  1415. vue.Fragment,
  1416. null,
  1417. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1418. return vue.openBlock(), vue.createElementBlock("view", {
  1419. class: "timeline-item",
  1420. key: index,
  1421. onClick: ($event) => _ctx.jumpToStep(index)
  1422. }, [
  1423. vue.createElementVNode("view", { class: "timeline-dot" }),
  1424. vue.createElementVNode(
  1425. "text",
  1426. null,
  1427. vue.toDisplayString(item.name),
  1428. 1
  1429. /* TEXT */
  1430. )
  1431. ], 8, ["onClick"]);
  1432. }),
  1433. 128
  1434. /* KEYED_FRAGMENT */
  1435. )),
  1436. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1437. key: 0,
  1438. class: "timeline-item active"
  1439. }, [
  1440. vue.createElementVNode("view", { class: "timeline-dot" }),
  1441. vue.createElementVNode("text", null, "请选择")
  1442. ])) : vue.createCommentVNode("v-if", true)
  1443. ]),
  1444. vue.createElementVNode("scroll-view", {
  1445. "scroll-y": "",
  1446. class: "list-area"
  1447. }, [
  1448. (vue.openBlock(true), vue.createElementBlock(
  1449. vue.Fragment,
  1450. null,
  1451. vue.renderList(_ctx.currentList, (item, index) => {
  1452. return vue.openBlock(), vue.createElementBlock("view", {
  1453. class: "list-item",
  1454. key: item.id,
  1455. onClick: ($event) => _ctx.selectCityItem(item)
  1456. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1457. }),
  1458. 128
  1459. /* KEYED_FRAGMENT */
  1460. )),
  1461. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1462. key: 0,
  1463. style: { "padding": "20rpx", "color": "#999" }
  1464. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1465. ])
  1466. ])
  1467. ])
  1468. ],
  1469. 2
  1470. /* CLASS */
  1471. ),
  1472. vue.createElementVNode(
  1473. "view",
  1474. {
  1475. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1476. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1477. },
  1478. [
  1479. vue.createElementVNode("view", {
  1480. class: "picker-content",
  1481. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  1482. }, ["stop"]))
  1483. }, [
  1484. vue.createElementVNode("view", {
  1485. class: "picker-header",
  1486. style: { "justify-content": "center", "position": "relative" }
  1487. }, [
  1488. vue.createElementVNode("text", {
  1489. class: "picker-btn-cancel",
  1490. style: { "position": "absolute", "left": "30rpx" },
  1491. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1492. }, "取消"),
  1493. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1494. ]),
  1495. vue.createElementVNode("scroll-view", {
  1496. "scroll-y": "",
  1497. class: "picker-list"
  1498. }, [
  1499. (vue.openBlock(true), vue.createElementBlock(
  1500. vue.Fragment,
  1501. null,
  1502. vue.renderList(_ctx.stationList, (item, index) => {
  1503. return vue.openBlock(), vue.createElementBlock("view", {
  1504. class: "station-item",
  1505. key: index,
  1506. onClick: ($event) => _ctx.selectStation(item)
  1507. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1508. }),
  1509. 128
  1510. /* KEYED_FRAGMENT */
  1511. ))
  1512. ])
  1513. ])
  1514. ],
  1515. 2
  1516. /* CLASS */
  1517. ),
  1518. vue.createElementVNode("view", { class: "footer-actions" }, [
  1519. vue.createElementVNode("view", { class: "agreement-row" }, [
  1520. vue.createElementVNode(
  1521. "view",
  1522. {
  1523. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1524. onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1525. },
  1526. [
  1527. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1528. key: 0,
  1529. class: "check-mark"
  1530. }, "✓")) : vue.createCommentVNode("v-if", true)
  1531. ],
  1532. 2
  1533. /* CLASS */
  1534. ),
  1535. vue.createElementVNode("text", { class: "agree-text" }, [
  1536. vue.createTextVNode("我已阅读并同意 "),
  1537. vue.createElementVNode("text", {
  1538. style: { "color": "#2979ff" },
  1539. onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1540. }, "《宠宝履约者说明》")
  1541. ])
  1542. ]),
  1543. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1544. vue.createElementVNode("button", {
  1545. class: "submit-btn",
  1546. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1547. }, "下一步,实名认证")
  1548. ])
  1549. ]),
  1550. vue.createElementVNode(
  1551. "view",
  1552. {
  1553. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1554. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1555. },
  1556. [
  1557. vue.createElementVNode("view", {
  1558. class: "picker-content",
  1559. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  1560. }, ["stop"]))
  1561. }, [
  1562. vue.createElementVNode("view", { class: "picker-header" }, [
  1563. vue.createElementVNode("text", {
  1564. class: "picker-btn-cancel",
  1565. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1566. }, "取消"),
  1567. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1568. vue.createElementVNode("text", {
  1569. class: "picker-btn-confirm",
  1570. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1571. }, "确定")
  1572. ]),
  1573. vue.createElementVNode("picker-view", {
  1574. class: "picker-view",
  1575. "indicator-style": "height: 50px;",
  1576. value: _ctx.pickerValue,
  1577. onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1578. }, [
  1579. vue.createElementVNode("picker-view-column", null, [
  1580. (vue.openBlock(true), vue.createElementBlock(
  1581. vue.Fragment,
  1582. null,
  1583. vue.renderList(_ctx.years, (item, index) => {
  1584. return vue.openBlock(), vue.createElementBlock(
  1585. "view",
  1586. {
  1587. class: "picker-item",
  1588. key: index
  1589. },
  1590. vue.toDisplayString(item) + "年",
  1591. 1
  1592. /* TEXT */
  1593. );
  1594. }),
  1595. 128
  1596. /* KEYED_FRAGMENT */
  1597. ))
  1598. ]),
  1599. vue.createElementVNode("picker-view-column", null, [
  1600. (vue.openBlock(true), vue.createElementBlock(
  1601. vue.Fragment,
  1602. null,
  1603. vue.renderList(_ctx.months, (item, index) => {
  1604. return vue.openBlock(), vue.createElementBlock(
  1605. "view",
  1606. {
  1607. class: "picker-item",
  1608. key: index
  1609. },
  1610. vue.toDisplayString(item) + "月",
  1611. 1
  1612. /* TEXT */
  1613. );
  1614. }),
  1615. 128
  1616. /* KEYED_FRAGMENT */
  1617. ))
  1618. ]),
  1619. vue.createElementVNode("picker-view-column", null, [
  1620. (vue.openBlock(true), vue.createElementBlock(
  1621. vue.Fragment,
  1622. null,
  1623. vue.renderList(_ctx.days, (item, index) => {
  1624. return vue.openBlock(), vue.createElementBlock(
  1625. "view",
  1626. {
  1627. class: "picker-item",
  1628. key: index
  1629. },
  1630. vue.toDisplayString(item) + "日",
  1631. 1
  1632. /* TEXT */
  1633. );
  1634. }),
  1635. 128
  1636. /* KEYED_FRAGMENT */
  1637. ))
  1638. ])
  1639. ], 40, ["value"])
  1640. ])
  1641. ],
  1642. 2
  1643. /* CLASS */
  1644. ),
  1645. vue.createVNode(_component_privacy_popup, {
  1646. visible: _ctx.showPrivacy,
  1647. title: _ctx.privacyTitle,
  1648. content: _ctx.privacyContent,
  1649. onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
  1650. }, null, 8, ["visible", "title", "content"])
  1651. ]);
  1652. }
  1653. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1654. const logic$6 = {
  1655. data() {
  1656. return {
  1657. formData: {
  1658. idType: "居民身份证",
  1659. name: "",
  1660. idNumber: "",
  1661. expiryDate: ""
  1662. },
  1663. idCardFront: "",
  1664. // 身份证正面本地预览路径
  1665. idCardBack: "",
  1666. // 身份证反面本地预览路径
  1667. idCardFrontOssId: "",
  1668. // 身份证正面 OSS ID
  1669. idCardBackOssId: "",
  1670. // 身份证反面 OSS ID
  1671. showPicker: false,
  1672. pickerValue: [0, 0, 0],
  1673. // YYYY-MM-DD
  1674. years: [],
  1675. months: [],
  1676. days: [],
  1677. tempYear: 0,
  1678. tempMonth: 0,
  1679. tempDay: 0,
  1680. serviceType: []
  1681. // 接收上一页的服务类型
  1682. };
  1683. },
  1684. onLoad(options) {
  1685. if (options.services) {
  1686. try {
  1687. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1688. } catch (e) {
  1689. formatAppLog("error", "at pages/recruit/auth_logic.js:32", "Parse services failed", e);
  1690. }
  1691. }
  1692. this.initDateData();
  1693. this.restoreAuthData();
  1694. },
  1695. methods: {
  1696. // --- 日期选择器逻辑 ---
  1697. initDateData() {
  1698. const date = /* @__PURE__ */ new Date();
  1699. const year = date.getFullYear();
  1700. for (let i = year; i <= year + 50; i++) {
  1701. this.years.push(i);
  1702. }
  1703. for (let i = 1; i <= 12; i++) {
  1704. this.months.push(i);
  1705. }
  1706. for (let i = 1; i <= 31; i++) {
  1707. this.days.push(i);
  1708. }
  1709. },
  1710. openPicker() {
  1711. const date = /* @__PURE__ */ new Date();
  1712. const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
  1713. const [y, m, d] = dateStr.split("-").map(Number);
  1714. let yIndex = this.years.indexOf(y);
  1715. let mIndex = this.months.indexOf(m);
  1716. let dIndex = this.days.indexOf(d);
  1717. this.pickerValue = [
  1718. yIndex > -1 ? yIndex : 0,
  1719. mIndex > -1 ? mIndex : 0,
  1720. dIndex > -1 ? dIndex : 0
  1721. ];
  1722. this.tempYear = this.years[this.pickerValue[0]];
  1723. this.tempMonth = this.months[this.pickerValue[1]];
  1724. this.tempDay = this.days[this.pickerValue[2]];
  1725. this.showPicker = true;
  1726. },
  1727. closePicker() {
  1728. this.showPicker = false;
  1729. },
  1730. onPickerChange(e) {
  1731. const val = e.detail.value;
  1732. this.tempYear = this.years[val[0]];
  1733. this.tempMonth = this.months[val[1]];
  1734. this.tempDay = this.days[val[2]];
  1735. },
  1736. confirmPicker() {
  1737. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1738. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1739. this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
  1740. this.closePicker();
  1741. },
  1742. // --- 数据持久化(防止返回上一级丢失) ---
  1743. restoreAuthData() {
  1744. try {
  1745. const saved = uni.getStorageSync("recruit_auth_data");
  1746. if (saved) {
  1747. const d = JSON.parse(saved);
  1748. this.formData.name = d.name || "";
  1749. this.formData.idNumber = d.idNumber || "";
  1750. this.formData.expiryDate = d.expiryDate || "";
  1751. this.idCardFront = d.idCardFront || "";
  1752. this.idCardBack = d.idCardBack || "";
  1753. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1754. this.idCardBackOssId = d.idCardBackOssId || "";
  1755. }
  1756. } catch (e) {
  1757. formatAppLog("error", "at pages/recruit/auth_logic.js:106", "恢复认证数据失败", e);
  1758. }
  1759. },
  1760. saveAuthData() {
  1761. try {
  1762. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1763. name: this.formData.name,
  1764. idNumber: this.formData.idNumber,
  1765. expiryDate: this.formData.expiryDate,
  1766. idCardFront: this.idCardFront,
  1767. idCardBack: this.idCardBack,
  1768. idCardFrontOssId: this.idCardFrontOssId,
  1769. idCardBackOssId: this.idCardBackOssId
  1770. }));
  1771. } catch (e) {
  1772. formatAppLog("error", "at pages/recruit/auth_logic.js:121", "保存认证数据失败", e);
  1773. }
  1774. },
  1775. // --- 图片上传(选择后自动上传到OSS) ---
  1776. chooseImage(side) {
  1777. uni.chooseImage({
  1778. count: 1,
  1779. sizeType: ["compressed"],
  1780. sourceType: ["album", "camera"],
  1781. success: async (res) => {
  1782. const tempPath = res.tempFilePaths[0];
  1783. if (side === "front") {
  1784. this.idCardFront = tempPath;
  1785. } else {
  1786. this.idCardBack = tempPath;
  1787. }
  1788. try {
  1789. uni.showLoading({ title: "上传中..." });
  1790. const uploadRes = await uploadFile(tempPath);
  1791. if (side === "front") {
  1792. this.idCardFrontOssId = uploadRes.data.ossId;
  1793. } else {
  1794. this.idCardBackOssId = uploadRes.data.ossId;
  1795. }
  1796. uni.hideLoading();
  1797. this.saveAuthData();
  1798. } catch (err) {
  1799. uni.hideLoading();
  1800. formatAppLog("error", "at pages/recruit/auth_logic.js:151", "上传身份证图片失败:", err);
  1801. }
  1802. }
  1803. });
  1804. },
  1805. // --- 提交 ---
  1806. goToQualifications() {
  1807. this.saveAuthData();
  1808. try {
  1809. const stored = uni.getStorageSync("recruit_form_data");
  1810. if (stored) {
  1811. const data = JSON.parse(stored);
  1812. data.realName = this.formData.name;
  1813. data.idNumber = this.formData.idNumber;
  1814. data.expiryDate = this.formData.expiryDate;
  1815. data.idCardFrontOssId = this.idCardFrontOssId;
  1816. data.idCardBackOssId = this.idCardBackOssId;
  1817. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1818. }
  1819. } catch (e) {
  1820. formatAppLog("error", "at pages/recruit/auth_logic.js:188", "保存认证数据失败", e);
  1821. }
  1822. const services = JSON.stringify(this.serviceType);
  1823. uni.navigateTo({
  1824. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1825. });
  1826. }
  1827. }
  1828. };
  1829. const _sfc_main$z = logic$6;
  1830. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1831. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1832. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1833. vue.createElementVNode("view", { class: "form-card" }, [
  1834. vue.createElementVNode("view", { class: "form-item" }, [
  1835. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1836. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1837. ]),
  1838. vue.createElementVNode("view", { class: "form-item" }, [
  1839. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1840. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1841. vue.withDirectives(vue.createElementVNode(
  1842. "input",
  1843. {
  1844. class: "input-area",
  1845. type: "text",
  1846. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1847. placeholder: "证件姓名",
  1848. "placeholder-class": "input-placeholder"
  1849. },
  1850. null,
  1851. 512
  1852. /* NEED_PATCH */
  1853. ), [
  1854. [vue.vModelText, _ctx.formData.name]
  1855. ])
  1856. ])
  1857. ]),
  1858. vue.createElementVNode("view", { class: "form-item" }, [
  1859. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1860. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1861. vue.withDirectives(vue.createElementVNode(
  1862. "input",
  1863. {
  1864. class: "input-area",
  1865. type: "idcard",
  1866. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1867. placeholder: "身份证号",
  1868. "placeholder-class": "input-placeholder"
  1869. },
  1870. null,
  1871. 512
  1872. /* NEED_PATCH */
  1873. ), [
  1874. [vue.vModelText, _ctx.formData.idNumber]
  1875. ])
  1876. ])
  1877. ]),
  1878. vue.createElementVNode("view", { class: "form-item" }, [
  1879. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1880. vue.createElementVNode("view", {
  1881. class: "gray-input-box",
  1882. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1883. }, [
  1884. vue.createElementVNode(
  1885. "text",
  1886. {
  1887. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1888. },
  1889. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1890. 3
  1891. /* TEXT, CLASS */
  1892. ),
  1893. (vue.openBlock(), vue.createElementBlock("svg", {
  1894. class: "arrow-right",
  1895. viewBox: "0 0 1024 1024",
  1896. version: "1.1",
  1897. xmlns: "http://www.w3.org/2000/svg"
  1898. }, [
  1899. vue.createElementVNode("path", {
  1900. 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",
  1901. fill: "#CCCCCC"
  1902. })
  1903. ]))
  1904. ])
  1905. ])
  1906. ]),
  1907. vue.createElementVNode("view", { class: "upload-card" }, [
  1908. vue.createElementVNode("view", {
  1909. class: "upload-box",
  1910. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  1911. }, [
  1912. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  1913. key: 0,
  1914. src: _ctx.idCardFront,
  1915. class: "preview-img",
  1916. mode: "aspectFill"
  1917. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1918. vue.Fragment,
  1919. { key: 1 },
  1920. [
  1921. (vue.openBlock(), vue.createElementBlock("svg", {
  1922. class: "camera-icon",
  1923. viewBox: "0 0 24 24",
  1924. fill: "none",
  1925. xmlns: "http://www.w3.org/2000/svg"
  1926. }, [
  1927. vue.createElementVNode("path", {
  1928. 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",
  1929. fill: "#E0E0E0"
  1930. }),
  1931. vue.createElementVNode("circle", {
  1932. cx: "12",
  1933. cy: "12",
  1934. r: "3",
  1935. stroke: "#CCCCCC",
  1936. "stroke-width": "2"
  1937. }),
  1938. vue.createElementVNode("path", {
  1939. 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",
  1940. fill: "#CCCCCC"
  1941. })
  1942. ])),
  1943. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1944. ],
  1945. 64
  1946. /* STABLE_FRAGMENT */
  1947. ))
  1948. ]),
  1949. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  1950. ]),
  1951. vue.createElementVNode("view", { class: "upload-card" }, [
  1952. vue.createElementVNode("view", {
  1953. class: "upload-box",
  1954. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  1955. }, [
  1956. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  1957. key: 0,
  1958. src: _ctx.idCardBack,
  1959. class: "preview-img",
  1960. mode: "aspectFill"
  1961. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1962. vue.Fragment,
  1963. { key: 1 },
  1964. [
  1965. (vue.openBlock(), vue.createElementBlock("svg", {
  1966. class: "camera-icon",
  1967. viewBox: "0 0 24 24",
  1968. fill: "none",
  1969. xmlns: "http://www.w3.org/2000/svg"
  1970. }, [
  1971. vue.createElementVNode("path", {
  1972. 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",
  1973. fill: "#CCCCCC"
  1974. })
  1975. ])),
  1976. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1977. ],
  1978. 64
  1979. /* STABLE_FRAGMENT */
  1980. ))
  1981. ]),
  1982. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  1983. ]),
  1984. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1985. vue.createElementVNode("button", {
  1986. class: "next-btn",
  1987. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  1988. }, "下一步,完善资质")
  1989. ]),
  1990. vue.createElementVNode(
  1991. "view",
  1992. {
  1993. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1994. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1995. },
  1996. [
  1997. vue.createElementVNode("view", {
  1998. class: "picker-content",
  1999. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  2000. }, ["stop"]))
  2001. }, [
  2002. vue.createElementVNode("view", { class: "picker-header" }, [
  2003. vue.createElementVNode("text", {
  2004. class: "picker-btn-cancel",
  2005. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2006. }, "取消"),
  2007. vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
  2008. vue.createElementVNode("text", {
  2009. class: "picker-btn-confirm",
  2010. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  2011. }, "确定")
  2012. ]),
  2013. vue.createElementVNode("picker-view", {
  2014. class: "picker-view",
  2015. "indicator-style": "height: 50px;",
  2016. value: _ctx.pickerValue,
  2017. onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  2018. }, [
  2019. vue.createElementVNode("picker-view-column", null, [
  2020. (vue.openBlock(true), vue.createElementBlock(
  2021. vue.Fragment,
  2022. null,
  2023. vue.renderList(_ctx.years, (item, index) => {
  2024. return vue.openBlock(), vue.createElementBlock(
  2025. "view",
  2026. {
  2027. class: "picker-item",
  2028. key: index
  2029. },
  2030. vue.toDisplayString(item) + "年",
  2031. 1
  2032. /* TEXT */
  2033. );
  2034. }),
  2035. 128
  2036. /* KEYED_FRAGMENT */
  2037. ))
  2038. ]),
  2039. vue.createElementVNode("picker-view-column", null, [
  2040. (vue.openBlock(true), vue.createElementBlock(
  2041. vue.Fragment,
  2042. null,
  2043. vue.renderList(_ctx.months, (item, index) => {
  2044. return vue.openBlock(), vue.createElementBlock(
  2045. "view",
  2046. {
  2047. class: "picker-item",
  2048. key: index
  2049. },
  2050. vue.toDisplayString(item) + "月",
  2051. 1
  2052. /* TEXT */
  2053. );
  2054. }),
  2055. 128
  2056. /* KEYED_FRAGMENT */
  2057. ))
  2058. ]),
  2059. vue.createElementVNode("picker-view-column", null, [
  2060. (vue.openBlock(true), vue.createElementBlock(
  2061. vue.Fragment,
  2062. null,
  2063. vue.renderList(_ctx.days, (item, index) => {
  2064. return vue.openBlock(), vue.createElementBlock(
  2065. "view",
  2066. {
  2067. class: "picker-item",
  2068. key: index
  2069. },
  2070. vue.toDisplayString(item) + "日",
  2071. 1
  2072. /* TEXT */
  2073. );
  2074. }),
  2075. 128
  2076. /* KEYED_FRAGMENT */
  2077. ))
  2078. ])
  2079. ], 40, ["value"])
  2080. ])
  2081. ],
  2082. 2
  2083. /* CLASS */
  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. completed: 0,
  2677. price: 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, completed: 0, price: 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. this.loadOrderStats();
  2813. } catch (err) {
  2814. formatAppLog("error", "at pages/home/logic.js:187", "拒绝接单失败:", err);
  2815. uni.showToast({ title: "操作失败", icon: "none" });
  2816. } finally {
  2817. uni.hideLoading();
  2818. }
  2819. },
  2820. openAcceptModal(item) {
  2821. this.currentOrder = item;
  2822. this.showAcceptConfirmModal = true;
  2823. },
  2824. closeAcceptModal() {
  2825. this.showAcceptConfirmModal = false;
  2826. this.currentOrder = null;
  2827. },
  2828. async confirmAccept() {
  2829. var _a;
  2830. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2831. return;
  2832. try {
  2833. await acceptOrder(this.currentOrder.id);
  2834. uni.showToast({ title: "接单成功", icon: "success" });
  2835. this.showAcceptConfirmModal = false;
  2836. this.currentOrder = null;
  2837. this.loadTaskList();
  2838. this.loadProfile();
  2839. this.loadOrderStats();
  2840. } catch (err) {
  2841. formatAppLog("error", "at pages/home/logic.js:212", "接单失败:", err);
  2842. uni.showToast({ title: "接单失败", icon: "none" });
  2843. }
  2844. },
  2845. openNavigation(item, pointType) {
  2846. this.navTargetItem = item;
  2847. this.navTargetPointType = pointType;
  2848. this.showNavModal = true;
  2849. },
  2850. closeNavModal() {
  2851. this.showNavModal = false;
  2852. },
  2853. chooseMap(mapType) {
  2854. let item = this.navTargetItem;
  2855. let pointType = this.navTargetPointType;
  2856. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2857. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2858. this.showNavModal = false;
  2859. uni.openLocation({
  2860. latitude: 30.52,
  2861. // Mock lat
  2862. longitude: 114.31,
  2863. // Mock lng
  2864. name: name || "目的地",
  2865. address: address || "默认地址",
  2866. success: function() {
  2867. formatAppLog("log", "at pages/home/logic.js:238", "打开导航成功: " + mapType);
  2868. }
  2869. });
  2870. },
  2871. selectService(type) {
  2872. this.tempFilter.service = type;
  2873. },
  2874. selectDistance(type) {
  2875. this.tempFilter.distance = type;
  2876. },
  2877. selectAmount(type) {
  2878. this.tempFilter.amount = type;
  2879. },
  2880. resetFilter() {
  2881. this.tempFilter = {
  2882. service: null,
  2883. distance: "全部",
  2884. amount: "全部"
  2885. };
  2886. },
  2887. confirmFilter() {
  2888. this.activeFilter = { ...this.tempFilter };
  2889. this.isFilterShow = false;
  2890. this.loadTaskList();
  2891. },
  2892. closeFilter() {
  2893. this.isFilterShow = false;
  2894. },
  2895. goToDetail(item) {
  2896. formatAppLog("log", "at pages/home/logic.js:267", "Go to detail", item);
  2897. },
  2898. async loadTaskList() {
  2899. try {
  2900. const params = {
  2901. service: this.activeFilter.service,
  2902. minPrice: this.getMinPrice(),
  2903. maxPrice: this.getMaxPrice(),
  2904. pageNum: 1,
  2905. pageSize: 20
  2906. };
  2907. const res = await getPendingOrders(params);
  2908. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  2909. } catch (err) {
  2910. formatAppLog("error", "at pages/home/logic.js:281", "获取订单列表失败:", err);
  2911. uni.showToast({ title: "加载失败", icon: "none" });
  2912. this.taskList = [];
  2913. }
  2914. },
  2915. getMinPrice() {
  2916. const amount = this.activeFilter.amount;
  2917. if (amount === "100以下")
  2918. return 0;
  2919. if (amount === "100-200")
  2920. return 1e4;
  2921. if (amount === "200-500")
  2922. return 2e4;
  2923. if (amount === "500以上")
  2924. return 5e4;
  2925. return void 0;
  2926. },
  2927. getMaxPrice() {
  2928. const amount = this.activeFilter.amount;
  2929. if (amount === "100以下")
  2930. return 1e4;
  2931. if (amount === "100-200")
  2932. return 2e4;
  2933. if (amount === "200-500")
  2934. return 5e4;
  2935. return void 0;
  2936. },
  2937. transformOrder(item) {
  2938. const service = this.serviceList.find((s) => s.id === item.service);
  2939. const serviceText = (service == null ? void 0 : service.name) || "未知";
  2940. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  2941. const mode = (service == null ? void 0 : service.mode) || 0;
  2942. const isRoundTrip = mode === 1;
  2943. return {
  2944. id: item.id,
  2945. type: isRoundTrip ? 1 : item.service,
  2946. typeText: serviceText,
  2947. typeIcon: serviceIcon,
  2948. price: (item.price / 100).toFixed(2),
  2949. timeLabel: "服务时间",
  2950. time: item.serviceTime,
  2951. petAvatar: item.petAvatar || "/static/dog.png",
  2952. petAvatarUrl: item.petAvatarUrl || "",
  2953. petName: item.petName,
  2954. petBreed: item.breed,
  2955. petGender: "M",
  2956. petAge: "",
  2957. petWeight: "",
  2958. petPersonality: "",
  2959. petHobby: "",
  2960. petRemark: "",
  2961. petTags: [],
  2962. petLogs: [],
  2963. startLocation: isRoundTrip ? item.fromAddress : "",
  2964. startAddress: isRoundTrip ? item.fromAddress : "",
  2965. startDistance: "0km",
  2966. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  2967. endAddress: item.toAddress,
  2968. endDistance: "0km",
  2969. serviceContent: "",
  2970. remark: item.remark || ""
  2971. };
  2972. },
  2973. setFilter(type) {
  2974. this.currentFilter = type;
  2975. if (type === "distance") {
  2976. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  2977. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  2978. } else if (type === "time") {
  2979. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  2980. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  2981. }
  2982. },
  2983. showFilterDropdown() {
  2984. this.toggleFilter();
  2985. }
  2986. }
  2987. };
  2988. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  2989. const _sfc_main$t = {
  2990. ...logic$3
  2991. };
  2992. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  2993. var _a, _b, _c;
  2994. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  2995. return vue.openBlock(), vue.createElementBlock(
  2996. vue.Fragment,
  2997. null,
  2998. [
  2999. vue.createElementVNode("view", { class: "container" }, [
  3000. vue.createElementVNode(
  3001. "view",
  3002. {
  3003. class: "custom-nav-bar",
  3004. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3005. },
  3006. [
  3007. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3008. ],
  3009. 4
  3010. /* STYLE */
  3011. ),
  3012. vue.createElementVNode("view", { class: "nav-bg" }, [
  3013. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3014. vue.createElementVNode("view", { class: "bg-circle-right" })
  3015. ]),
  3016. vue.createElementVNode("view", { class: "header-section" }, [
  3017. vue.createElementVNode("view", { class: "user-info" }, [
  3018. vue.createElementVNode("image", {
  3019. class: "avatar",
  3020. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3021. mode: "aspectFill"
  3022. }, null, 8, ["src"]),
  3023. vue.createElementVNode("view", { class: "info-content" }, [
  3024. vue.createElementVNode("view", { class: "top-row" }, [
  3025. vue.createElementVNode(
  3026. "text",
  3027. { class: "name" },
  3028. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3029. 1
  3030. /* TEXT */
  3031. ),
  3032. vue.createElementVNode(
  3033. "view",
  3034. {
  3035. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus === "resting" }]),
  3036. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3037. },
  3038. [
  3039. vue.createElementVNode("view", { class: "status-dot-bg" }, [
  3040. _ctx.workStatus === "working" ? (vue.openBlock(), vue.createElementBlock("text", {
  3041. key: 0,
  3042. class: "check-mark"
  3043. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3044. key: 1,
  3045. class: "check-mark",
  3046. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3047. }, "✕"))
  3048. ]),
  3049. vue.createElementVNode(
  3050. "text",
  3051. { class: "status-text" },
  3052. vue.toDisplayString(_ctx.workStatus === "working" ? "接单中" : "正在休息"),
  3053. 1
  3054. /* TEXT */
  3055. ),
  3056. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3057. ],
  3058. 2
  3059. /* CLASS */
  3060. )
  3061. ]),
  3062. vue.createElementVNode("view", { class: "bottom-row" }, [
  3063. vue.createElementVNode(
  3064. "text",
  3065. { class: "city-label" },
  3066. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3067. 1
  3068. /* TEXT */
  3069. ),
  3070. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3071. ])
  3072. ])
  3073. ]),
  3074. vue.createElementVNode("view", { class: "stats-card" }, [
  3075. vue.createElementVNode("view", { class: "stat-item" }, [
  3076. vue.createElementVNode(
  3077. "text",
  3078. { class: "num" },
  3079. vue.toDisplayString(_ctx.orderStats.total),
  3080. 1
  3081. /* TEXT */
  3082. ),
  3083. vue.createElementVNode("text", { class: "label" }, "全部订单")
  3084. ]),
  3085. vue.createElementVNode("view", { class: "divider" }),
  3086. vue.createElementVNode("view", { class: "stat-item" }, [
  3087. vue.createElementVNode(
  3088. "text",
  3089. { class: "num" },
  3090. vue.toDisplayString(_ctx.orderStats.reject),
  3091. 1
  3092. /* TEXT */
  3093. ),
  3094. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3095. ]),
  3096. vue.createElementVNode("view", { class: "divider" }),
  3097. vue.createElementVNode("view", { class: "stat-item" }, [
  3098. vue.createElementVNode(
  3099. "text",
  3100. { class: "num" },
  3101. vue.toDisplayString(_ctx.orderStats.completed),
  3102. 1
  3103. /* TEXT */
  3104. ),
  3105. vue.createElementVNode("text", { class: "label" }, "完成订单")
  3106. ]),
  3107. vue.createElementVNode("view", { class: "divider" }),
  3108. vue.createElementVNode("view", { class: "stat-item" }, [
  3109. vue.createElementVNode(
  3110. "text",
  3111. { class: "num" },
  3112. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  3113. 1
  3114. /* TEXT */
  3115. ),
  3116. vue.createElementVNode("text", { class: "label" }, "服务总得")
  3117. ])
  3118. ])
  3119. ]),
  3120. vue.createElementVNode("view", { class: "task-header" }, [
  3121. vue.createElementVNode(
  3122. "view",
  3123. {
  3124. class: "header-inner",
  3125. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3126. },
  3127. [
  3128. vue.createElementVNode("view", { class: "left-title" }, [
  3129. vue.createElementVNode("view", { class: "orange-bar" }),
  3130. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3131. vue.createElementVNode(
  3132. "text",
  3133. { class: "count" },
  3134. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3135. 1
  3136. /* TEXT */
  3137. )
  3138. ]),
  3139. vue.createElementVNode("view", { class: "filter-options" }, [
  3140. vue.createElementVNode("view", {
  3141. class: "dropdown",
  3142. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3143. }, [
  3144. vue.createElementVNode("text", null, "筛选条件"),
  3145. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3146. ])
  3147. ])
  3148. ],
  3149. 4
  3150. /* STYLE */
  3151. ),
  3152. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3153. key: 0,
  3154. class: "filter-mask",
  3155. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3156. })) : vue.createCommentVNode("v-if", true),
  3157. vue.createElementVNode(
  3158. "view",
  3159. {
  3160. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3161. },
  3162. [
  3163. vue.createElementVNode("view", { class: "filter-section" }, [
  3164. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3165. vue.createElementVNode("view", { class: "options-grid" }, [
  3166. vue.createElementVNode(
  3167. "view",
  3168. {
  3169. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3170. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3171. },
  3172. "全部",
  3173. 2
  3174. /* CLASS */
  3175. ),
  3176. (vue.openBlock(true), vue.createElementBlock(
  3177. vue.Fragment,
  3178. null,
  3179. vue.renderList(_ctx.serviceList, (item) => {
  3180. return vue.openBlock(), vue.createElementBlock("view", {
  3181. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3182. key: item.id,
  3183. onClick: ($event) => _ctx.selectService(item.id)
  3184. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3185. }),
  3186. 128
  3187. /* KEYED_FRAGMENT */
  3188. ))
  3189. ])
  3190. ]),
  3191. vue.createElementVNode("view", { class: "filter-section" }, [
  3192. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3193. vue.createElementVNode("view", { class: "options-grid" }, [
  3194. vue.createElementVNode(
  3195. "view",
  3196. {
  3197. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3198. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3199. },
  3200. "全部",
  3201. 2
  3202. /* CLASS */
  3203. ),
  3204. vue.createElementVNode(
  3205. "view",
  3206. {
  3207. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3208. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3209. },
  3210. "100以下",
  3211. 2
  3212. /* CLASS */
  3213. ),
  3214. vue.createElementVNode(
  3215. "view",
  3216. {
  3217. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3218. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3219. },
  3220. "100-200",
  3221. 2
  3222. /* CLASS */
  3223. ),
  3224. vue.createElementVNode(
  3225. "view",
  3226. {
  3227. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3228. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3229. },
  3230. "200-500",
  3231. 2
  3232. /* CLASS */
  3233. ),
  3234. vue.createElementVNode(
  3235. "view",
  3236. {
  3237. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3238. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3239. },
  3240. "500以上",
  3241. 2
  3242. /* CLASS */
  3243. )
  3244. ])
  3245. ]),
  3246. vue.createElementVNode("view", { class: "filter-actions" }, [
  3247. vue.createElementVNode("button", {
  3248. class: "action-btn reset",
  3249. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3250. }, "重置"),
  3251. vue.createElementVNode("button", {
  3252. class: "action-btn confirm",
  3253. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3254. }, "确认")
  3255. ])
  3256. ],
  3257. 2
  3258. /* CLASS */
  3259. )
  3260. ]),
  3261. vue.createElementVNode("view", { class: "task-list-container" }, [
  3262. vue.createElementVNode("view", { class: "task-list" }, [
  3263. (vue.openBlock(true), vue.createElementBlock(
  3264. vue.Fragment,
  3265. null,
  3266. vue.renderList(_ctx.taskList, (item, index) => {
  3267. return vue.openBlock(), vue.createElementBlock("view", {
  3268. class: "task-card",
  3269. key: index,
  3270. onClick: ($event) => _ctx.goToDetail(item)
  3271. }, [
  3272. vue.createElementVNode("view", { class: "card-header" }, [
  3273. vue.createElementVNode("view", { class: "type-badge" }, [
  3274. vue.createElementVNode("image", {
  3275. class: "type-icon",
  3276. src: item.typeIcon
  3277. }, null, 8, ["src"]),
  3278. vue.createElementVNode(
  3279. "text",
  3280. { class: "type-text" },
  3281. vue.toDisplayString(item.typeText),
  3282. 1
  3283. /* TEXT */
  3284. )
  3285. ]),
  3286. vue.createElementVNode(
  3287. "text",
  3288. { class: "price" },
  3289. "¥" + vue.toDisplayString(item.price),
  3290. 1
  3291. /* TEXT */
  3292. )
  3293. ]),
  3294. vue.createElementVNode("view", { class: "card-body" }, [
  3295. vue.createElementVNode("view", { class: "time-row" }, [
  3296. vue.createElementVNode(
  3297. "text",
  3298. { class: "label" },
  3299. vue.toDisplayString(item.timeLabel) + ":",
  3300. 1
  3301. /* TEXT */
  3302. ),
  3303. vue.createElementVNode(
  3304. "text",
  3305. { class: "value" },
  3306. vue.toDisplayString(item.time),
  3307. 1
  3308. /* TEXT */
  3309. )
  3310. ]),
  3311. vue.createElementVNode("view", { class: "pet-card" }, [
  3312. vue.createElementVNode("image", {
  3313. class: "pet-avatar",
  3314. src: item.petAvatarUrl || item.petAvatar,
  3315. mode: "aspectFill"
  3316. }, null, 8, ["src"]),
  3317. vue.createElementVNode("view", { class: "pet-info" }, [
  3318. vue.createElementVNode(
  3319. "text",
  3320. { class: "pet-name" },
  3321. vue.toDisplayString(item.petName),
  3322. 1
  3323. /* TEXT */
  3324. ),
  3325. vue.createElementVNode(
  3326. "text",
  3327. { class: "pet-breed" },
  3328. "品种: " + vue.toDisplayString(item.petBreed),
  3329. 1
  3330. /* TEXT */
  3331. )
  3332. ])
  3333. ]),
  3334. vue.createElementVNode("view", { class: "route-info" }, [
  3335. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3336. vue.Fragment,
  3337. { key: 0 },
  3338. [
  3339. vue.createElementVNode("view", {
  3340. class: "route-item",
  3341. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3342. }, [
  3343. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3344. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3345. vue.createElementVNode("view", { class: "address-box" }, [
  3346. vue.createElementVNode(
  3347. "text",
  3348. { class: "addr-title" },
  3349. vue.toDisplayString(item.startLocation),
  3350. 1
  3351. /* TEXT */
  3352. ),
  3353. vue.createElementVNode(
  3354. "text",
  3355. { class: "addr-desc" },
  3356. vue.toDisplayString(item.startAddress),
  3357. 1
  3358. /* TEXT */
  3359. )
  3360. ]),
  3361. vue.createElementVNode("image", {
  3362. class: "nav-arrow",
  3363. src: _imports_3$2,
  3364. style: { "flex-shrink": "0", "align-self": "center" }
  3365. })
  3366. ], 8, ["onClick"]),
  3367. vue.createElementVNode("view", {
  3368. class: "route-item",
  3369. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3370. }, [
  3371. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3372. vue.createElementVNode("view", { class: "address-box" }, [
  3373. vue.createElementVNode(
  3374. "text",
  3375. { class: "addr-title" },
  3376. vue.toDisplayString(item.endLocation),
  3377. 1
  3378. /* TEXT */
  3379. ),
  3380. vue.createElementVNode(
  3381. "text",
  3382. { class: "addr-desc" },
  3383. vue.toDisplayString(item.endAddress),
  3384. 1
  3385. /* TEXT */
  3386. )
  3387. ]),
  3388. vue.createElementVNode("image", {
  3389. class: "nav-arrow",
  3390. src: _imports_3$2,
  3391. style: { "flex-shrink": "0", "align-self": "center" }
  3392. })
  3393. ], 8, ["onClick"])
  3394. ],
  3395. 64
  3396. /* STABLE_FRAGMENT */
  3397. )) : (vue.openBlock(), vue.createElementBlock(
  3398. vue.Fragment,
  3399. { key: 1 },
  3400. [
  3401. vue.createElementVNode("view", {
  3402. class: "route-item",
  3403. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3404. }, [
  3405. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3406. vue.createElementVNode("view", { class: "address-box" }, [
  3407. vue.createElementVNode(
  3408. "text",
  3409. { class: "addr-title" },
  3410. vue.toDisplayString(item.endLocation),
  3411. 1
  3412. /* TEXT */
  3413. ),
  3414. vue.createElementVNode(
  3415. "text",
  3416. { class: "addr-desc" },
  3417. vue.toDisplayString(item.endAddress),
  3418. 1
  3419. /* TEXT */
  3420. )
  3421. ]),
  3422. vue.createElementVNode("image", {
  3423. class: "nav-arrow",
  3424. src: _imports_3$2,
  3425. style: { "flex-shrink": "0", "align-self": "center" }
  3426. })
  3427. ], 8, ["onClick"]),
  3428. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3429. key: 0,
  3430. class: "service-content"
  3431. }, [
  3432. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3433. vue.createElementVNode(
  3434. "text",
  3435. null,
  3436. vue.toDisplayString(item.serviceContent),
  3437. 1
  3438. /* TEXT */
  3439. )
  3440. ])) : vue.createCommentVNode("v-if", true)
  3441. ],
  3442. 64
  3443. /* STABLE_FRAGMENT */
  3444. ))
  3445. ]),
  3446. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3447. key: 0,
  3448. class: "remark-box"
  3449. }, [
  3450. vue.createElementVNode(
  3451. "text",
  3452. null,
  3453. "备注:" + vue.toDisplayString(item.remark),
  3454. 1
  3455. /* TEXT */
  3456. )
  3457. ])) : vue.createCommentVNode("v-if", true)
  3458. ]),
  3459. vue.createElementVNode("view", { class: "action-btns" }, [
  3460. vue.createElementVNode("button", {
  3461. class: "btn reject",
  3462. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3463. }, "拒绝", 8, ["onClick"]),
  3464. vue.createElementVNode("button", {
  3465. class: "btn accept",
  3466. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3467. }, "接单", 8, ["onClick"])
  3468. ])
  3469. ], 8, ["onClick"]);
  3470. }),
  3471. 128
  3472. /* KEYED_FRAGMENT */
  3473. )),
  3474. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3475. ])
  3476. ]),
  3477. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3478. key: 0,
  3479. class: "modal-mask"
  3480. }, [
  3481. vue.createElementVNode("view", { class: "custom-modal" }, [
  3482. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3483. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3484. vue.createElementVNode("view", { class: "modal-btns" }, [
  3485. vue.createElementVNode("button", {
  3486. class: "modal-btn cancel",
  3487. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3488. }, "取消"),
  3489. vue.createElementVNode("button", {
  3490. class: "modal-btn confirm",
  3491. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3492. }, "确定")
  3493. ])
  3494. ])
  3495. ])) : vue.createCommentVNode("v-if", true),
  3496. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3497. key: 1,
  3498. class: "pet-modal-mask",
  3499. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3500. }, [
  3501. vue.createElementVNode("view", {
  3502. class: "pet-modal-content",
  3503. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3504. }, ["stop"]))
  3505. }, [
  3506. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3507. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3508. vue.createElementVNode("view", {
  3509. class: "close-icon-btn",
  3510. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3511. }, "×")
  3512. ]),
  3513. vue.createElementVNode("scroll-view", {
  3514. "scroll-y": "",
  3515. class: "pet-modal-scroll"
  3516. }, [
  3517. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3518. vue.createElementVNode("image", {
  3519. class: "pm-avatar",
  3520. src: _ctx.currentPetInfo.petAvatar,
  3521. mode: "aspectFill"
  3522. }, null, 8, ["src"]),
  3523. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3524. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3525. vue.createElementVNode(
  3526. "text",
  3527. { class: "pm-name" },
  3528. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3529. 1
  3530. /* TEXT */
  3531. ),
  3532. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3533. key: 0,
  3534. class: "pm-gender"
  3535. }, [
  3536. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3537. vue.createElementVNode("text", null, "公")
  3538. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3539. key: 1,
  3540. class: "pm-gender female"
  3541. }, [
  3542. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3543. vue.createElementVNode("text", null, "母")
  3544. ])) : vue.createCommentVNode("v-if", true)
  3545. ]),
  3546. vue.createElementVNode(
  3547. "text",
  3548. { class: "pm-breed" },
  3549. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3550. 1
  3551. /* TEXT */
  3552. )
  3553. ])
  3554. ]),
  3555. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3556. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3557. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3558. vue.createElementVNode(
  3559. "text",
  3560. { class: "pm-val" },
  3561. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3562. 1
  3563. /* TEXT */
  3564. )
  3565. ]),
  3566. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3567. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3568. vue.createElementVNode(
  3569. "text",
  3570. { class: "pm-val" },
  3571. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3572. 1
  3573. /* TEXT */
  3574. )
  3575. ]),
  3576. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3577. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3578. vue.createElementVNode(
  3579. "text",
  3580. { class: "pm-val" },
  3581. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3582. 1
  3583. /* TEXT */
  3584. )
  3585. ]),
  3586. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3587. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3588. vue.createElementVNode(
  3589. "text",
  3590. { class: "pm-val" },
  3591. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3592. 1
  3593. /* TEXT */
  3594. )
  3595. ]),
  3596. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3597. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3598. vue.createElementVNode(
  3599. "text",
  3600. { class: "pm-val" },
  3601. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3602. 1
  3603. /* TEXT */
  3604. )
  3605. ])
  3606. ]),
  3607. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3608. key: 0,
  3609. class: "pm-tags"
  3610. }, [
  3611. (vue.openBlock(true), vue.createElementBlock(
  3612. vue.Fragment,
  3613. null,
  3614. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3615. return vue.openBlock(), vue.createElementBlock(
  3616. "view",
  3617. {
  3618. class: "pm-tag",
  3619. key: index
  3620. },
  3621. vue.toDisplayString(tag),
  3622. 1
  3623. /* TEXT */
  3624. );
  3625. }),
  3626. 128
  3627. /* KEYED_FRAGMENT */
  3628. ))
  3629. ])) : vue.createCommentVNode("v-if", true),
  3630. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3631. vue.createElementVNode("view", { class: "orange-bar" }),
  3632. vue.createElementVNode("text", null, "备注日志")
  3633. ]),
  3634. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3635. (vue.openBlock(true), vue.createElementBlock(
  3636. vue.Fragment,
  3637. null,
  3638. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3639. return vue.openBlock(), vue.createElementBlock("view", {
  3640. class: "pm-log-item",
  3641. key: lIndex
  3642. }, [
  3643. vue.createElementVNode(
  3644. "text",
  3645. { class: "pm-log-date" },
  3646. vue.toDisplayString(log.date),
  3647. 1
  3648. /* TEXT */
  3649. ),
  3650. vue.createElementVNode(
  3651. "text",
  3652. { class: "pm-log-text" },
  3653. vue.toDisplayString(log.content),
  3654. 1
  3655. /* TEXT */
  3656. ),
  3657. vue.createElementVNode(
  3658. "text",
  3659. { class: "pm-log-recorder" },
  3660. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3661. 1
  3662. /* TEXT */
  3663. )
  3664. ]);
  3665. }),
  3666. 128
  3667. /* KEYED_FRAGMENT */
  3668. ))
  3669. ]),
  3670. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3671. vue.createElementVNode("button", {
  3672. class: "pm-bottom-close",
  3673. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3674. }, "关闭"),
  3675. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3676. ])
  3677. ])
  3678. ])) : vue.createCommentVNode("v-if", true)
  3679. ]),
  3680. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3681. key: 0,
  3682. class: "modal-mask"
  3683. }, [
  3684. vue.createElementVNode("view", { class: "custom-modal" }, [
  3685. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3686. vue.withDirectives(vue.createElementVNode(
  3687. "textarea",
  3688. {
  3689. class: "reject-textarea",
  3690. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3691. placeholder: "请输入拒绝理由(必填)",
  3692. maxlength: "100"
  3693. },
  3694. null,
  3695. 512
  3696. /* NEED_PATCH */
  3697. ), [
  3698. [vue.vModelText, _ctx.rejectReason]
  3699. ]),
  3700. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3701. vue.createElementVNode("button", {
  3702. class: "modal-btn cancel",
  3703. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3704. }, "取消"),
  3705. vue.createElementVNode("button", {
  3706. class: "modal-btn confirm",
  3707. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3708. }, "提交")
  3709. ])
  3710. ])
  3711. ])) : vue.createCommentVNode("v-if", true),
  3712. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3713. key: 1,
  3714. class: "modal-mask"
  3715. }, [
  3716. vue.createElementVNode("view", { class: "custom-modal" }, [
  3717. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3718. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3719. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3720. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3721. ]),
  3722. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3723. vue.createElementVNode("button", {
  3724. class: "modal-btn cancel",
  3725. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3726. }, "再想想"),
  3727. vue.createElementVNode("button", {
  3728. class: "modal-btn confirm",
  3729. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3730. }, "确认接单")
  3731. ])
  3732. ])
  3733. ])) : vue.createCommentVNode("v-if", true),
  3734. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3735. key: 2,
  3736. class: "nav-modal-mask",
  3737. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3738. }, [
  3739. vue.createElementVNode("view", {
  3740. class: "nav-action-sheet",
  3741. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3742. }, ["stop"]))
  3743. }, [
  3744. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3745. vue.createElementVNode("view", {
  3746. class: "nav-sheet-item",
  3747. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3748. }, "高德地图"),
  3749. vue.createElementVNode("view", {
  3750. class: "nav-sheet-item",
  3751. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3752. }, "腾讯地图"),
  3753. vue.createElementVNode("view", {
  3754. class: "nav-sheet-item",
  3755. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3756. }, "百度地图"),
  3757. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3758. vue.createElementVNode("view", {
  3759. class: "nav-sheet-item cancel",
  3760. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3761. }, "取消")
  3762. ])
  3763. ])) : vue.createCommentVNode("v-if", true),
  3764. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3765. ],
  3766. 64
  3767. /* STABLE_FRAGMENT */
  3768. );
  3769. }
  3770. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3771. const _sfc_main$s = {
  3772. data() {
  3773. return {
  3774. status: "working"
  3775. // working | resting
  3776. };
  3777. },
  3778. onShow() {
  3779. const savedStatus = uni.getStorageSync("workStatus");
  3780. if (savedStatus) {
  3781. this.status = savedStatus;
  3782. }
  3783. },
  3784. methods: {
  3785. toggleStatus() {
  3786. if (this.status === "working") {
  3787. this.status = "resting";
  3788. uni.setStorageSync("workStatus", "resting");
  3789. } else {
  3790. this.status = "working";
  3791. uni.setStorageSync("workStatus", "working");
  3792. }
  3793. }
  3794. }
  3795. };
  3796. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3797. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3798. vue.createElementVNode("view", { class: "signboard-container" }, [
  3799. vue.createElementVNode("view", { class: "rope" }),
  3800. vue.createElementVNode("view", { class: "nail" }),
  3801. vue.createElementVNode(
  3802. "view",
  3803. {
  3804. class: vue.normalizeClass(["board", { "resting": $data.status === "resting" }])
  3805. },
  3806. [
  3807. vue.createElementVNode("view", { class: "screw top-left" }),
  3808. vue.createElementVNode("view", { class: "screw top-right" }),
  3809. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3810. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3811. vue.createElementVNode("view", { class: "board-inner" }, [
  3812. vue.createElementVNode(
  3813. "text",
  3814. { class: "status-text" },
  3815. vue.toDisplayString($data.status === "working" ? "接单中" : "休息中"),
  3816. 1
  3817. /* TEXT */
  3818. )
  3819. ])
  3820. ],
  3821. 2
  3822. /* CLASS */
  3823. )
  3824. ]),
  3825. vue.createElementVNode("view", { class: "status-desc" }, [
  3826. vue.createElementVNode(
  3827. "text",
  3828. null,
  3829. vue.toDisplayString($data.status === "working" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3830. 1
  3831. /* TEXT */
  3832. )
  3833. ]),
  3834. vue.createElementVNode("view", { class: "action-area" }, [
  3835. vue.createElementVNode(
  3836. "button",
  3837. {
  3838. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "working", "stopped": $data.status === "resting" }]),
  3839. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3840. },
  3841. vue.toDisplayString($data.status === "working" ? "停止接单" : "已停止接单"),
  3842. 3
  3843. /* TEXT, CLASS */
  3844. ),
  3845. vue.createElementVNode("view", { class: "tips" }, [
  3846. $data.status === "working" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3847. ])
  3848. ])
  3849. ]);
  3850. }
  3851. 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"]]);
  3852. const logic$2 = {
  3853. components: {
  3854. customTabbar
  3855. },
  3856. data() {
  3857. return {
  3858. currentTab: 0,
  3859. tabs: ["待接送/服务", "配送/服务中", "已完成", "已拒绝"],
  3860. typeFilterOptions: ["全部类型"],
  3861. currentTypeFilterIdx: 0,
  3862. activeDropdown: 0,
  3863. hasTimeFilter: false,
  3864. currentMonth: "2026年2月",
  3865. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  3866. calendarDays: [],
  3867. selectedDateRange: [],
  3868. allOrderList: [],
  3869. serviceList: [],
  3870. searchContent: "",
  3871. startServiceTime: "",
  3872. endServiceTime: "",
  3873. showPetModal: false,
  3874. currentPetInfo: {},
  3875. showNavModal: false,
  3876. navTargetItem: null,
  3877. navTargetPointType: "",
  3878. activeCallItem: null,
  3879. showRemarkInput: false,
  3880. remarkText: ""
  3881. };
  3882. },
  3883. created() {
  3884. this.initCalendar();
  3885. },
  3886. async onLoad() {
  3887. await this.loadServiceList();
  3888. await this.loadOrders();
  3889. },
  3890. onShow() {
  3891. uni.hideTabBar();
  3892. this.loadOrders();
  3893. },
  3894. async onPullDownRefresh() {
  3895. try {
  3896. await this.loadServiceList();
  3897. await this.loadOrders();
  3898. } finally {
  3899. uni.stopPullDownRefresh();
  3900. }
  3901. },
  3902. watch: {
  3903. currentTab() {
  3904. this.loadOrders();
  3905. },
  3906. currentTypeFilterIdx() {
  3907. this.loadOrders();
  3908. },
  3909. searchContent() {
  3910. this.loadOrders();
  3911. }
  3912. },
  3913. computed: {
  3914. orderList() {
  3915. return this.allOrderList;
  3916. }
  3917. },
  3918. methods: {
  3919. async loadServiceList() {
  3920. try {
  3921. const res = await getServiceList();
  3922. this.serviceList = res.data || [];
  3923. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  3924. } catch (err) {
  3925. formatAppLog("error", "at pages/orders/logic.js:82", "获取服务类型失败:", err);
  3926. }
  3927. },
  3928. async loadOrders() {
  3929. var _a;
  3930. try {
  3931. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  3932. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  3933. const params = {
  3934. status: statusMap[this.currentTab],
  3935. content: this.searchContent || void 0,
  3936. service: serviceId,
  3937. startServiceTime: this.startServiceTime || void 0,
  3938. endServiceTime: this.endServiceTime || void 0
  3939. };
  3940. formatAppLog("log", "at pages/orders/logic.js:96", "订单列表请求参数:", params);
  3941. const res = await getMyOrders(params);
  3942. formatAppLog("log", "at pages/orders/logic.js:98", "订单列表响应:", res);
  3943. const orders = res.rows || [];
  3944. formatAppLog("log", "at pages/orders/logic.js:100", "订单数量:", orders.length);
  3945. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  3946. } catch (err) {
  3947. formatAppLog("error", "at pages/orders/logic.js:103", "获取订单列表失败:", err);
  3948. this.allOrderList = [];
  3949. }
  3950. },
  3951. transformOrder(order, tabIndex) {
  3952. const service = this.serviceList.find((s) => s.id === order.service);
  3953. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3954. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3955. const mode = (service == null ? void 0 : service.mode) || 0;
  3956. const isRoundTrip = mode === 1;
  3957. let statusText = "接单";
  3958. if (tabIndex === 0) {
  3959. statusText = "接单";
  3960. } else if (tabIndex === 1) {
  3961. statusText = isRoundTrip ? "出发" : "开始";
  3962. } else if (tabIndex === 2) {
  3963. statusText = "已完成";
  3964. } else if (tabIndex === 3) {
  3965. statusText = "已拒绝";
  3966. }
  3967. return {
  3968. id: order.id,
  3969. status: order.status,
  3970. // 保存原始 status 用于判断权限
  3971. type: isRoundTrip ? 1 : 2,
  3972. typeText: serviceText,
  3973. typeIcon: serviceIcon,
  3974. statusText,
  3975. price: (order.price / 100).toFixed(2),
  3976. timeLabel: "服务时间",
  3977. time: order.serviceTime || "",
  3978. petAvatar: order.petAvatar || "/static/dog.png",
  3979. petAvatarUrl: order.petAvatarUrl || "",
  3980. petName: order.petName || "",
  3981. petBreed: order.breed || "",
  3982. startLocation: order.fromAddress || "",
  3983. startAddress: order.fromAddress || "",
  3984. startDistance: "0km",
  3985. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  3986. endAddress: order.toAddress || "",
  3987. customerPhone: order.customerPhone || "",
  3988. endDistance: "0km",
  3989. serviceContent: order.remark || "",
  3990. remark: order.remark || ""
  3991. };
  3992. },
  3993. getDisplayStatus(item) {
  3994. if (item.statusText === "已完成")
  3995. return "已完成";
  3996. if (item.statusText === "已拒绝")
  3997. return "已拒绝";
  3998. if (item.statusText === "接单") {
  3999. return item.type === 1 ? "待接送" : "待服务";
  4000. }
  4001. return item.type === 1 ? "配送中" : "服务中";
  4002. },
  4003. getStatusClass(item) {
  4004. let display = this.getDisplayStatus(item);
  4005. if (display === "已完成")
  4006. return "finish";
  4007. if (display === "已拒绝")
  4008. return "reject";
  4009. if (display === "配送中" || display === "服务中")
  4010. return "processing";
  4011. return "highlight";
  4012. },
  4013. goToDetail(item) {
  4014. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4015. },
  4016. showPetProfile(item) {
  4017. this.currentPetInfo = {
  4018. ...item,
  4019. petGender: "M",
  4020. petAge: "2岁",
  4021. petWeight: "15kg",
  4022. petPersonality: "活泼亲人,精力旺盛",
  4023. petHobby: "喜欢追飞盘,爱吃肉干",
  4024. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4025. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4026. petLogs: [
  4027. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4028. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4029. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4030. ]
  4031. };
  4032. this.showPetModal = true;
  4033. },
  4034. closePetProfile() {
  4035. this.showPetModal = false;
  4036. },
  4037. openNavigation(item, pointType) {
  4038. this.navTargetItem = item;
  4039. this.navTargetPointType = pointType;
  4040. this.showNavModal = true;
  4041. },
  4042. closeNavModal() {
  4043. this.showNavModal = false;
  4044. },
  4045. chooseMap(mapType) {
  4046. let item = this.navTargetItem;
  4047. let pointType = this.navTargetPointType;
  4048. let name = pointType === "start" ? item.startLocation : item.endLocation;
  4049. let address = pointType === "start" ? item.startAddress : item.endAddress;
  4050. this.showNavModal = false;
  4051. uni.openLocation({
  4052. latitude: 30.52,
  4053. longitude: 114.31,
  4054. name: name || "目的地",
  4055. address: address || "默认地址",
  4056. success: function() {
  4057. formatAppLog("log", "at pages/orders/logic.js:209", "打开导航成功: " + mapType);
  4058. }
  4059. });
  4060. },
  4061. toggleCallMenu(item) {
  4062. if (this.activeCallItem === item) {
  4063. this.activeCallItem = null;
  4064. } else {
  4065. this.activeCallItem = item;
  4066. }
  4067. },
  4068. closeCallMenu() {
  4069. this.activeCallItem = null;
  4070. },
  4071. doCall(type, item) {
  4072. let phoneNum = "";
  4073. const targetItem = item || this.activeCallItem;
  4074. if (type === "merchant") {
  4075. phoneNum = "18900008451";
  4076. } else if (type === "customer") {
  4077. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4078. }
  4079. if (phoneNum) {
  4080. uni.makePhoneCall({ phoneNumber: phoneNum });
  4081. }
  4082. this.activeCallItem = null;
  4083. },
  4084. reportAbnormal(item) {
  4085. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4086. },
  4087. toggleDropdown(idx) {
  4088. if (this.activeDropdown === idx) {
  4089. this.activeDropdown = 0;
  4090. } else {
  4091. this.activeDropdown = idx;
  4092. }
  4093. },
  4094. closeDropdown() {
  4095. this.activeDropdown = 0;
  4096. },
  4097. selectType(index) {
  4098. this.currentTypeFilterIdx = index;
  4099. this.closeDropdown();
  4100. },
  4101. initCalendar() {
  4102. let days = [];
  4103. for (let i = 1; i <= 28; i++) {
  4104. days.push(i);
  4105. }
  4106. this.calendarDays = days;
  4107. this.selectedDateRange = [2, 4];
  4108. },
  4109. prevMonth() {
  4110. uni.showToast({ title: "上个月", icon: "none" });
  4111. },
  4112. nextMonth() {
  4113. uni.showToast({ title: "下个月", icon: "none" });
  4114. },
  4115. selectDateItem(day) {
  4116. if (this.selectedDateRange.length === 2) {
  4117. this.selectedDateRange = [day];
  4118. } else if (this.selectedDateRange.length === 1) {
  4119. let start = this.selectedDateRange[0];
  4120. if (day > start) {
  4121. this.selectedDateRange = [start, day];
  4122. } else if (day < start) {
  4123. this.selectedDateRange = [day, start];
  4124. } else {
  4125. this.selectedDateRange = [];
  4126. }
  4127. } else {
  4128. this.selectedDateRange = [day];
  4129. }
  4130. },
  4131. getDateClass(day) {
  4132. if (this.selectedDateRange.length === 0)
  4133. return "";
  4134. if (this.selectedDateRange.length === 1) {
  4135. return day === this.selectedDateRange[0] ? "is-start" : "";
  4136. }
  4137. let start = this.selectedDateRange[0];
  4138. let end = this.selectedDateRange[1];
  4139. if (day === start)
  4140. return "is-start";
  4141. if (day === end)
  4142. return "is-end";
  4143. if (day > start && day < end)
  4144. return "is-between";
  4145. return "";
  4146. },
  4147. resetTimeFilter() {
  4148. this.hasTimeFilter = false;
  4149. this.selectedDateRange = [];
  4150. this.startServiceTime = "";
  4151. this.endServiceTime = "";
  4152. this.closeDropdown();
  4153. this.loadOrders();
  4154. },
  4155. confirmTimeFilter() {
  4156. if (this.selectedDateRange.length === 0) {
  4157. uni.showToast({ title: "请先选择日期", icon: "none" });
  4158. return;
  4159. }
  4160. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4161. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4162. const pad = (n) => String(n).padStart(2, "0");
  4163. if (this.selectedDateRange.length === 2) {
  4164. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4165. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4166. } else {
  4167. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4168. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4169. }
  4170. this.hasTimeFilter = true;
  4171. this.closeDropdown();
  4172. this.loadOrders();
  4173. },
  4174. getMainActionText(item) {
  4175. return "查看详情";
  4176. },
  4177. mainAction(item) {
  4178. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4179. },
  4180. openRemarkInput() {
  4181. this.remarkText = "";
  4182. this.showRemarkInput = true;
  4183. },
  4184. closeRemarkInput() {
  4185. this.showRemarkInput = false;
  4186. this.remarkText = "";
  4187. },
  4188. submitRemark() {
  4189. const text = this.remarkText.trim();
  4190. if (!text) {
  4191. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4192. return;
  4193. }
  4194. const now = /* @__PURE__ */ new Date();
  4195. 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")}`;
  4196. if (!this.currentPetInfo.petLogs) {
  4197. this.$set(this.currentPetInfo, "petLogs", []);
  4198. }
  4199. this.currentPetInfo.petLogs.unshift({
  4200. date: dateStr,
  4201. content: text,
  4202. recorder: "我"
  4203. });
  4204. uni.showToast({ title: "备注已添加", icon: "success" });
  4205. this.closeRemarkInput();
  4206. },
  4207. /**
  4208. * 取消订单处理逻辑
  4209. * @param {Object} item - 订单项
  4210. */
  4211. handleCancelOrder(item) {
  4212. uni.showModal({
  4213. title: "提示",
  4214. content: "确认是否取消这个订单?",
  4215. success: async (res) => {
  4216. if (res.confirm) {
  4217. try {
  4218. uni.showLoading({ title: "取消中...", mask: true });
  4219. await cancelOrderApi({ orderId: item.id });
  4220. uni.showToast({ title: "订单已取消", icon: "success" });
  4221. setTimeout(() => {
  4222. this.loadOrders();
  4223. }, 1500);
  4224. } catch (err) {
  4225. formatAppLog("error", "at pages/orders/logic.js:371", "取消订单失败:", err);
  4226. uni.showToast({ title: "取消失败", icon: "none" });
  4227. } finally {
  4228. uni.hideLoading();
  4229. }
  4230. }
  4231. }
  4232. });
  4233. }
  4234. }
  4235. };
  4236. const _sfc_main$r = {
  4237. ...logic$2
  4238. };
  4239. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4240. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4241. return vue.openBlock(), vue.createElementBlock(
  4242. vue.Fragment,
  4243. null,
  4244. [
  4245. vue.createElementVNode("view", { class: "container" }, [
  4246. vue.createElementVNode("view", { class: "sticky-header" }, [
  4247. vue.createElementVNode("view", { class: "status-tabs" }, [
  4248. (vue.openBlock(true), vue.createElementBlock(
  4249. vue.Fragment,
  4250. null,
  4251. vue.renderList(_ctx.tabs, (tab, index) => {
  4252. return vue.openBlock(), vue.createElementBlock("view", {
  4253. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4254. key: index,
  4255. onClick: ($event) => _ctx.currentTab = index
  4256. }, [
  4257. vue.createElementVNode(
  4258. "text",
  4259. null,
  4260. vue.toDisplayString(tab),
  4261. 1
  4262. /* TEXT */
  4263. ),
  4264. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4265. key: 0,
  4266. class: "indicator"
  4267. })) : vue.createCommentVNode("v-if", true)
  4268. ], 10, ["onClick"]);
  4269. }),
  4270. 128
  4271. /* KEYED_FRAGMENT */
  4272. ))
  4273. ]),
  4274. vue.createElementVNode("view", { class: "search-bar" }, [
  4275. vue.createElementVNode("view", { class: "search-input-box" }, [
  4276. vue.withDirectives(vue.createElementVNode(
  4277. "input",
  4278. {
  4279. class: "search-input",
  4280. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4281. placeholder: "搜索地址/电话/姓名",
  4282. "placeholder-class": "ph-style"
  4283. },
  4284. null,
  4285. 512
  4286. /* NEED_PATCH */
  4287. ), [
  4288. [vue.vModelText, _ctx.searchContent]
  4289. ])
  4290. ])
  4291. ]),
  4292. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4293. vue.createElementVNode("view", { class: "filter-bar" }, [
  4294. vue.createElementVNode(
  4295. "view",
  4296. {
  4297. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4298. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4299. },
  4300. [
  4301. vue.createElementVNode(
  4302. "text",
  4303. {
  4304. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4305. },
  4306. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4307. 3
  4308. /* TEXT, CLASS */
  4309. ),
  4310. vue.createElementVNode(
  4311. "view",
  4312. {
  4313. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4314. },
  4315. null,
  4316. 2
  4317. /* CLASS */
  4318. )
  4319. ],
  4320. 2
  4321. /* CLASS */
  4322. ),
  4323. vue.createElementVNode(
  4324. "view",
  4325. {
  4326. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4327. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4328. },
  4329. [
  4330. vue.createElementVNode(
  4331. "text",
  4332. {
  4333. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4334. },
  4335. "服务时间",
  4336. 2
  4337. /* CLASS */
  4338. ),
  4339. vue.createElementVNode(
  4340. "view",
  4341. {
  4342. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4343. },
  4344. null,
  4345. 2
  4346. /* CLASS */
  4347. )
  4348. ],
  4349. 2
  4350. /* CLASS */
  4351. )
  4352. ]),
  4353. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4354. key: 0,
  4355. class: "dropdown-mask",
  4356. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4357. })) : vue.createCommentVNode("v-if", true),
  4358. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4359. key: 1,
  4360. class: "dropdown-panel"
  4361. }, [
  4362. (vue.openBlock(true), vue.createElementBlock(
  4363. vue.Fragment,
  4364. null,
  4365. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4366. return vue.openBlock(), vue.createElementBlock("view", {
  4367. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4368. key: index,
  4369. onClick: ($event) => _ctx.selectType(index)
  4370. }, [
  4371. vue.createElementVNode(
  4372. "text",
  4373. null,
  4374. vue.toDisplayString(item),
  4375. 1
  4376. /* TEXT */
  4377. )
  4378. ], 10, ["onClick"]);
  4379. }),
  4380. 128
  4381. /* KEYED_FRAGMENT */
  4382. ))
  4383. ])) : vue.createCommentVNode("v-if", true),
  4384. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4385. key: 2,
  4386. class: "dropdown-panel calendar-panel"
  4387. }, [
  4388. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4389. vue.createElementVNode("view", { class: "cal-header" }, [
  4390. vue.createElementVNode("text", {
  4391. class: "cal-nav-btn",
  4392. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4393. }, "‹"),
  4394. vue.createElementVNode(
  4395. "text",
  4396. { class: "cal-title" },
  4397. vue.toDisplayString(_ctx.currentMonth),
  4398. 1
  4399. /* TEXT */
  4400. ),
  4401. vue.createElementVNode("text", {
  4402. class: "cal-nav-btn",
  4403. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4404. }, "›")
  4405. ]),
  4406. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4407. (vue.openBlock(true), vue.createElementBlock(
  4408. vue.Fragment,
  4409. null,
  4410. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4411. return vue.openBlock(), vue.createElementBlock(
  4412. "text",
  4413. {
  4414. key: idx,
  4415. class: "wk-item"
  4416. },
  4417. vue.toDisplayString(wk),
  4418. 1
  4419. /* TEXT */
  4420. );
  4421. }),
  4422. 128
  4423. /* KEYED_FRAGMENT */
  4424. ))
  4425. ]),
  4426. vue.createElementVNode("view", { class: "cal-body" }, [
  4427. (vue.openBlock(true), vue.createElementBlock(
  4428. vue.Fragment,
  4429. null,
  4430. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4431. return vue.openBlock(), vue.createElementBlock("view", {
  4432. key: idx,
  4433. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4434. onClick: ($event) => _ctx.selectDateItem(day)
  4435. }, [
  4436. vue.createElementVNode(
  4437. "view",
  4438. { class: "cal-day-text" },
  4439. vue.toDisplayString(day),
  4440. 1
  4441. /* TEXT */
  4442. )
  4443. ], 10, ["onClick"]);
  4444. }),
  4445. 128
  4446. /* KEYED_FRAGMENT */
  4447. ))
  4448. ])
  4449. ]),
  4450. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4451. vue.createElementVNode("button", {
  4452. class: "cal-btn reset",
  4453. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4454. }, "重置"),
  4455. vue.createElementVNode("button", {
  4456. class: "cal-btn confirm",
  4457. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4458. }, "确定")
  4459. ])
  4460. ])) : vue.createCommentVNode("v-if", true)
  4461. ])
  4462. ]),
  4463. vue.createElementVNode("view", { class: "order-list" }, [
  4464. (vue.openBlock(true), vue.createElementBlock(
  4465. vue.Fragment,
  4466. null,
  4467. vue.renderList(_ctx.orderList, (item, index) => {
  4468. return vue.openBlock(), vue.createElementBlock("view", {
  4469. class: "order-card",
  4470. key: index,
  4471. onClick: ($event) => _ctx.goToDetail(item)
  4472. }, [
  4473. vue.createElementVNode("view", { class: "card-header" }, [
  4474. vue.createElementVNode("view", { class: "type-badge" }, [
  4475. vue.createElementVNode("image", {
  4476. class: "type-icon",
  4477. src: item.typeIcon
  4478. }, null, 8, ["src"]),
  4479. vue.createElementVNode(
  4480. "text",
  4481. { class: "type-text" },
  4482. vue.toDisplayString(item.typeText),
  4483. 1
  4484. /* TEXT */
  4485. )
  4486. ]),
  4487. vue.createElementVNode(
  4488. "text",
  4489. {
  4490. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4491. },
  4492. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4493. 3
  4494. /* TEXT, CLASS */
  4495. )
  4496. ]),
  4497. vue.createElementVNode("view", { class: "card-body" }, [
  4498. vue.createElementVNode("view", { class: "time-row" }, [
  4499. vue.createElementVNode("view", { class: "time-col" }, [
  4500. vue.createElementVNode(
  4501. "text",
  4502. { class: "label" },
  4503. vue.toDisplayString(item.timeLabel) + ":",
  4504. 1
  4505. /* TEXT */
  4506. ),
  4507. vue.createElementVNode(
  4508. "text",
  4509. { class: "value" },
  4510. vue.toDisplayString(item.time),
  4511. 1
  4512. /* TEXT */
  4513. )
  4514. ]),
  4515. vue.createElementVNode(
  4516. "text",
  4517. { class: "price" },
  4518. "¥" + vue.toDisplayString(item.price),
  4519. 1
  4520. /* TEXT */
  4521. )
  4522. ]),
  4523. vue.createElementVNode("view", { class: "pet-card" }, [
  4524. vue.createElementVNode("image", {
  4525. class: "pet-avatar",
  4526. src: item.petAvatarUrl || item.petAvatar,
  4527. mode: "aspectFill"
  4528. }, null, 8, ["src"]),
  4529. vue.createElementVNode("view", { class: "pet-info" }, [
  4530. vue.createElementVNode(
  4531. "text",
  4532. { class: "pet-name" },
  4533. vue.toDisplayString(item.petName),
  4534. 1
  4535. /* TEXT */
  4536. ),
  4537. vue.createElementVNode(
  4538. "text",
  4539. { class: "pet-breed" },
  4540. "品种: " + vue.toDisplayString(item.petBreed),
  4541. 1
  4542. /* TEXT */
  4543. )
  4544. ])
  4545. ]),
  4546. vue.createElementVNode("view", { class: "route-info" }, [
  4547. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4548. vue.Fragment,
  4549. { key: 0 },
  4550. [
  4551. vue.createElementVNode("view", {
  4552. class: "route-item",
  4553. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4554. }, [
  4555. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4556. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4557. vue.createElementVNode("view", { class: "address-box" }, [
  4558. vue.createElementVNode(
  4559. "text",
  4560. { class: "addr-title" },
  4561. vue.toDisplayString(item.startLocation),
  4562. 1
  4563. /* TEXT */
  4564. ),
  4565. vue.createElementVNode(
  4566. "text",
  4567. { class: "addr-desc" },
  4568. vue.toDisplayString(item.startAddress),
  4569. 1
  4570. /* TEXT */
  4571. )
  4572. ]),
  4573. vue.createElementVNode("image", {
  4574. class: "nav-arrow",
  4575. src: _imports_3$2,
  4576. style: { "flex-shrink": "0", "align-self": "center" }
  4577. })
  4578. ], 8, ["onClick"]),
  4579. vue.createElementVNode("view", {
  4580. class: "route-item",
  4581. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4582. }, [
  4583. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4584. vue.createElementVNode("view", { class: "address-box" }, [
  4585. vue.createElementVNode(
  4586. "text",
  4587. { class: "addr-title" },
  4588. vue.toDisplayString(item.endLocation),
  4589. 1
  4590. /* TEXT */
  4591. ),
  4592. vue.createElementVNode(
  4593. "text",
  4594. { class: "addr-desc" },
  4595. vue.toDisplayString(item.endAddress),
  4596. 1
  4597. /* TEXT */
  4598. )
  4599. ]),
  4600. vue.createElementVNode("image", {
  4601. class: "nav-arrow",
  4602. src: _imports_3$2,
  4603. style: { "flex-shrink": "0", "align-self": "center" }
  4604. })
  4605. ], 8, ["onClick"])
  4606. ],
  4607. 64
  4608. /* STABLE_FRAGMENT */
  4609. )) : (vue.openBlock(), vue.createElementBlock(
  4610. vue.Fragment,
  4611. { key: 1 },
  4612. [
  4613. vue.createElementVNode("view", {
  4614. class: "route-item",
  4615. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4616. }, [
  4617. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4618. vue.createElementVNode("view", { class: "address-box" }, [
  4619. vue.createElementVNode(
  4620. "text",
  4621. { class: "addr-title" },
  4622. vue.toDisplayString(item.endLocation),
  4623. 1
  4624. /* TEXT */
  4625. ),
  4626. vue.createElementVNode(
  4627. "text",
  4628. { class: "addr-desc" },
  4629. vue.toDisplayString(item.endAddress),
  4630. 1
  4631. /* TEXT */
  4632. )
  4633. ]),
  4634. vue.createElementVNode("image", {
  4635. class: "nav-arrow",
  4636. src: _imports_3$2,
  4637. style: { "flex-shrink": "0", "align-self": "center" }
  4638. })
  4639. ], 8, ["onClick"]),
  4640. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4641. key: 0,
  4642. class: "service-content"
  4643. }, [
  4644. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4645. vue.createElementVNode(
  4646. "text",
  4647. null,
  4648. vue.toDisplayString(item.serviceContent),
  4649. 1
  4650. /* TEXT */
  4651. )
  4652. ])) : vue.createCommentVNode("v-if", true)
  4653. ],
  4654. 64
  4655. /* STABLE_FRAGMENT */
  4656. ))
  4657. ]),
  4658. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4659. key: 0,
  4660. class: "remark-box"
  4661. }, [
  4662. vue.createElementVNode(
  4663. "text",
  4664. null,
  4665. "备注:" + vue.toDisplayString(item.remark),
  4666. 1
  4667. /* TEXT */
  4668. )
  4669. ])) : vue.createCommentVNode("v-if", true)
  4670. ]),
  4671. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4672. key: 0,
  4673. class: "action-btns"
  4674. }, [
  4675. vue.createElementVNode("view", { class: "action-left" }, [
  4676. vue.createElementVNode("button", {
  4677. class: "btn normal",
  4678. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4679. }, "拨号", 8, ["onClick"])
  4680. ]),
  4681. vue.createElementVNode("view", { class: "action-right" }, [
  4682. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4683. key: 0,
  4684. class: "btn normal danger",
  4685. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4686. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4687. vue.createElementVNode("button", {
  4688. class: "btn normal",
  4689. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4690. }, "异常上报", 8, ["onClick"]),
  4691. vue.createElementVNode("button", {
  4692. class: "btn primary",
  4693. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4694. }, "打卡", 8, ["onClick"])
  4695. ])
  4696. ])) : vue.createCommentVNode("v-if", true)
  4697. ], 8, ["onClick"]);
  4698. }),
  4699. 128
  4700. /* KEYED_FRAGMENT */
  4701. )),
  4702. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4703. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4704. ]),
  4705. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4706. key: 0,
  4707. class: "call-mask",
  4708. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4709. })) : vue.createCommentVNode("v-if", true)
  4710. ]),
  4711. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4712. key: 0,
  4713. class: "pet-modal-mask",
  4714. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4715. }, [
  4716. vue.createElementVNode("view", {
  4717. class: "pet-modal-content",
  4718. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4719. }, ["stop"]))
  4720. }, [
  4721. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4722. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4723. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4724. vue.createElementVNode("view", {
  4725. class: "pm-remark-btn",
  4726. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4727. }, "备注"),
  4728. vue.createElementVNode("view", {
  4729. class: "close-icon-btn",
  4730. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4731. }, "×")
  4732. ])
  4733. ]),
  4734. vue.createElementVNode("scroll-view", {
  4735. "scroll-y": "",
  4736. class: "pet-modal-scroll"
  4737. }, [
  4738. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4739. vue.createElementVNode("image", {
  4740. class: "pm-avatar",
  4741. src: _ctx.currentPetInfo.petAvatar,
  4742. mode: "aspectFill"
  4743. }, null, 8, ["src"]),
  4744. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4745. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4746. vue.createElementVNode(
  4747. "text",
  4748. { class: "pm-name" },
  4749. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4750. 1
  4751. /* TEXT */
  4752. ),
  4753. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4754. key: 0,
  4755. class: "pm-gender"
  4756. }, [
  4757. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4758. vue.createElementVNode("text", null, "公")
  4759. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4760. key: 1,
  4761. class: "pm-gender female"
  4762. }, [
  4763. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4764. vue.createElementVNode("text", null, "母")
  4765. ])) : vue.createCommentVNode("v-if", true)
  4766. ]),
  4767. vue.createElementVNode(
  4768. "text",
  4769. { class: "pm-breed" },
  4770. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4771. 1
  4772. /* TEXT */
  4773. )
  4774. ])
  4775. ]),
  4776. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4777. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4778. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4779. vue.createElementVNode(
  4780. "text",
  4781. { class: "pm-val" },
  4782. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4783. 1
  4784. /* TEXT */
  4785. )
  4786. ]),
  4787. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4788. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4789. vue.createElementVNode(
  4790. "text",
  4791. { class: "pm-val" },
  4792. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4793. 1
  4794. /* TEXT */
  4795. )
  4796. ]),
  4797. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4798. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4799. vue.createElementVNode(
  4800. "text",
  4801. { class: "pm-val" },
  4802. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4803. 1
  4804. /* TEXT */
  4805. )
  4806. ]),
  4807. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4808. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4809. vue.createElementVNode(
  4810. "text",
  4811. { class: "pm-val" },
  4812. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4813. 1
  4814. /* TEXT */
  4815. )
  4816. ]),
  4817. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4818. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4819. vue.createElementVNode(
  4820. "text",
  4821. { class: "pm-val" },
  4822. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4823. 1
  4824. /* TEXT */
  4825. )
  4826. ])
  4827. ]),
  4828. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4829. key: 0,
  4830. class: "pm-tags"
  4831. }, [
  4832. (vue.openBlock(true), vue.createElementBlock(
  4833. vue.Fragment,
  4834. null,
  4835. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4836. return vue.openBlock(), vue.createElementBlock(
  4837. "view",
  4838. {
  4839. class: "pm-tag",
  4840. key: index
  4841. },
  4842. vue.toDisplayString(tag),
  4843. 1
  4844. /* TEXT */
  4845. );
  4846. }),
  4847. 128
  4848. /* KEYED_FRAGMENT */
  4849. ))
  4850. ])) : vue.createCommentVNode("v-if", true),
  4851. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4852. vue.createElementVNode("view", { class: "orange-bar" }),
  4853. vue.createElementVNode("text", null, "备注日志")
  4854. ]),
  4855. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4856. (vue.openBlock(true), vue.createElementBlock(
  4857. vue.Fragment,
  4858. null,
  4859. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4860. return vue.openBlock(), vue.createElementBlock("view", {
  4861. class: "pm-log-item",
  4862. key: lIndex
  4863. }, [
  4864. vue.createElementVNode(
  4865. "text",
  4866. { class: "pm-log-date" },
  4867. vue.toDisplayString(log.date),
  4868. 1
  4869. /* TEXT */
  4870. ),
  4871. vue.createElementVNode(
  4872. "text",
  4873. { class: "pm-log-text" },
  4874. vue.toDisplayString(log.content),
  4875. 1
  4876. /* TEXT */
  4877. ),
  4878. vue.createElementVNode(
  4879. "text",
  4880. { class: "pm-log-recorder" },
  4881. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  4882. 1
  4883. /* TEXT */
  4884. )
  4885. ]);
  4886. }),
  4887. 128
  4888. /* KEYED_FRAGMENT */
  4889. ))
  4890. ]),
  4891. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  4892. ])
  4893. ])
  4894. ])) : vue.createCommentVNode("v-if", true),
  4895. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  4896. key: 1,
  4897. class: "remark-mask",
  4898. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4899. }, [
  4900. vue.createElementVNode("view", {
  4901. class: "remark-sheet",
  4902. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  4903. }, ["stop"]))
  4904. }, [
  4905. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  4906. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  4907. vue.createElementVNode("view", {
  4908. class: "close-icon-btn",
  4909. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4910. }, "×")
  4911. ]),
  4912. vue.withDirectives(vue.createElementVNode(
  4913. "textarea",
  4914. {
  4915. class: "remark-textarea",
  4916. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  4917. placeholder: "请输入备注内容...",
  4918. maxlength: "500",
  4919. "auto-height": ""
  4920. },
  4921. null,
  4922. 512
  4923. /* NEED_PATCH */
  4924. ), [
  4925. [vue.vModelText, _ctx.remarkText]
  4926. ]),
  4927. vue.createElementVNode("view", {
  4928. class: "remark-submit-btn",
  4929. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  4930. }, "提交备注")
  4931. ])
  4932. ])) : vue.createCommentVNode("v-if", true),
  4933. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4934. key: 2,
  4935. class: "nav-modal-mask",
  4936. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4937. }, [
  4938. vue.createElementVNode("view", {
  4939. class: "nav-action-sheet",
  4940. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  4941. }, ["stop"]))
  4942. }, [
  4943. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  4944. vue.createElementVNode("view", {
  4945. class: "nav-sheet-item",
  4946. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  4947. }, "高德地图"),
  4948. vue.createElementVNode("view", {
  4949. class: "nav-sheet-item",
  4950. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  4951. }, "腾讯地图"),
  4952. vue.createElementVNode("view", {
  4953. class: "nav-sheet-item",
  4954. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  4955. }, "百度地图"),
  4956. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  4957. vue.createElementVNode("view", {
  4958. class: "nav-sheet-item cancel",
  4959. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4960. }, "取消")
  4961. ])
  4962. ])) : vue.createCommentVNode("v-if", true),
  4963. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  4964. ],
  4965. 64
  4966. /* STABLE_FRAGMENT */
  4967. );
  4968. }
  4969. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  4970. function getDictDataByType(dictType) {
  4971. return request({
  4972. url: `/system/dict/data/type/${dictType}`,
  4973. method: "GET"
  4974. });
  4975. }
  4976. function getPetDetail(id) {
  4977. return request({
  4978. url: `/archieves/pet/${id}`,
  4979. method: "GET"
  4980. });
  4981. }
  4982. function submitPetRemark(data) {
  4983. return request({
  4984. url: "/archieves/pet/remark",
  4985. method: "POST",
  4986. data
  4987. });
  4988. }
  4989. function listChangeLog(params) {
  4990. return request({
  4991. url: "/archieves/changeLog/listAll",
  4992. method: "GET",
  4993. data: params
  4994. });
  4995. }
  4996. const logic$1 = {
  4997. data() {
  4998. return {
  4999. orderId: null,
  5000. pageLoading: true,
  5001. // 页面数据加载中
  5002. orderType: 1,
  5003. orderStatus: 2,
  5004. serviceId: null,
  5005. // 当前订单的服务类型ID
  5006. serviceMode: null,
  5007. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  5008. petId: null,
  5009. // 当前订单关联的宠物ID
  5010. petDetail: null,
  5011. // 宠物档案详情
  5012. // 从后端 clockInRemark 解析出的打卡步骤列表
  5013. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5014. clockInSteps: [],
  5015. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5016. currentClockIn: null,
  5017. currentStep: 0,
  5018. orderDetail: {
  5019. type: 1,
  5020. price: "0.00",
  5021. timeLabel: "服务时间",
  5022. time: "",
  5023. petAvatar: "/static/dog.png",
  5024. petName: "",
  5025. petBreed: "",
  5026. serviceTag: "",
  5027. startLocation: "",
  5028. startAddress: "",
  5029. endAddress: "",
  5030. customerPhone: "",
  5031. serviceContent: "",
  5032. remark: "",
  5033. orderNo: "",
  5034. createTime: "",
  5035. progressLogs: [],
  5036. nursingSummary: ""
  5037. // 宠护小结
  5038. },
  5039. serviceList: [],
  5040. showPetModal: false,
  5041. currentPetInfo: {},
  5042. showNavModal: false,
  5043. navTargetPointType: "",
  5044. showUploadModal: false,
  5045. modalMediaList: [],
  5046. modalRemark: "",
  5047. showSumModal: false,
  5048. sumContent: "",
  5049. sumDate: "",
  5050. sumSigner: "未知",
  5051. showPetRemarkInput: false,
  5052. petRemarkText: "",
  5053. showAnomalyModal: false,
  5054. anomalyList: [],
  5055. anomalyTypeDict: [],
  5056. // 媒体预览相关
  5057. videoPlayerShow: false,
  5058. videoPlayerUrl: ""
  5059. };
  5060. },
  5061. computed: {
  5062. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5063. steps() {
  5064. if (this.clockInSteps.length > 0) {
  5065. return this.clockInSteps.map((s) => s.title);
  5066. }
  5067. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5068. },
  5069. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5070. progressSteps() {
  5071. return ["已接单", ...this.steps, "订单完成"];
  5072. },
  5073. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5074. progressIndex() {
  5075. return this.currentStep + 1;
  5076. },
  5077. displayStatusText() {
  5078. if (this.currentStep >= this.steps.length)
  5079. return "已完成";
  5080. if (this.currentStep > 0) {
  5081. return this.orderType === 1 ? "配送中" : "服务中";
  5082. }
  5083. return this.orderType === 1 ? "待接送" : "待服务";
  5084. },
  5085. currentStatusText() {
  5086. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5087. },
  5088. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5089. currentTaskTitle() {
  5090. if (this.currentStep >= this.steps.length)
  5091. return "订单已完成";
  5092. if (this.currentClockIn) {
  5093. return this.currentClockIn.title;
  5094. }
  5095. return this.steps[this.currentStep] || "打卡";
  5096. },
  5097. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5098. currentTaskDesc() {
  5099. if (this.currentStep >= this.steps.length)
  5100. return "感谢您的服务,请注意休息";
  5101. if (this.currentClockIn && this.currentClockIn.remark) {
  5102. return this.currentClockIn.remark;
  5103. }
  5104. return "请按要求提交照片或视频及备注";
  5105. }
  5106. },
  5107. async onLoad(options) {
  5108. if (options.id) {
  5109. this.orderId = options.id;
  5110. }
  5111. this.pageLoading = true;
  5112. try {
  5113. await this.loadAnomalyTypeDict();
  5114. await this.loadOrderDetail();
  5115. } finally {
  5116. this.pageLoading = false;
  5117. }
  5118. },
  5119. methods: {
  5120. async loadServiceList() {
  5121. try {
  5122. const res = await getServiceList();
  5123. this.serviceList = res.data || [];
  5124. } catch (err) {
  5125. formatAppLog("error", "at pages/orders/detail-logic.js:144", "获取服务类型失败:", err);
  5126. }
  5127. },
  5128. /**
  5129. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5130. */
  5131. async loadServiceDetail(serviceId) {
  5132. formatAppLog("log", "at pages/orders/detail-logic.js:151", "开始加载服务详情, ID:", serviceId);
  5133. try {
  5134. const res = await getServiceDetail(serviceId);
  5135. const serviceInfo = res.data;
  5136. formatAppLog("log", "at pages/orders/detail-logic.js:155", "服务详情响应结果:", serviceInfo);
  5137. if (serviceInfo) {
  5138. this.serviceMode = serviceInfo.mode;
  5139. formatAppLog("log", "at pages/orders/detail-logic.js:158", "当前服务模式(mode):", this.serviceMode);
  5140. if (serviceInfo.clockInRemark) {
  5141. try {
  5142. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5143. if (Array.isArray(parsed) && parsed.length > 0) {
  5144. this.clockInSteps = parsed;
  5145. formatAppLog("log", "at pages/orders/detail-logic.js:164", "解析打卡步骤:", this.clockInSteps);
  5146. }
  5147. } catch (parseErr) {
  5148. formatAppLog("error", "at pages/orders/detail-logic.js:167", "解析 clockInRemark 失败:", parseErr);
  5149. }
  5150. }
  5151. }
  5152. } catch (err) {
  5153. formatAppLog("error", "at pages/orders/detail-logic.js:172", "获取服务类型详情失败:", err);
  5154. }
  5155. },
  5156. async loadOrderDetail() {
  5157. if (!this.orderId) {
  5158. formatAppLog("log", "at pages/orders/detail-logic.js:177", "订单ID缺失");
  5159. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5160. return;
  5161. }
  5162. try {
  5163. formatAppLog("log", "at pages/orders/detail-logic.js:182", "请求订单详情,ID:", this.orderId);
  5164. const res = await getOrderInfo(this.orderId);
  5165. formatAppLog("log", "at pages/orders/detail-logic.js:184", "订单详情响应:", res);
  5166. const order = res.data;
  5167. if (!order) {
  5168. formatAppLog("log", "at pages/orders/detail-logic.js:187", "订单数据为空");
  5169. uni.showToast({ title: "订单不存在", icon: "none" });
  5170. return;
  5171. }
  5172. formatAppLog("log", "at pages/orders/detail-logic.js:191", "订单数据:", order);
  5173. this.serviceId = order.service;
  5174. this.petId = order.usrPet || null;
  5175. this.transformOrderData(order);
  5176. formatAppLog("log", "at pages/orders/detail-logic.js:195", "解析出的 serviceId:", this.serviceId);
  5177. if (this.serviceId) {
  5178. await this.loadServiceDetail(this.serviceId);
  5179. } else {
  5180. formatAppLog("warn", "at pages/orders/detail-logic.js:201", "订单中未找到 service 字段,无法加载服务步骤");
  5181. }
  5182. if (this.petId) {
  5183. await this.loadPetDetail(this.petId);
  5184. }
  5185. await this.loadOrderLogs();
  5186. } catch (err) {
  5187. formatAppLog("error", "at pages/orders/detail-logic.js:212", "获取订单详情失败:", err);
  5188. uni.showToast({ title: "加载失败", icon: "none" });
  5189. }
  5190. },
  5191. async loadOrderLogs() {
  5192. try {
  5193. const res = await getOrderLogs(this.orderId);
  5194. const logs = res.data || [];
  5195. formatAppLog("log", "at pages/orders/detail-logic.js:220", "订单日志:", logs);
  5196. const progressLogs = logs.filter((log) => log.logType === 1);
  5197. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5198. status: log.title || "",
  5199. time: log.createTime || "",
  5200. medias: log.photoUrls || [],
  5201. remark: log.content || ""
  5202. }));
  5203. 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());
  5204. if (validLogs.length > 0) {
  5205. const latestLog = validLogs[0];
  5206. const latestStep = latestLog.step;
  5207. formatAppLog("log", "at pages/orders/detail-logic.js:239", "最新打卡日志 step:", latestStep);
  5208. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5209. if (stepIndex >= 0) {
  5210. this.currentStep = stepIndex + 1;
  5211. } else {
  5212. this.currentStep = Number(latestStep);
  5213. }
  5214. } else {
  5215. this.currentStep = 0;
  5216. }
  5217. this.updateCurrentClockIn();
  5218. formatAppLog("log", "at pages/orders/detail-logic.js:255", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5219. } catch (err) {
  5220. formatAppLog("error", "at pages/orders/detail-logic.js:257", "获取订单日志失败:", err);
  5221. }
  5222. },
  5223. /**
  5224. * 根据 currentStep 更新当前打卡信息
  5225. */
  5226. updateCurrentClockIn() {
  5227. if (this.currentStep < this.clockInSteps.length) {
  5228. this.currentClockIn = this.clockInSteps[this.currentStep];
  5229. } else {
  5230. this.currentClockIn = null;
  5231. }
  5232. },
  5233. transformOrderData(order) {
  5234. const mode = order.mode || 0;
  5235. const isRoundTrip = mode === 1;
  5236. this.orderType = isRoundTrip ? 1 : 2;
  5237. this.orderStatus = order.status || 2;
  5238. this.orderDetail = {
  5239. type: this.orderType,
  5240. price: (order.price / 100).toFixed(2),
  5241. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5242. time: order.serviceTime || "",
  5243. petAvatar: "/static/dog.png",
  5244. petName: order.petName || order.contact || "",
  5245. petBreed: order.breed || "",
  5246. serviceTag: order.groupPurchasePackageName || "",
  5247. startLocation: order.fromAddress || "",
  5248. startAddress: order.fromAddress || "",
  5249. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5250. endAddress: order.toAddress || "",
  5251. customerPhone: order.contactPhoneNumber || "",
  5252. ownerName: order.contact || "",
  5253. // 宠主姓名(默认使用客户姓名)
  5254. serviceContent: "",
  5255. remark: "",
  5256. orderNo: order.code || "T" + order.id,
  5257. createTime: order.serviceTime || "",
  5258. nursingSummary: order.nursingSummary || "",
  5259. fulfillerName: order.fulfillerName || "",
  5260. // 履约者/护宠师姓名
  5261. progressLogs: [
  5262. { status: "您已接单", time: order.serviceTime || "" }
  5263. ]
  5264. };
  5265. if (this.orderDetail.fulfillerName) {
  5266. this.sumSigner = this.orderDetail.fulfillerName;
  5267. }
  5268. },
  5269. /**
  5270. * 根据宠物ID获取宠物档案详情
  5271. */
  5272. async loadPetDetail(petId) {
  5273. try {
  5274. const res = await getPetDetail(petId);
  5275. const pet = res.data;
  5276. if (pet) {
  5277. this.petDetail = pet;
  5278. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5279. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5280. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5281. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5282. formatAppLog("log", "at pages/orders/detail-logic.js:322", "宠物档案:", pet);
  5283. }
  5284. } catch (err) {
  5285. formatAppLog("error", "at pages/orders/detail-logic.js:325", "获取宠物档案失败:", err);
  5286. }
  5287. },
  5288. /**
  5289. * 加载异常记录列表
  5290. */
  5291. async loadAnomalyList() {
  5292. if (!this.orderId)
  5293. return;
  5294. try {
  5295. const res = await getAnomalyList(this.orderId);
  5296. const list = res.data || [];
  5297. this.anomalyList = list.map((item) => {
  5298. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5299. return {
  5300. ...item,
  5301. typeLabel: dict ? dict.label : item.type,
  5302. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5303. photoUrls: item.photoUrls || []
  5304. };
  5305. });
  5306. } catch (err) {
  5307. formatAppLog("error", "at pages/orders/detail-logic.js:348", "获取异常列表失败:", err);
  5308. }
  5309. },
  5310. async loadAnomalyTypeDict() {
  5311. try {
  5312. const res = await getDictDataByType("flf_anamaly_type");
  5313. this.anomalyTypeDict = res.data.map((item) => ({
  5314. label: item.dictLabel,
  5315. value: item.dictValue
  5316. }));
  5317. } catch (err) {
  5318. formatAppLog("error", "at pages/orders/detail-logic.js:359", "获取异常字典失败:", err);
  5319. }
  5320. },
  5321. openAnomalyModal() {
  5322. this.showAnomalyModal = true;
  5323. this.loadAnomalyList();
  5324. },
  5325. closeAnomalyModal() {
  5326. this.showAnomalyModal = false;
  5327. },
  5328. getAnomalyStatusLabel(status) {
  5329. const map = {
  5330. 0: "待审核",
  5331. 1: "已通过",
  5332. 2: "已驳回"
  5333. };
  5334. return map[status] || "未知";
  5335. },
  5336. updateStepByStatus() {
  5337. if (this.orderStatus === 2) {
  5338. this.currentStep = 0;
  5339. } else if (this.orderStatus === 3) {
  5340. this.currentStep = 1;
  5341. } else if (this.orderStatus === 4) {
  5342. this.currentStep = this.steps.length - 1;
  5343. } else {
  5344. this.currentStep = 0;
  5345. }
  5346. },
  5347. showPetProfile() {
  5348. const pet = this.petDetail;
  5349. if (pet) {
  5350. this.currentPetInfo = {
  5351. petAvatar: pet.avatarUrl || "/static/dog.png",
  5352. petName: pet.name || "",
  5353. petBreed: pet.breed || "",
  5354. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5355. petAge: pet.age ? pet.age + "岁" : "未知",
  5356. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5357. petPersonality: pet.personality || pet.cutePersonality || "无",
  5358. petHobby: "",
  5359. petRemark: pet.remark || "无",
  5360. petTags: (pet.tags || []).map((t) => t.name),
  5361. petLogs: [],
  5362. // 额外信息
  5363. petSize: pet.size || "",
  5364. petIsSterilized: pet.isSterilized,
  5365. petHealthStatus: pet.healthStatus || "",
  5366. petAllergies: pet.allergies || "",
  5367. petMedicalHistory: pet.medicalHistory || "",
  5368. petVaccineStatus: pet.vaccineStatus || "",
  5369. ownerName: pet.ownerName || "",
  5370. ownerPhone: pet.ownerPhone || ""
  5371. };
  5372. this.loadPetChangeLogs(pet.id);
  5373. } else {
  5374. this.currentPetInfo = {
  5375. ...this.orderDetail,
  5376. petGender: "",
  5377. petAge: "未知",
  5378. petWeight: "未知",
  5379. petPersonality: "无",
  5380. petHobby: "",
  5381. petRemark: "无",
  5382. petTags: [],
  5383. petLogs: []
  5384. };
  5385. }
  5386. this.showPetModal = true;
  5387. },
  5388. async loadPetChangeLogs(petId) {
  5389. if (!petId)
  5390. return;
  5391. try {
  5392. const res = await listChangeLog({
  5393. targetId: petId,
  5394. targetType: "pet"
  5395. });
  5396. const logs = res.data || [];
  5397. this.currentPetInfo.petLogs = logs.map((item) => ({
  5398. date: item.createTime || "",
  5399. content: item.content || "",
  5400. recorder: item.operatorName || "未知"
  5401. }));
  5402. } catch (err) {
  5403. formatAppLog("error", "at pages/orders/detail-logic.js:446", "获取宠物备注列表失败:", err);
  5404. }
  5405. },
  5406. closePetProfile() {
  5407. this.showPetModal = false;
  5408. },
  5409. openPetRemarkInput() {
  5410. this.petRemarkText = "";
  5411. this.showPetRemarkInput = true;
  5412. },
  5413. closePetRemarkInput() {
  5414. this.showPetRemarkInput = false;
  5415. },
  5416. async submitPetRemark() {
  5417. if (!this.petRemarkText.trim()) {
  5418. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5419. return;
  5420. }
  5421. if (!this.petId) {
  5422. uni.showToast({ title: "宠物信息缺失", icon: "none" });
  5423. return;
  5424. }
  5425. uni.showLoading({ title: "提交中...", mask: true });
  5426. try {
  5427. await submitPetRemark({
  5428. petId: this.petId,
  5429. content: this.petRemarkText
  5430. });
  5431. uni.hideLoading();
  5432. uni.showToast({ title: "备注已添加", icon: "success" });
  5433. this.closePetRemarkInput();
  5434. this.loadPetChangeLogs(this.petId);
  5435. } catch (err) {
  5436. uni.hideLoading();
  5437. formatAppLog("error", "at pages/orders/detail-logic.js:484", "提交宠物备注失败:", err);
  5438. }
  5439. },
  5440. goToAnomaly() {
  5441. uni.navigateTo({
  5442. url: "/pages/orders/anomaly?orderId=" + (this.orderDetail.orderNo || "")
  5443. });
  5444. },
  5445. callPhone() {
  5446. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5447. uni.makePhoneCall({ phoneNumber: phoneNum });
  5448. },
  5449. openNavigation(type) {
  5450. this.navTargetPointType = type;
  5451. this.showNavModal = true;
  5452. },
  5453. closeNavModal() {
  5454. this.showNavModal = false;
  5455. },
  5456. chooseMap(mapType) {
  5457. let pointType = this.navTargetPointType;
  5458. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5459. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5460. this.showNavModal = false;
  5461. uni.openLocation({
  5462. latitude: 30.52,
  5463. // Mock lat
  5464. longitude: 114.31,
  5465. // Mock lng
  5466. name: name || "目的地",
  5467. address: address || "默认地址",
  5468. success: function() {
  5469. formatAppLog("log", "at pages/orders/detail-logic.js:517", "打开导航成功: " + mapType);
  5470. }
  5471. });
  5472. },
  5473. openUploadModal() {
  5474. this.modalMediaList = [];
  5475. this.modalRemark = "";
  5476. this.showUploadModal = true;
  5477. },
  5478. closeUploadModal() {
  5479. this.showUploadModal = false;
  5480. },
  5481. handleConfirmUpload() {
  5482. formatAppLog("log", "at pages/orders/detail-logic.js:530", "handleConfirmUpload被调用");
  5483. this.confirmUploadModal();
  5484. },
  5485. async chooseModalMedia() {
  5486. formatAppLog("log", "at pages/orders/detail-logic.js:534", "chooseModalMedia被调用");
  5487. uni.chooseMedia({
  5488. count: 5 - this.modalMediaList.length,
  5489. mediaType: ["image", "video"],
  5490. sourceType: ["album", "camera"],
  5491. success: async (res) => {
  5492. formatAppLog("log", "at pages/orders/detail-logic.js:541", "选择媒体文件成功:", res.tempFiles);
  5493. uni.showLoading({ title: "上传中...", mask: true });
  5494. try {
  5495. for (const file of res.tempFiles) {
  5496. const filePath = file.tempFilePath;
  5497. const fileType = file.fileType;
  5498. formatAppLog("log", "at pages/orders/detail-logic.js:547", "开始上传文件:", filePath, "类型:", fileType);
  5499. const uploadRes = await uploadFile(filePath);
  5500. formatAppLog("log", "at pages/orders/detail-logic.js:550", "服务器响应:", uploadRes);
  5501. if (uploadRes.code === 200) {
  5502. this.modalMediaList.push({
  5503. url: uploadRes.data.url,
  5504. ossId: uploadRes.data.ossId,
  5505. localPath: filePath,
  5506. mediaType: fileType,
  5507. thumb: file.thumbTempFilePath
  5508. // 视频缩略图(如果有)
  5509. });
  5510. formatAppLog("log", "at pages/orders/detail-logic.js:560", "媒体文件添加成功");
  5511. }
  5512. }
  5513. uni.hideLoading();
  5514. uni.showToast({ title: "上传成功", icon: "success" });
  5515. } catch (err) {
  5516. uni.hideLoading();
  5517. formatAppLog("error", "at pages/orders/detail-logic.js:567", "上传失败详情:", err);
  5518. uni.showToast({ title: "上传失败", icon: "none" });
  5519. }
  5520. },
  5521. fail: (err) => {
  5522. formatAppLog("error", "at pages/orders/detail-logic.js:572", "选择媒体文件失败:", err);
  5523. }
  5524. });
  5525. },
  5526. removeModalMedia(index) {
  5527. this.modalMediaList.splice(index, 1);
  5528. },
  5529. getCurrentTime() {
  5530. const now = /* @__PURE__ */ new Date();
  5531. const y = now.getFullYear();
  5532. const m = String(now.getMonth() + 1).padStart(2, "0");
  5533. const d = String(now.getDate()).padStart(2, "0");
  5534. const h = String(now.getHours()).padStart(2, "0");
  5535. const min = String(now.getMinutes()).padStart(2, "0");
  5536. return `${y}/${m}/${d} ${h}:${min}`;
  5537. },
  5538. async confirmUploadModal() {
  5539. formatAppLog("log", "at pages/orders/detail-logic.js:590", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5540. if (this.modalMediaList.length === 0) {
  5541. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5542. return;
  5543. }
  5544. try {
  5545. uni.showLoading({ title: "提交中..." });
  5546. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5547. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5548. formatAppLog("log", "at pages/orders/detail-logic.js:601", "准备打卡,ossIds:", ossIds);
  5549. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5550. const clockInData = {
  5551. orderId: this.orderId,
  5552. photos: ossIds,
  5553. content: this.modalRemark || "",
  5554. step: clockInType,
  5555. title: this.currentTaskTitle,
  5556. startFlag: Number(clockInType) === 1,
  5557. endFlag: Number(this.currentStep) === this.steps.length - 1
  5558. };
  5559. formatAppLog("log", "at pages/orders/detail-logic.js:616", "打卡数据:", clockInData);
  5560. await clockIn(clockInData);
  5561. uni.hideLoading();
  5562. this.closeUploadModal();
  5563. uni.showToast({ title: "打卡成功", icon: "success" });
  5564. await this.loadOrderDetail();
  5565. } catch (err) {
  5566. uni.hideLoading();
  5567. formatAppLog("error", "at pages/orders/detail-logic.js:626", "打卡失败:", err);
  5568. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5569. }
  5570. },
  5571. copyOrderNo() {
  5572. uni.setClipboardData({
  5573. data: this.orderDetail.orderNo,
  5574. success: () => {
  5575. uni.showToast({ title: "复制成功", icon: "none" });
  5576. }
  5577. });
  5578. },
  5579. openSumModal() {
  5580. let displayDate = "";
  5581. if (this.orderDetail.time) {
  5582. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5583. } else {
  5584. const now = /* @__PURE__ */ new Date();
  5585. const y = now.getFullYear();
  5586. const m = String(now.getMonth() + 1).padStart(2, "0");
  5587. const d = String(now.getDate()).padStart(2, "0");
  5588. displayDate = `${y}/${m}/${d}`;
  5589. }
  5590. this.sumDate = displayDate;
  5591. if (this.orderDetail.nursingSummary) {
  5592. this.sumContent = this.orderDetail.nursingSummary;
  5593. } else if (!this.sumContent) {
  5594. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5595. }
  5596. this.showSumModal = true;
  5597. },
  5598. closeSumModal() {
  5599. this.showSumModal = false;
  5600. },
  5601. async submitSumModal() {
  5602. if (!this.sumContent.trim()) {
  5603. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5604. return;
  5605. }
  5606. uni.showLoading({ title: "提交中...", mask: true });
  5607. try {
  5608. const res = await submitNursingSummary({
  5609. orderId: this.orderId,
  5610. content: this.sumContent
  5611. });
  5612. uni.hideLoading();
  5613. if (res.code === 200) {
  5614. uni.showToast({ title: "小结已提交", icon: "success" });
  5615. this.closeSumModal();
  5616. await this.loadOrderDetail();
  5617. } else {
  5618. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5619. }
  5620. } catch (err) {
  5621. uni.hideLoading();
  5622. formatAppLog("error", "at pages/orders/detail-logic.js:694", "提交宠护小结失败:", err);
  5623. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5624. }
  5625. },
  5626. /**
  5627. * 检查是否为视频
  5628. */
  5629. isVideo(url) {
  5630. if (!url)
  5631. return false;
  5632. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5633. const lowerUrl = url.toLowerCase();
  5634. return videoExts.some((ext) => lowerUrl.includes(ext));
  5635. },
  5636. /**
  5637. * 获取视频封面图 (第一帧)
  5638. * 兼容阿里云、腾讯云等主流 OSS
  5639. */
  5640. getVideoPoster(url) {
  5641. if (!this.isVideo(url))
  5642. return url;
  5643. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5644. return url;
  5645. }
  5646. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5647. const tencent = `?ci-process=snapshot&time=1`;
  5648. if (url.includes("myqcloud.com")) {
  5649. return url + tencent;
  5650. }
  5651. return url + aliyun;
  5652. },
  5653. /**
  5654. * 统一预览媒体
  5655. */
  5656. previewMedia(medias, currentIdx) {
  5657. const url = medias[currentIdx];
  5658. if (this.isVideo(url)) {
  5659. this.videoPlayerUrl = url;
  5660. this.videoPlayerShow = true;
  5661. } else {
  5662. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5663. const currentImgUrl = url;
  5664. const newIdx = imageUrls.indexOf(currentImgUrl);
  5665. uni.previewImage({
  5666. current: newIdx >= 0 ? newIdx : 0,
  5667. urls: imageUrls
  5668. });
  5669. }
  5670. },
  5671. closeVideoPlayer() {
  5672. this.videoPlayerShow = false;
  5673. this.videoPlayerUrl = "";
  5674. }
  5675. }
  5676. };
  5677. const _imports_13 = "/static/icons/phone_orange.svg";
  5678. const _imports_1$7 = "/static/icons/clock.svg";
  5679. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5680. const _imports_4$1 = "/static/icons/heart.svg";
  5681. const _imports_5 = "/static/icons/file.svg";
  5682. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5683. const _imports_7 = "/static/icons/order_no.svg";
  5684. const _imports_8$1 = "/static/icons/play_circle.svg";
  5685. const _imports_9$1 = "/static/empty-rest.png";
  5686. const _sfc_main$q = {
  5687. ...logic$1
  5688. };
  5689. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5690. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5691. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5692. key: 0,
  5693. class: "loading-container"
  5694. }, [
  5695. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5696. vue.createElementVNode("view", {
  5697. class: "skeleton-line skeleton-ani",
  5698. style: { "width": "30%", "height": "36rpx" }
  5699. }),
  5700. vue.createElementVNode("view", {
  5701. class: "skeleton-line skeleton-ani",
  5702. style: { "width": "20%", "height": "36rpx" }
  5703. })
  5704. ]),
  5705. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5706. (vue.openBlock(), vue.createElementBlock(
  5707. vue.Fragment,
  5708. null,
  5709. vue.renderList(4, (i) => {
  5710. return vue.createElementVNode("view", {
  5711. class: "skeleton-circle skeleton-ani",
  5712. key: i
  5713. });
  5714. }),
  5715. 64
  5716. /* STABLE_FRAGMENT */
  5717. ))
  5718. ]),
  5719. (vue.openBlock(), vue.createElementBlock(
  5720. vue.Fragment,
  5721. null,
  5722. vue.renderList(3, (j) => {
  5723. return vue.createElementVNode("view", {
  5724. class: "skeleton-card",
  5725. key: "c" + j
  5726. }, [
  5727. vue.createElementVNode("view", {
  5728. class: "skeleton-line skeleton-ani",
  5729. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5730. }),
  5731. vue.createElementVNode("view", {
  5732. class: "skeleton-line skeleton-ani",
  5733. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5734. }),
  5735. vue.createElementVNode("view", {
  5736. class: "skeleton-line skeleton-ani",
  5737. style: { "width": "75%", "height": "24rpx" }
  5738. })
  5739. ]);
  5740. }),
  5741. 64
  5742. /* STABLE_FRAGMENT */
  5743. ))
  5744. ])) : (vue.openBlock(), vue.createElementBlock(
  5745. vue.Fragment,
  5746. { key: 1 },
  5747. [
  5748. vue.createElementVNode("view", { class: "detail-header" }, [
  5749. vue.createElementVNode("view", { class: "status-row" }, [
  5750. vue.createElementVNode(
  5751. "text",
  5752. { class: "status-title" },
  5753. vue.toDisplayString(_ctx.displayStatusText),
  5754. 1
  5755. /* TEXT */
  5756. ),
  5757. vue.createElementVNode(
  5758. "text",
  5759. { class: "status-price" },
  5760. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5761. 1
  5762. /* TEXT */
  5763. )
  5764. ]),
  5765. vue.createElementVNode("view", { class: "progress-bar" }, [
  5766. (vue.openBlock(true), vue.createElementBlock(
  5767. vue.Fragment,
  5768. null,
  5769. vue.renderList(_ctx.progressSteps, (step, index) => {
  5770. return vue.openBlock(), vue.createElementBlock(
  5771. "view",
  5772. {
  5773. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5774. key: index
  5775. },
  5776. [
  5777. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5778. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5779. "view",
  5780. {
  5781. key: 0,
  5782. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5783. },
  5784. null,
  5785. 2
  5786. /* CLASS */
  5787. )) : vue.createCommentVNode("v-if", true),
  5788. vue.createElementVNode(
  5789. "view",
  5790. { class: "step-circle" },
  5791. vue.toDisplayString(index + 1),
  5792. 1
  5793. /* TEXT */
  5794. )
  5795. ]),
  5796. vue.createElementVNode(
  5797. "text",
  5798. { class: "step-text" },
  5799. vue.toDisplayString(step),
  5800. 1
  5801. /* TEXT */
  5802. )
  5803. ],
  5804. 2
  5805. /* CLASS */
  5806. );
  5807. }),
  5808. 128
  5809. /* KEYED_FRAGMENT */
  5810. ))
  5811. ])
  5812. ]),
  5813. vue.createElementVNode("scroll-view", {
  5814. "scroll-y": "",
  5815. class: "detail-content"
  5816. }, [
  5817. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5818. vue.createElementVNode("image", {
  5819. class: "pb-avatar",
  5820. src: _ctx.orderDetail.petAvatar,
  5821. mode: "aspectFill"
  5822. }, null, 8, ["src"]),
  5823. vue.createElementVNode("view", { class: "pb-info" }, [
  5824. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5825. vue.createElementVNode(
  5826. "text",
  5827. { class: "pb-name" },
  5828. vue.toDisplayString(_ctx.orderDetail.petName),
  5829. 1
  5830. /* TEXT */
  5831. ),
  5832. vue.createElementVNode(
  5833. "text",
  5834. { class: "pb-breed" },
  5835. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed),
  5836. 1
  5837. /* TEXT */
  5838. )
  5839. ]),
  5840. vue.createElementVNode("view", { class: "pb-tags" }, [
  5841. vue.createElementVNode(
  5842. "text",
  5843. { class: "pb-tag" },
  5844. vue.toDisplayString(_ctx.orderDetail.serviceTag),
  5845. 1
  5846. /* TEXT */
  5847. )
  5848. ])
  5849. ]),
  5850. vue.createElementVNode("view", { class: "pb-actions" }, [
  5851. vue.createElementVNode("view", {
  5852. class: "pb-btn profile-btn",
  5853. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5854. }, "宠物档案"),
  5855. vue.createElementVNode("view", {
  5856. class: "pb-btn phone-btn",
  5857. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5858. }, [
  5859. vue.createElementVNode("image", {
  5860. class: "phone-icon",
  5861. src: _imports_13
  5862. })
  5863. ])
  5864. ])
  5865. ]),
  5866. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5867. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5868. vue.createElementVNode("image", {
  5869. class: "si-icon outline",
  5870. src: _imports_1$7
  5871. }),
  5872. vue.createElementVNode("view", { class: "si-content" }, [
  5873. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  5874. vue.createElementVNode(
  5875. "text",
  5876. { class: "si-val" },
  5877. vue.toDisplayString(_ctx.orderDetail.time),
  5878. 1
  5879. /* TEXT */
  5880. )
  5881. ]),
  5882. vue.createElementVNode("view", {
  5883. class: "si-action record-btn",
  5884. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5885. }, [
  5886. vue.createElementVNode("text", null, "异常记录"),
  5887. vue.createElementVNode("image", {
  5888. class: "record-arrow",
  5889. src: _imports_0$2
  5890. })
  5891. ])
  5892. ]),
  5893. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  5894. vue.Fragment,
  5895. { key: 0 },
  5896. [
  5897. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  5898. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  5899. vue.createElementVNode("view", { class: "route-line-vertical" }),
  5900. vue.createElementVNode("view", { class: "si-content" }, [
  5901. vue.createElementVNode(
  5902. "text",
  5903. { class: "si-addr-title" },
  5904. vue.toDisplayString(_ctx.orderDetail.startLocation),
  5905. 1
  5906. /* TEXT */
  5907. ),
  5908. vue.createElementVNode(
  5909. "text",
  5910. { class: "si-addr-desc" },
  5911. vue.toDisplayString(_ctx.orderDetail.startAddress),
  5912. 1
  5913. /* TEXT */
  5914. )
  5915. ]),
  5916. vue.createElementVNode("view", {
  5917. class: "nav-btn-circle",
  5918. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  5919. }, [
  5920. vue.createElementVNode("image", {
  5921. class: "nav-arrow",
  5922. src: _imports_3$2
  5923. })
  5924. ])
  5925. ]),
  5926. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5927. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  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[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  5947. }, [
  5948. vue.createElementVNode("image", {
  5949. class: "nav-arrow",
  5950. src: _imports_3$2
  5951. })
  5952. ])
  5953. ])
  5954. ],
  5955. 64
  5956. /* STABLE_FRAGMENT */
  5957. )) : (vue.openBlock(), vue.createElementBlock(
  5958. vue.Fragment,
  5959. { key: 1 },
  5960. [
  5961. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5962. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  5963. vue.createElementVNode("view", { class: "si-content" }, [
  5964. vue.createElementVNode(
  5965. "text",
  5966. { class: "si-addr-title" },
  5967. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5968. 1
  5969. /* TEXT */
  5970. ),
  5971. vue.createElementVNode(
  5972. "text",
  5973. { class: "si-addr-desc" },
  5974. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5975. 1
  5976. /* TEXT */
  5977. )
  5978. ]),
  5979. vue.createElementVNode("view", {
  5980. class: "nav-btn-circle",
  5981. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  5982. }, [
  5983. vue.createElementVNode("image", {
  5984. class: "nav-arrow",
  5985. src: _imports_3$2
  5986. })
  5987. ])
  5988. ]),
  5989. vue.createElementVNode("view", { class: "si-row" }, [
  5990. vue.createElementVNode("image", {
  5991. class: "si-icon outline",
  5992. src: _imports_4$1
  5993. }),
  5994. vue.createElementVNode("view", { class: "si-content" }, [
  5995. vue.createElementVNode("text", { class: "si-label" }, "服务内容"),
  5996. vue.createElementVNode(
  5997. "text",
  5998. { class: "si-val" },
  5999. vue.toDisplayString(_ctx.orderDetail.serviceContent),
  6000. 1
  6001. /* TEXT */
  6002. )
  6003. ])
  6004. ])
  6005. ],
  6006. 64
  6007. /* STABLE_FRAGMENT */
  6008. )),
  6009. vue.createElementVNode("view", { class: "si-row" }, [
  6010. vue.createElementVNode("image", {
  6011. class: "si-icon outline custom-icon-file",
  6012. src: _imports_5
  6013. }),
  6014. vue.createElementVNode("view", { class: "si-content" }, [
  6015. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  6016. vue.createElementVNode(
  6017. "text",
  6018. { class: "si-val" },
  6019. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  6020. 1
  6021. /* TEXT */
  6022. )
  6023. ])
  6024. ])
  6025. ]),
  6026. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  6027. key: 0,
  6028. class: "white-card task-card"
  6029. }, [
  6030. vue.createElementVNode(
  6031. "text",
  6032. { class: "tc-title" },
  6033. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  6034. 1
  6035. /* TEXT */
  6036. ),
  6037. vue.createElementVNode(
  6038. "text",
  6039. { class: "tc-desc" },
  6040. vue.toDisplayString(_ctx.currentTaskDesc),
  6041. 1
  6042. /* TEXT */
  6043. ),
  6044. vue.createElementVNode("view", {
  6045. class: "full-media-add",
  6046. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6047. }, [
  6048. vue.createElementVNode("image", {
  6049. class: "upload-icon-large",
  6050. src: _imports_1$6
  6051. }),
  6052. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6053. ])
  6054. ])) : vue.createCommentVNode("v-if", true),
  6055. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6056. vue.createElementVNode("view", { class: "bi-row" }, [
  6057. vue.createElementVNode("image", {
  6058. class: "si-icon outline",
  6059. src: _imports_7
  6060. }),
  6061. vue.createElementVNode("view", { class: "bi-content" }, [
  6062. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6063. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6064. vue.createElementVNode(
  6065. "text",
  6066. { class: "bi-val" },
  6067. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6068. 1
  6069. /* TEXT */
  6070. ),
  6071. vue.createElementVNode("text", {
  6072. class: "bi-copy",
  6073. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6074. }, "复制")
  6075. ])
  6076. ])
  6077. ]),
  6078. vue.createElementVNode("view", { class: "bi-row" }, [
  6079. vue.createElementVNode("image", {
  6080. class: "si-icon outline",
  6081. src: _imports_1$7
  6082. }),
  6083. vue.createElementVNode("view", { class: "bi-content" }, [
  6084. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6085. vue.createElementVNode(
  6086. "text",
  6087. { class: "bi-val" },
  6088. vue.toDisplayString(_ctx.orderDetail.createTime),
  6089. 1
  6090. /* TEXT */
  6091. )
  6092. ])
  6093. ])
  6094. ]),
  6095. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6096. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6097. vue.createElementVNode("view", { class: "orange-bar" }),
  6098. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6099. ]),
  6100. vue.createElementVNode("view", { class: "tl-list" }, [
  6101. (vue.openBlock(true), vue.createElementBlock(
  6102. vue.Fragment,
  6103. null,
  6104. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6105. return vue.openBlock(), vue.createElementBlock("view", {
  6106. class: "tl-item",
  6107. key: idx
  6108. }, [
  6109. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6110. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6111. ]),
  6112. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6113. vue.createElementVNode("view", { class: "tl-header" }, [
  6114. vue.createElementVNode(
  6115. "text",
  6116. { class: "tl-status" },
  6117. vue.toDisplayString(log.status),
  6118. 1
  6119. /* TEXT */
  6120. ),
  6121. vue.createElementVNode(
  6122. "text",
  6123. { class: "tl-time" },
  6124. vue.toDisplayString(log.time),
  6125. 1
  6126. /* TEXT */
  6127. )
  6128. ]),
  6129. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6130. key: 0,
  6131. class: "tl-medias"
  6132. }, [
  6133. (vue.openBlock(true), vue.createElementBlock(
  6134. vue.Fragment,
  6135. null,
  6136. vue.renderList(log.medias, (media, midx) => {
  6137. return vue.openBlock(), vue.createElementBlock("view", {
  6138. class: "tl-media-item",
  6139. key: midx,
  6140. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6141. }, [
  6142. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6143. key: 0,
  6144. class: "tl-img",
  6145. src: media,
  6146. mode: "aspectFill"
  6147. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6148. key: 1,
  6149. class: "tl-video-placeholder"
  6150. }, [
  6151. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6152. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6153. ]))
  6154. ], 8, ["onClick"]);
  6155. }),
  6156. 128
  6157. /* KEYED_FRAGMENT */
  6158. ))
  6159. ])) : vue.createCommentVNode("v-if", true),
  6160. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6161. key: 1,
  6162. class: "tl-remark"
  6163. }, [
  6164. vue.createElementVNode(
  6165. "text",
  6166. null,
  6167. vue.toDisplayString(log.remark),
  6168. 1
  6169. /* TEXT */
  6170. )
  6171. ])) : vue.createCommentVNode("v-if", true)
  6172. ])
  6173. ]);
  6174. }),
  6175. 128
  6176. /* KEYED_FRAGMENT */
  6177. ))
  6178. ])
  6179. ]),
  6180. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6181. ]),
  6182. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6183. vue.createElementVNode("view", { class: "action-left" }, [
  6184. vue.createElementVNode("button", {
  6185. class: "action-btn outline grey-outline",
  6186. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6187. }, "异常上报"),
  6188. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6189. key: 0,
  6190. class: "action-btn outline orange-outline",
  6191. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6192. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6193. ]),
  6194. vue.createElementVNode("view", { class: "action-right" }, [
  6195. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6196. "button",
  6197. {
  6198. key: 0,
  6199. class: "action-btn primary",
  6200. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6201. },
  6202. vue.toDisplayString(_ctx.currentTaskTitle),
  6203. 1
  6204. /* TEXT */
  6205. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6206. key: 1,
  6207. class: "action-btn primary grey-bg"
  6208. }, "已完成"))
  6209. ])
  6210. ]),
  6211. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6212. key: 0,
  6213. class: "pet-modal-mask",
  6214. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6215. }, [
  6216. vue.createElementVNode("view", {
  6217. class: "pet-modal-content",
  6218. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6219. }, ["stop"]))
  6220. }, [
  6221. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6222. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6223. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6224. vue.createElementVNode("view", {
  6225. class: "pm-remark-btn",
  6226. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6227. }, "备注"),
  6228. vue.createElementVNode("view", {
  6229. class: "close-icon-btn",
  6230. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6231. }, "×")
  6232. ]),
  6233. vue.createElementVNode("scroll-view", {
  6234. "scroll-y": "",
  6235. class: "pet-modal-scroll"
  6236. }, [
  6237. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6238. vue.createElementVNode("image", {
  6239. class: "pm-avatar",
  6240. src: _ctx.currentPetInfo.petAvatar,
  6241. mode: "aspectFill"
  6242. }, null, 8, ["src"]),
  6243. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6244. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6245. vue.createElementVNode(
  6246. "text",
  6247. { class: "pm-name" },
  6248. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6249. 1
  6250. /* TEXT */
  6251. ),
  6252. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6253. key: 0,
  6254. class: "pm-gender"
  6255. }, [
  6256. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6257. vue.createElementVNode("text", null, "公")
  6258. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6259. key: 1,
  6260. class: "pm-gender female"
  6261. }, [
  6262. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6263. vue.createElementVNode("text", null, "母")
  6264. ])) : vue.createCommentVNode("v-if", true)
  6265. ]),
  6266. vue.createElementVNode(
  6267. "text",
  6268. { class: "pm-breed" },
  6269. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6270. 1
  6271. /* TEXT */
  6272. )
  6273. ])
  6274. ]),
  6275. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6276. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6277. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6278. vue.createElementVNode(
  6279. "text",
  6280. { class: "pm-val" },
  6281. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6282. 1
  6283. /* TEXT */
  6284. )
  6285. ]),
  6286. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6287. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6288. vue.createElementVNode(
  6289. "text",
  6290. { class: "pm-val" },
  6291. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6292. 1
  6293. /* TEXT */
  6294. )
  6295. ]),
  6296. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6297. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6298. vue.createElementVNode(
  6299. "text",
  6300. { class: "pm-val" },
  6301. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6302. 1
  6303. /* TEXT */
  6304. )
  6305. ]),
  6306. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6307. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6308. vue.createElementVNode(
  6309. "text",
  6310. { class: "pm-val" },
  6311. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6312. 1
  6313. /* TEXT */
  6314. )
  6315. ]),
  6316. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6317. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6318. vue.createElementVNode(
  6319. "text",
  6320. { class: "pm-val" },
  6321. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6322. 1
  6323. /* TEXT */
  6324. )
  6325. ])
  6326. ]),
  6327. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6328. key: 0,
  6329. class: "pm-tags-row"
  6330. }, [
  6331. (vue.openBlock(true), vue.createElementBlock(
  6332. vue.Fragment,
  6333. null,
  6334. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6335. return vue.openBlock(), vue.createElementBlock("view", {
  6336. class: "pm-tag-chip",
  6337. key: ti
  6338. }, [
  6339. vue.createElementVNode(
  6340. "text",
  6341. { class: "pm-tag-chip-text" },
  6342. vue.toDisplayString(tag),
  6343. 1
  6344. /* TEXT */
  6345. )
  6346. ]);
  6347. }),
  6348. 128
  6349. /* KEYED_FRAGMENT */
  6350. ))
  6351. ])) : vue.createCommentVNode("v-if", true),
  6352. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6353. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6354. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6355. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6356. ]),
  6357. (vue.openBlock(true), vue.createElementBlock(
  6358. vue.Fragment,
  6359. null,
  6360. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6361. return vue.openBlock(), vue.createElementBlock("view", {
  6362. class: "pm-log-item",
  6363. key: lIndex
  6364. }, [
  6365. vue.createElementVNode(
  6366. "text",
  6367. { class: "pm-log-date" },
  6368. vue.toDisplayString(log.date),
  6369. 1
  6370. /* TEXT */
  6371. ),
  6372. vue.createElementVNode(
  6373. "text",
  6374. { class: "pm-log-text" },
  6375. vue.toDisplayString(log.content),
  6376. 1
  6377. /* TEXT */
  6378. ),
  6379. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6380. "text",
  6381. {
  6382. key: 0,
  6383. class: "pm-log-recorder"
  6384. },
  6385. "记录人:" + vue.toDisplayString(log.recorder),
  6386. 1
  6387. /* TEXT */
  6388. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6389. key: 1,
  6390. class: "pm-log-recorder system"
  6391. }, "系统记录"))
  6392. ]);
  6393. }),
  6394. 128
  6395. /* KEYED_FRAGMENT */
  6396. ))
  6397. ]),
  6398. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6399. ])
  6400. ])
  6401. ])) : vue.createCommentVNode("v-if", true),
  6402. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6403. key: 1,
  6404. class: "upload-modal-mask",
  6405. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6406. }, [
  6407. vue.createElementVNode("view", {
  6408. class: "upload-modal-content",
  6409. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6410. }, ["stop"]))
  6411. }, [
  6412. vue.createElementVNode("view", { class: "um-header" }, [
  6413. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6414. ]),
  6415. vue.createElementVNode("view", { class: "um-body" }, [
  6416. vue.withDirectives(vue.createElementVNode(
  6417. "textarea",
  6418. {
  6419. class: "um-textarea",
  6420. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6421. "auto-height": "",
  6422. placeholder: "请输入宠物备注内容...",
  6423. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6424. },
  6425. null,
  6426. 512
  6427. /* NEED_PATCH */
  6428. ), [
  6429. [vue.vModelText, _ctx.petRemarkText]
  6430. ])
  6431. ]),
  6432. vue.createElementVNode("view", { class: "um-footer" }, [
  6433. vue.createElementVNode("button", {
  6434. class: "um-submit-btn active",
  6435. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6436. }, "确认提交")
  6437. ])
  6438. ])
  6439. ])) : vue.createCommentVNode("v-if", true),
  6440. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6441. key: 2,
  6442. class: "nav-modal-mask",
  6443. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6444. }, [
  6445. vue.createElementVNode("view", {
  6446. class: "nav-action-sheet",
  6447. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6448. }, ["stop"]))
  6449. }, [
  6450. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6451. vue.createElementVNode("view", {
  6452. class: "nav-sheet-item",
  6453. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6454. }, "高德地图"),
  6455. vue.createElementVNode("view", {
  6456. class: "nav-sheet-item",
  6457. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6458. }, "腾讯地图"),
  6459. vue.createElementVNode("view", {
  6460. class: "nav-sheet-item",
  6461. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6462. }, "百度地图"),
  6463. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6464. vue.createElementVNode("view", {
  6465. class: "nav-sheet-item cancel",
  6466. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6467. }, "取消")
  6468. ])
  6469. ])) : vue.createCommentVNode("v-if", true),
  6470. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6471. key: 3,
  6472. class: "upload-modal-mask",
  6473. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6474. }, [
  6475. vue.createElementVNode("view", {
  6476. class: "upload-modal-content",
  6477. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6478. }, ["stop"]))
  6479. }, [
  6480. vue.createElementVNode("view", { class: "um-header" }, [
  6481. vue.createElementVNode(
  6482. "text",
  6483. { class: "um-title" },
  6484. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6485. 1
  6486. /* TEXT */
  6487. ),
  6488. vue.createElementVNode(
  6489. "text",
  6490. { class: "um-remark-hint" },
  6491. vue.toDisplayString(_ctx.currentTaskDesc),
  6492. 1
  6493. /* TEXT */
  6494. )
  6495. ]),
  6496. vue.createElementVNode("view", { class: "um-body" }, [
  6497. vue.createElementVNode("view", { class: "um-grid" }, [
  6498. (vue.openBlock(true), vue.createElementBlock(
  6499. vue.Fragment,
  6500. null,
  6501. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6502. return vue.openBlock(), vue.createElementBlock("view", {
  6503. class: "um-item",
  6504. key: idx
  6505. }, [
  6506. vue.createElementVNode("image", {
  6507. class: "um-preview",
  6508. src: img.thumb || img.url || img.localPath || img,
  6509. mode: "aspectFill"
  6510. }, null, 8, ["src"]),
  6511. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6512. key: 0,
  6513. class: "um-video-badge"
  6514. }, [
  6515. vue.createElementVNode("image", {
  6516. class: "play-icon-small",
  6517. src: _imports_8$1
  6518. })
  6519. ])) : vue.createCommentVNode("v-if", true),
  6520. vue.createElementVNode("view", {
  6521. class: "um-del",
  6522. onClick: ($event) => _ctx.removeModalMedia(idx)
  6523. }, "×", 8, ["onClick"])
  6524. ]);
  6525. }),
  6526. 128
  6527. /* KEYED_FRAGMENT */
  6528. )),
  6529. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6530. key: 0,
  6531. class: "um-add",
  6532. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6533. }, [
  6534. vue.createElementVNode("image", {
  6535. class: "um-add-icon",
  6536. src: _imports_1$6
  6537. }),
  6538. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6539. ])) : vue.createCommentVNode("v-if", true)
  6540. ]),
  6541. vue.withDirectives(vue.createElementVNode(
  6542. "textarea",
  6543. {
  6544. class: "um-textarea",
  6545. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6546. placeholder: "在此输入备注信息...",
  6547. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6548. },
  6549. null,
  6550. 512
  6551. /* NEED_PATCH */
  6552. ), [
  6553. [vue.vModelText, _ctx.modalRemark]
  6554. ])
  6555. ]),
  6556. vue.createElementVNode("view", { class: "um-footer" }, [
  6557. vue.createElementVNode(
  6558. "view",
  6559. {
  6560. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6561. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6562. },
  6563. " 确认提交",
  6564. 2
  6565. /* CLASS */
  6566. )
  6567. ])
  6568. ])
  6569. ])) : vue.createCommentVNode("v-if", true),
  6570. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6571. key: 4,
  6572. class: "sum-modal-mask",
  6573. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6574. }, [
  6575. vue.createElementVNode("view", {
  6576. class: "sum-modal-card",
  6577. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6578. }, ["stop"]))
  6579. }, [
  6580. vue.createElementVNode("scroll-view", {
  6581. "scroll-y": "",
  6582. class: "sum-modal-scroll"
  6583. }, [
  6584. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6585. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6586. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6587. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6588. vue.createElementVNode(
  6589. "text",
  6590. { class: "sum-meta-val" },
  6591. vue.toDisplayString(_ctx.sumDate),
  6592. 1
  6593. /* TEXT */
  6594. )
  6595. ]),
  6596. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6597. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6598. vue.createElementVNode(
  6599. "text",
  6600. { class: "sum-meta-val" },
  6601. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6602. 1
  6603. /* TEXT */
  6604. )
  6605. ]),
  6606. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6607. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6608. vue.createElementVNode(
  6609. "text",
  6610. { class: "sum-meta-val" },
  6611. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6612. 1
  6613. /* TEXT */
  6614. )
  6615. ]),
  6616. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6617. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6618. vue.createElementVNode("image", {
  6619. class: "sum-pet-avatar",
  6620. src: _ctx.orderDetail.petAvatar,
  6621. mode: "aspectFill"
  6622. }, null, 8, ["src"]),
  6623. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6624. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6625. vue.createElementVNode(
  6626. "text",
  6627. { class: "sum-pet-name" },
  6628. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6629. 1
  6630. /* TEXT */
  6631. ),
  6632. vue.createElementVNode(
  6633. "text",
  6634. { class: "sum-pet-breed" },
  6635. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6636. 1
  6637. /* TEXT */
  6638. )
  6639. ]),
  6640. vue.createElementVNode(
  6641. "text",
  6642. { class: "sum-pet-remark" },
  6643. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6644. 1
  6645. /* TEXT */
  6646. )
  6647. ])
  6648. ]),
  6649. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6650. vue.withDirectives(vue.createElementVNode(
  6651. "textarea",
  6652. {
  6653. class: "sum-textarea",
  6654. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6655. "auto-height": "",
  6656. placeholder: "请填写服务内容...",
  6657. "placeholder-style": "color:#ccc"
  6658. },
  6659. null,
  6660. 512
  6661. /* NEED_PATCH */
  6662. ), [
  6663. [vue.vModelText, _ctx.sumContent]
  6664. ]),
  6665. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6666. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6667. vue.createElementVNode(
  6668. "text",
  6669. { class: "sum-sign-val" },
  6670. vue.toDisplayString(_ctx.sumSigner),
  6671. 1
  6672. /* TEXT */
  6673. )
  6674. ]),
  6675. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6676. ])
  6677. ]),
  6678. vue.createElementVNode("view", { class: "sum-footer" }, [
  6679. vue.createElementVNode("button", {
  6680. class: "sum-submit-btn",
  6681. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6682. }, "提交小结")
  6683. ])
  6684. ])
  6685. ])) : vue.createCommentVNode("v-if", true),
  6686. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6687. key: 5,
  6688. class: "modal-mask",
  6689. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6690. }, [
  6691. vue.createElementVNode("view", {
  6692. class: "anomaly-modal-content",
  6693. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6694. }, ["stop"]))
  6695. }, [
  6696. vue.createElementVNode("view", { class: "am-header" }, [
  6697. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6698. vue.createElementVNode("view", {
  6699. class: "close-icon-btn",
  6700. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6701. }, "×")
  6702. ]),
  6703. vue.createElementVNode("scroll-view", {
  6704. "scroll-y": "",
  6705. class: "am-scroll-list"
  6706. }, [
  6707. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6708. key: 0,
  6709. class: "empty-list"
  6710. }, [
  6711. vue.createElementVNode("image", {
  6712. class: "empty-icon",
  6713. src: _imports_9$1,
  6714. mode: "aspectFit"
  6715. }),
  6716. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6717. ])) : vue.createCommentVNode("v-if", true),
  6718. (vue.openBlock(true), vue.createElementBlock(
  6719. vue.Fragment,
  6720. null,
  6721. vue.renderList(_ctx.anomalyList, (item, index) => {
  6722. return vue.openBlock(), vue.createElementBlock("view", {
  6723. class: "am-item",
  6724. key: index
  6725. }, [
  6726. vue.createElementVNode("view", { class: "am-item-header" }, [
  6727. vue.createElementVNode(
  6728. "text",
  6729. { class: "am-item-type" },
  6730. vue.toDisplayString(item.typeLabel),
  6731. 1
  6732. /* TEXT */
  6733. ),
  6734. vue.createElementVNode(
  6735. "text",
  6736. {
  6737. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6738. },
  6739. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6740. 3
  6741. /* TEXT, CLASS */
  6742. )
  6743. ]),
  6744. vue.createElementVNode(
  6745. "text",
  6746. { class: "am-item-content" },
  6747. vue.toDisplayString(item.content),
  6748. 1
  6749. /* TEXT */
  6750. ),
  6751. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6752. key: 0,
  6753. class: "am-item-photos"
  6754. }, [
  6755. (vue.openBlock(true), vue.createElementBlock(
  6756. vue.Fragment,
  6757. null,
  6758. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6759. return vue.openBlock(), vue.createElementBlock("view", {
  6760. class: "am-photo-item",
  6761. key: pIdx,
  6762. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  6763. }, [
  6764. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  6765. key: 0,
  6766. class: "am-photo",
  6767. src: photoUrl,
  6768. mode: "aspectFill"
  6769. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6770. key: 1,
  6771. class: "tl-video-placeholder miniaturized"
  6772. }, [
  6773. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  6774. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  6775. ]))
  6776. ], 8, ["onClick"]);
  6777. }),
  6778. 128
  6779. /* KEYED_FRAGMENT */
  6780. ))
  6781. ])) : vue.createCommentVNode("v-if", true),
  6782. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6783. key: 1,
  6784. class: "am-audit-box"
  6785. }, [
  6786. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6787. vue.createElementVNode(
  6788. "text",
  6789. { class: "am-audit-label" },
  6790. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6791. 1
  6792. /* TEXT */
  6793. ),
  6794. vue.createElementVNode(
  6795. "text",
  6796. { class: "am-audit-time" },
  6797. vue.toDisplayString(item.auditTime),
  6798. 1
  6799. /* TEXT */
  6800. )
  6801. ]),
  6802. vue.createElementVNode(
  6803. "text",
  6804. { class: "am-audit-remark" },
  6805. vue.toDisplayString(item.auditRemark || "无"),
  6806. 1
  6807. /* TEXT */
  6808. )
  6809. ])) : vue.createCommentVNode("v-if", true)
  6810. ]);
  6811. }),
  6812. 128
  6813. /* KEYED_FRAGMENT */
  6814. ))
  6815. ])
  6816. ])
  6817. ])) : vue.createCommentVNode("v-if", true),
  6818. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  6819. key: 6,
  6820. class: "video-player-mask",
  6821. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6822. }, [
  6823. vue.createElementVNode("view", {
  6824. class: "video-player-content",
  6825. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  6826. }, ["stop"]))
  6827. }, [
  6828. vue.createElementVNode("video", {
  6829. class: "v-player",
  6830. src: _ctx.videoPlayerUrl,
  6831. autoplay: "",
  6832. controls: ""
  6833. }, null, 8, ["src"]),
  6834. vue.createElementVNode("view", {
  6835. class: "v-close",
  6836. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6837. }, "×")
  6838. ])
  6839. ])) : vue.createCommentVNode("v-if", true)
  6840. ],
  6841. 64
  6842. /* STABLE_FRAGMENT */
  6843. ))
  6844. ]);
  6845. }
  6846. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6847. const _sfc_main$p = {
  6848. data() {
  6849. return {
  6850. orderId: "",
  6851. // 已选异常类型(dictValue)
  6852. selectedTypeValue: "",
  6853. // 已选异常类型标签(dictLabel,用于显示)
  6854. selectedTypeLabel: "",
  6855. // 异常描述
  6856. anomalyDesc: "",
  6857. // 照片列表(含 url 和 ossId)
  6858. photoList: [],
  6859. // 是否显示类型选择器
  6860. showTypeSheet: false,
  6861. // 异常类型字典列表(从后端获取)
  6862. anomalyTypes: []
  6863. };
  6864. },
  6865. onLoad(options) {
  6866. if (options.orderId) {
  6867. this.orderId = options.orderId;
  6868. }
  6869. this.loadAnomalyTypes();
  6870. },
  6871. computed: {
  6872. // 当前选中的类型显示文本
  6873. selectedType() {
  6874. return this.selectedTypeLabel || "";
  6875. }
  6876. },
  6877. methods: {
  6878. /**
  6879. * 加载异常类型字典数据
  6880. */
  6881. async loadAnomalyTypes() {
  6882. try {
  6883. const res = await getDictDataByType("flf_anamaly_type");
  6884. if (res.data && Array.isArray(res.data)) {
  6885. this.anomalyTypes = res.data.map((item) => ({
  6886. label: item.dictLabel,
  6887. value: item.dictValue,
  6888. dictCode: item.dictCode
  6889. }));
  6890. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  6891. }
  6892. } catch (err) {
  6893. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  6894. }
  6895. },
  6896. // 打开类型选择器
  6897. openTypeSheet() {
  6898. this.showTypeSheet = true;
  6899. },
  6900. // 关闭类型选择器
  6901. closeTypeSheet() {
  6902. this.showTypeSheet = false;
  6903. },
  6904. // 选择异常类型
  6905. selectType(type) {
  6906. this.selectedTypeValue = type.value;
  6907. this.selectedTypeLabel = type.label;
  6908. this.closeTypeSheet();
  6909. },
  6910. // 选择照片并上传
  6911. choosePhoto() {
  6912. uni.chooseImage({
  6913. count: 5 - this.photoList.length,
  6914. sizeType: ["compressed"],
  6915. sourceType: ["album", "camera"],
  6916. success: async (res) => {
  6917. uni.showLoading({ title: "上传中..." });
  6918. try {
  6919. for (const filePath of res.tempFilePaths) {
  6920. const uploadRes = await uploadFile(filePath);
  6921. if (uploadRes.code === 200) {
  6922. this.photoList.push({
  6923. url: uploadRes.data.url,
  6924. ossId: uploadRes.data.ossId,
  6925. localPath: filePath
  6926. });
  6927. }
  6928. }
  6929. uni.hideLoading();
  6930. } catch (err) {
  6931. uni.hideLoading();
  6932. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  6933. uni.showToast({ title: "上传失败", icon: "none" });
  6934. }
  6935. }
  6936. });
  6937. },
  6938. // 删除照片
  6939. removePhoto(idx) {
  6940. this.photoList.splice(idx, 1);
  6941. },
  6942. // 提交上报
  6943. async submitAnomaly() {
  6944. if (!this.selectedTypeValue) {
  6945. uni.showToast({ title: "请选择异常类型", icon: "none" });
  6946. return;
  6947. }
  6948. if (this.photoList.length === 0) {
  6949. uni.showToast({ title: "请上传现场照片", icon: "none" });
  6950. return;
  6951. }
  6952. const data = {
  6953. orderId: this.orderId,
  6954. type: this.selectedTypeValue,
  6955. content: this.anomalyDesc,
  6956. photos: this.photoList.map((p) => p.ossId)
  6957. };
  6958. try {
  6959. uni.showLoading({ title: "提交中..." });
  6960. await uploadAnamaly(data);
  6961. uni.hideLoading();
  6962. uni.showToast({ title: "上报成功", icon: "success" });
  6963. setTimeout(() => {
  6964. uni.navigateBack();
  6965. }, 1500);
  6966. } catch (err) {
  6967. uni.hideLoading();
  6968. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  6969. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  6970. }
  6971. }
  6972. }
  6973. };
  6974. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  6975. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  6976. vue.createElementVNode("scroll-view", {
  6977. "scroll-y": "",
  6978. class: "anomaly-scroll"
  6979. }, [
  6980. vue.createElementVNode("view", { class: "ano-card" }, [
  6981. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6982. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6983. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  6984. ]),
  6985. vue.createElementVNode("view", {
  6986. class: "ano-type-row",
  6987. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  6988. }, [
  6989. vue.createElementVNode(
  6990. "text",
  6991. {
  6992. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  6993. },
  6994. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  6995. 3
  6996. /* TEXT, CLASS */
  6997. ),
  6998. vue.createElementVNode("image", {
  6999. class: "ano-right-arrow",
  7000. src: _imports_0$2
  7001. })
  7002. ])
  7003. ]),
  7004. vue.createElementVNode("view", { class: "ano-card" }, [
  7005. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7006. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7007. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  7008. ]),
  7009. vue.withDirectives(vue.createElementVNode(
  7010. "textarea",
  7011. {
  7012. class: "ano-textarea",
  7013. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  7014. placeholder: "请详细描述现场异常情况...",
  7015. "placeholder-style": "color:#ccc; font-size:28rpx;",
  7016. maxlength: "500"
  7017. },
  7018. null,
  7019. 512
  7020. /* NEED_PATCH */
  7021. ), [
  7022. [vue.vModelText, $data.anomalyDesc]
  7023. ])
  7024. ]),
  7025. vue.createElementVNode("view", { class: "ano-card" }, [
  7026. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7027. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7028. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  7029. ]),
  7030. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  7031. (vue.openBlock(true), vue.createElementBlock(
  7032. vue.Fragment,
  7033. null,
  7034. vue.renderList($data.photoList, (img, idx) => {
  7035. return vue.openBlock(), vue.createElementBlock("view", {
  7036. class: "ano-photo-item",
  7037. key: idx
  7038. }, [
  7039. vue.createElementVNode("image", {
  7040. class: "ano-photo-preview",
  7041. src: img.url || img.localPath || img,
  7042. mode: "aspectFill"
  7043. }, null, 8, ["src"]),
  7044. vue.createElementVNode("view", {
  7045. class: "ano-photo-del",
  7046. onClick: ($event) => $options.removePhoto(idx)
  7047. }, "×", 8, ["onClick"])
  7048. ]);
  7049. }),
  7050. 128
  7051. /* KEYED_FRAGMENT */
  7052. )),
  7053. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7054. key: 0,
  7055. class: "ano-photo-add",
  7056. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7057. }, [
  7058. vue.createElementVNode("image", {
  7059. class: "ano-add-icon",
  7060. src: _imports_1$6
  7061. }),
  7062. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7063. ])) : vue.createCommentVNode("v-if", true)
  7064. ])
  7065. ]),
  7066. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7067. ]),
  7068. vue.createElementVNode("view", { class: "ano-footer" }, [
  7069. vue.createElementVNode("button", {
  7070. class: "ano-submit-btn",
  7071. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7072. }, "提交上报")
  7073. ]),
  7074. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7075. key: 0,
  7076. class: "ano-sheet-mask",
  7077. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7078. }, [
  7079. vue.createElementVNode("view", {
  7080. class: "ano-sheet",
  7081. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7082. }, ["stop"]))
  7083. }, [
  7084. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7085. vue.createElementVNode("scroll-view", {
  7086. "scroll-y": "",
  7087. class: "ano-sheet-list"
  7088. }, [
  7089. (vue.openBlock(true), vue.createElementBlock(
  7090. vue.Fragment,
  7091. null,
  7092. vue.renderList($data.anomalyTypes, (type, idx) => {
  7093. return vue.openBlock(), vue.createElementBlock("view", {
  7094. class: "ano-sheet-item",
  7095. key: idx,
  7096. onClick: ($event) => $options.selectType(type)
  7097. }, [
  7098. vue.createElementVNode(
  7099. "text",
  7100. {
  7101. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7102. },
  7103. vue.toDisplayString(type.label),
  7104. 3
  7105. /* TEXT, CLASS */
  7106. ),
  7107. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7108. key: 0,
  7109. class: "ano-check-icon",
  7110. src: _imports_0$2
  7111. })) : vue.createCommentVNode("v-if", true)
  7112. ], 8, ["onClick"]);
  7113. }),
  7114. 128
  7115. /* KEYED_FRAGMENT */
  7116. ))
  7117. ]),
  7118. vue.createElementVNode("view", {
  7119. class: "ano-sheet-cancel",
  7120. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7121. }, "取消")
  7122. ])
  7123. ])) : vue.createCommentVNode("v-if", true)
  7124. ]);
  7125. }
  7126. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7127. const _sfc_main$o = {
  7128. data() {
  7129. return {
  7130. tabs: ["全部", "已完成", "已拒绝"],
  7131. activeTab: 0,
  7132. stats: {
  7133. total: 0,
  7134. reject: 0,
  7135. reward: 0,
  7136. punish: 0
  7137. },
  7138. orders: [],
  7139. serviceList: [],
  7140. pageNum: 1,
  7141. pageSize: 10,
  7142. total: 0,
  7143. loading: false
  7144. };
  7145. },
  7146. computed: {
  7147. filteredOrders() {
  7148. return this.orders;
  7149. }
  7150. },
  7151. async onLoad() {
  7152. await this.loadServiceList();
  7153. this.fetchStats();
  7154. this.fetchOrders(true);
  7155. },
  7156. methods: {
  7157. async loadServiceList() {
  7158. try {
  7159. const res = await getServiceList();
  7160. this.serviceList = res.data || [];
  7161. } catch (err) {
  7162. formatAppLog("error", "at pages/mine/order-stats.vue:159", "获取服务类型失败:", err);
  7163. }
  7164. },
  7165. async fetchStats() {
  7166. try {
  7167. const res = await getOrderStats();
  7168. if (res.code === 200 && res.data) {
  7169. this.stats = {
  7170. ...this.stats,
  7171. ...res.data
  7172. };
  7173. }
  7174. } catch (err) {
  7175. formatAppLog("error", "at pages/mine/order-stats.vue:172", "获取统计值失败:", err);
  7176. }
  7177. },
  7178. async fetchOrders(reset = false) {
  7179. if (reset) {
  7180. this.pageNum = 1;
  7181. this.orders = [];
  7182. }
  7183. if (this.loading)
  7184. return;
  7185. if (!reset && this.orders.length >= this.total && this.total !== 0)
  7186. return;
  7187. this.loading = true;
  7188. try {
  7189. const statusMap = { 0: void 0, 1: 4, 2: 5 };
  7190. const params = {
  7191. status: statusMap[this.activeTab],
  7192. pageNum: this.pageNum,
  7193. pageSize: this.pageSize
  7194. };
  7195. const res = await getStatisticOrders(params);
  7196. if (res.code === 200) {
  7197. this.total = res.total || 0;
  7198. const rows = res.rows || [];
  7199. const mapped = rows.map((item) => this.transformOrder(item));
  7200. this.orders = this.orders.concat(mapped);
  7201. this.pageNum++;
  7202. }
  7203. } catch (err) {
  7204. formatAppLog("error", "at pages/mine/order-stats.vue:200", "获取订单列表失败:", err);
  7205. } finally {
  7206. this.loading = false;
  7207. }
  7208. },
  7209. transformOrder(order) {
  7210. const service = this.serviceList.find((s) => s.id === order.service);
  7211. const mode = (service == null ? void 0 : service.mode) || 0;
  7212. const isRoundTrip = mode === 1;
  7213. const isSuccess = order.status === 4;
  7214. return {
  7215. id: order.id,
  7216. orderType: isRoundTrip ? 1 : 2,
  7217. typeName: (service == null ? void 0 : service.name) || "未知",
  7218. typeIcon: (service == null ? void 0 : service.iconUrl) || "",
  7219. status: isSuccess ? "完成" : "拒绝",
  7220. finishTime: order.serviceTime || "",
  7221. serviceTime: order.serviceTime || "",
  7222. petName: order.petName || "未知",
  7223. petBreed: order.breed || "未知",
  7224. petAvatar: order.petAvatarUrl || "/static/dog.png",
  7225. price: (order.price / 100).toFixed(2),
  7226. startName: order.fromAddress || "",
  7227. startAddr: order.fromAddress || "",
  7228. endName: (order.customerName || "") + " " + (order.customerPhone || ""),
  7229. endAddr: order.toAddress || "",
  7230. serviceNote: order.remark || ""
  7231. };
  7232. },
  7233. switchTab(idx) {
  7234. this.activeTab = idx;
  7235. this.fetchOrders(true);
  7236. },
  7237. onReachBottom() {
  7238. this.fetchOrders();
  7239. },
  7240. navBack() {
  7241. uni.navigateBack();
  7242. }
  7243. }
  7244. };
  7245. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7246. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7247. vue.createElementVNode("view", { class: "stats-banner" }, [
  7248. vue.createElementVNode("view", { class: "banner-item" }, [
  7249. vue.createElementVNode(
  7250. "text",
  7251. { class: "banner-num" },
  7252. vue.toDisplayString($data.stats.total),
  7253. 1
  7254. /* TEXT */
  7255. ),
  7256. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7257. ]),
  7258. vue.createElementVNode("view", { class: "banner-item" }, [
  7259. vue.createElementVNode(
  7260. "text",
  7261. { class: "banner-num" },
  7262. vue.toDisplayString($data.stats.reject),
  7263. 1
  7264. /* TEXT */
  7265. ),
  7266. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7267. ]),
  7268. vue.createElementVNode("view", { class: "banner-item" }, [
  7269. vue.createElementVNode(
  7270. "text",
  7271. { class: "banner-num" },
  7272. vue.toDisplayString($data.stats.reward),
  7273. 1
  7274. /* TEXT */
  7275. ),
  7276. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7277. ]),
  7278. vue.createElementVNode("view", { class: "banner-item" }, [
  7279. vue.createElementVNode(
  7280. "text",
  7281. { class: "banner-num" },
  7282. vue.toDisplayString($data.stats.punish),
  7283. 1
  7284. /* TEXT */
  7285. ),
  7286. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7287. ])
  7288. ]),
  7289. vue.createElementVNode("view", { class: "tab-bar" }, [
  7290. (vue.openBlock(true), vue.createElementBlock(
  7291. vue.Fragment,
  7292. null,
  7293. vue.renderList($data.tabs, (tab, idx) => {
  7294. return vue.openBlock(), vue.createElementBlock("view", {
  7295. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7296. key: idx,
  7297. onClick: ($event) => $options.switchTab(idx)
  7298. }, [
  7299. vue.createElementVNode(
  7300. "text",
  7301. null,
  7302. vue.toDisplayString(tab),
  7303. 1
  7304. /* TEXT */
  7305. ),
  7306. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7307. key: 0,
  7308. class: "tab-line"
  7309. })) : vue.createCommentVNode("v-if", true)
  7310. ], 10, ["onClick"]);
  7311. }),
  7312. 128
  7313. /* KEYED_FRAGMENT */
  7314. ))
  7315. ]),
  7316. vue.createElementVNode(
  7317. "scroll-view",
  7318. {
  7319. "scroll-y": "",
  7320. class: "order-scroll",
  7321. onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
  7322. },
  7323. [
  7324. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7325. (vue.openBlock(true), vue.createElementBlock(
  7326. vue.Fragment,
  7327. null,
  7328. vue.renderList($options.filteredOrders, (order, idx) => {
  7329. return vue.openBlock(), vue.createElementBlock("view", {
  7330. class: "order-card",
  7331. key: idx
  7332. }, [
  7333. vue.createElementVNode("view", { class: "card-header" }, [
  7334. vue.createElementVNode("view", { class: "type-badge" }, [
  7335. vue.createElementVNode("image", {
  7336. class: "type-icon",
  7337. src: order.typeIcon
  7338. }, null, 8, ["src"]),
  7339. vue.createElementVNode(
  7340. "text",
  7341. { class: "type-text" },
  7342. vue.toDisplayString(order.typeName),
  7343. 1
  7344. /* TEXT */
  7345. )
  7346. ]),
  7347. vue.createElementVNode(
  7348. "text",
  7349. {
  7350. class: vue.normalizeClass(["status-text", order.status === "完成" ? "green" : "red"])
  7351. },
  7352. vue.toDisplayString(order.status === "完成" ? "完成:" : "拒绝:") + vue.toDisplayString(order.finishTime),
  7353. 3
  7354. /* TEXT, CLASS */
  7355. )
  7356. ]),
  7357. vue.createElementVNode(
  7358. "text",
  7359. { class: "service-time" },
  7360. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7361. 1
  7362. /* TEXT */
  7363. ),
  7364. vue.createElementVNode("view", { class: "pet-card" }, [
  7365. vue.createElementVNode("image", {
  7366. class: "pet-avatar",
  7367. src: order.petAvatar,
  7368. mode: "aspectFill"
  7369. }, null, 8, ["src"]),
  7370. vue.createElementVNode("view", { class: "pet-info" }, [
  7371. vue.createElementVNode(
  7372. "text",
  7373. { class: "pet-name" },
  7374. vue.toDisplayString(order.petName),
  7375. 1
  7376. /* TEXT */
  7377. ),
  7378. vue.createElementVNode(
  7379. "text",
  7380. { class: "pet-breed" },
  7381. "品种: " + vue.toDisplayString(order.petBreed),
  7382. 1
  7383. /* TEXT */
  7384. )
  7385. ]),
  7386. vue.createElementVNode(
  7387. "text",
  7388. { class: "pet-price" },
  7389. "¥" + vue.toDisplayString(order.price),
  7390. 1
  7391. /* TEXT */
  7392. )
  7393. ]),
  7394. vue.createElementVNode("view", { class: "route-info" }, [
  7395. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7396. vue.Fragment,
  7397. { key: 0 },
  7398. [
  7399. vue.createElementVNode("view", { class: "route-item" }, [
  7400. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7401. vue.createElementVNode("view", { class: "route-connector" }),
  7402. vue.createElementVNode("view", { class: "address-box" }, [
  7403. vue.createElementVNode(
  7404. "text",
  7405. { class: "addr-title" },
  7406. vue.toDisplayString(order.startName),
  7407. 1
  7408. /* TEXT */
  7409. ),
  7410. vue.createElementVNode(
  7411. "text",
  7412. { class: "addr-desc" },
  7413. vue.toDisplayString(order.startAddr),
  7414. 1
  7415. /* TEXT */
  7416. )
  7417. ])
  7418. ]),
  7419. vue.createElementVNode("view", { class: "route-item" }, [
  7420. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7421. vue.createElementVNode("view", { class: "address-box" }, [
  7422. vue.createElementVNode(
  7423. "text",
  7424. { class: "addr-title" },
  7425. vue.toDisplayString(order.endName),
  7426. 1
  7427. /* TEXT */
  7428. ),
  7429. vue.createElementVNode(
  7430. "text",
  7431. { class: "addr-desc" },
  7432. vue.toDisplayString(order.endAddr),
  7433. 1
  7434. /* TEXT */
  7435. )
  7436. ])
  7437. ])
  7438. ],
  7439. 64
  7440. /* STABLE_FRAGMENT */
  7441. )) : (vue.openBlock(), vue.createElementBlock(
  7442. vue.Fragment,
  7443. { key: 1 },
  7444. [
  7445. vue.createElementVNode("view", { class: "route-item" }, [
  7446. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7447. vue.createElementVNode("view", { class: "address-box" }, [
  7448. vue.createElementVNode(
  7449. "text",
  7450. { class: "addr-title" },
  7451. vue.toDisplayString(order.endName),
  7452. 1
  7453. /* TEXT */
  7454. ),
  7455. vue.createElementVNode(
  7456. "text",
  7457. { class: "addr-desc" },
  7458. vue.toDisplayString(order.endAddr),
  7459. 1
  7460. /* TEXT */
  7461. )
  7462. ])
  7463. ]),
  7464. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7465. key: 0,
  7466. class: "service-note-row"
  7467. }, [
  7468. vue.createElementVNode(
  7469. "text",
  7470. { class: "service-note-text" },
  7471. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7472. 1
  7473. /* TEXT */
  7474. )
  7475. ])) : vue.createCommentVNode("v-if", true)
  7476. ],
  7477. 64
  7478. /* STABLE_FRAGMENT */
  7479. ))
  7480. ])
  7481. ]);
  7482. }),
  7483. 128
  7484. /* KEYED_FRAGMENT */
  7485. )),
  7486. $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7487. key: 0,
  7488. class: "empty-state"
  7489. }, [
  7490. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7491. ])) : vue.createCommentVNode("v-if", true),
  7492. $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7493. key: 1,
  7494. class: "loading-more"
  7495. }, [
  7496. vue.createElementVNode("text", null, "加载中...")
  7497. ])) : vue.createCommentVNode("v-if", true),
  7498. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7499. ],
  7500. 32
  7501. /* NEED_HYDRATION */
  7502. )
  7503. ]);
  7504. }
  7505. 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"]]);
  7506. function getBalanceOnApp() {
  7507. return request({
  7508. url: "/fulfiller/log/balanceOnApp",
  7509. method: "GET"
  7510. });
  7511. }
  7512. function pageBalanceOnApp(data) {
  7513. return request({
  7514. url: "/fulfiller/log/pageBalanceOnApp",
  7515. method: "GET",
  7516. data
  7517. });
  7518. }
  7519. function listBalanceOnApp(data) {
  7520. return request({
  7521. url: "/fulfiller/log/listBalanceOnApp",
  7522. method: "GET",
  7523. data
  7524. });
  7525. }
  7526. function pointsOnApp() {
  7527. return request({
  7528. url: "/fulfiller/log/pointsOnApp",
  7529. method: "GET"
  7530. });
  7531. }
  7532. function pagePointsOnApp(data) {
  7533. return request({
  7534. url: "/fulfiller/log/pagePointsOnApp",
  7535. method: "GET",
  7536. data
  7537. });
  7538. }
  7539. function listPointsOnApp(data) {
  7540. return request({
  7541. url: "/fulfiller/log/listPointsOnApp",
  7542. method: "GET",
  7543. data
  7544. });
  7545. }
  7546. function countOnAppReward(data) {
  7547. return request({
  7548. url: "/fulfiller/log/countOnAppReward",
  7549. method: "GET",
  7550. data
  7551. });
  7552. }
  7553. function listOnAppReward(data) {
  7554. return request({
  7555. url: "/fulfiller/log/listOnAppReward",
  7556. method: "GET",
  7557. data
  7558. });
  7559. }
  7560. const FlfBalanceBizType = {
  7561. admin_reward: "后台奖励",
  7562. admin_punish: "后台惩罚",
  7563. admin_adjust: "后台调整",
  7564. order_reward: "订单奖励",
  7565. order_punish: "订单惩罚",
  7566. order_finish: "订单完成",
  7567. salary: "工资发放",
  7568. withdraw: "提现"
  7569. };
  7570. const FlfPointsBizType = {
  7571. admin_reward: "后台奖励",
  7572. admin_punish: "后台惩罚",
  7573. admin_adjust: "后台调整",
  7574. order_reward: "订单奖励",
  7575. order_punish: "订单惩罚",
  7576. order_finish: "订单完成"
  7577. };
  7578. const FlfRewardBizType = {
  7579. admin_reward: "后台奖励",
  7580. admin_punish: "后台惩罚",
  7581. order_reward: "订单奖励",
  7582. order_punish: "订单惩罚",
  7583. order_finish: "订单完成"
  7584. };
  7585. const FlfActionType = {
  7586. add: "收入",
  7587. reduce: "支出"
  7588. };
  7589. const fulfillerEnum = {
  7590. FlfBalanceBizType,
  7591. FlfPointsBizType,
  7592. FlfRewardBizType,
  7593. FlfActionType
  7594. };
  7595. const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
  7596. const _sfc_main$n = {
  7597. data() {
  7598. const now = /* @__PURE__ */ new Date();
  7599. return {
  7600. tabs: ["全部", "奖励", "惩罚"],
  7601. activeTab: 0,
  7602. selectedYear: now.getFullYear(),
  7603. selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
  7604. // 默认当前月,处理一下测试数据时间
  7605. // 统计数据
  7606. stats: {
  7607. rewardCount: 0,
  7608. punishCount: 0,
  7609. rewardBalance: 0,
  7610. punishBalance: 0
  7611. },
  7612. // 月份选择器状态
  7613. showMonthPicker: false,
  7614. pickerYear: 2026,
  7615. pickerMonth: 3,
  7616. years: [2024, 2025, 2026],
  7617. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7618. yearScrollTop: 0,
  7619. monthScrollTop: 0,
  7620. // 奖惩记录列表
  7621. records: []
  7622. };
  7623. },
  7624. computed: {
  7625. filteredList() {
  7626. if (this.activeTab === 0)
  7627. return this.records;
  7628. const targetType = this.activeTab === 1 ? "reward" : "penalty";
  7629. return this.records.filter((r) => r.type === targetType);
  7630. }
  7631. },
  7632. onShow() {
  7633. if (this.selectedYear === 2026 && this.selectedMonth === 2)
  7634. ;
  7635. this.fetchData();
  7636. },
  7637. methods: {
  7638. async fetchData() {
  7639. const params = {
  7640. year: this.selectedYear,
  7641. month: this.selectedMonth
  7642. };
  7643. this.fetchStats(params);
  7644. this.fetchList(params);
  7645. },
  7646. async fetchStats(params) {
  7647. try {
  7648. const res = await countOnAppReward(params);
  7649. if (res.code === 200) {
  7650. this.stats = res.data || {
  7651. rewardCount: 0,
  7652. punishCount: 0,
  7653. rewardBalance: 0,
  7654. punishBalance: 0
  7655. };
  7656. }
  7657. } catch (err) {
  7658. formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
  7659. }
  7660. },
  7661. async fetchList(params) {
  7662. try {
  7663. const res = await listOnAppReward(params);
  7664. if (res.code === 200) {
  7665. const list = res.data || [];
  7666. this.records = list.map((item) => {
  7667. const isAdd = item.type === "add";
  7668. const amountVal = Math.abs(item.amount) / 100;
  7669. let dateStr = "";
  7670. if (item.createTime) {
  7671. const datePart = item.createTime.split(" ")[0];
  7672. const parts = datePart.split("-");
  7673. if (parts.length >= 3) {
  7674. dateStr = `${parts[1]}-${parts[2]}`;
  7675. }
  7676. }
  7677. return {
  7678. ...item,
  7679. date: dateStr,
  7680. title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
  7681. desc: item.reason || "",
  7682. amount: isAdd ? amountVal : -amountVal,
  7683. type: isAdd ? "reward" : "penalty",
  7684. status: isAdd ? "已入账" : "已扣款",
  7685. // 简化处理状态
  7686. statusClass: isAdd ? "credited" : "deducted"
  7687. };
  7688. });
  7689. }
  7690. } catch (err) {
  7691. formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
  7692. }
  7693. },
  7694. switchTab(idx) {
  7695. this.activeTab = idx;
  7696. },
  7697. openMonthPicker() {
  7698. this.pickerYear = this.selectedYear;
  7699. this.pickerMonth = this.selectedMonth;
  7700. this.showMonthPicker = true;
  7701. },
  7702. closeMonthPicker() {
  7703. this.showMonthPicker = false;
  7704. },
  7705. confirmMonthPicker() {
  7706. this.selectedYear = this.pickerYear;
  7707. this.selectedMonth = this.pickerMonth;
  7708. this.closeMonthPicker();
  7709. this.fetchData();
  7710. },
  7711. goToAll() {
  7712. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7713. }
  7714. }
  7715. };
  7716. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7717. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7718. vue.createElementVNode("view", { class: "top-banner" }, [
  7719. vue.createElementVNode("view", {
  7720. class: "month-btn",
  7721. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7722. }, [
  7723. vue.createElementVNode(
  7724. "text",
  7725. { class: "month-text" },
  7726. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7727. 1
  7728. /* TEXT */
  7729. )
  7730. ]),
  7731. vue.createElementVNode("view", { class: "stats-grid" }, [
  7732. vue.createElementVNode("view", { class: "stats-cell" }, [
  7733. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7734. vue.createElementVNode("text", { class: "stats-num" }, [
  7735. vue.createTextVNode(
  7736. vue.toDisplayString($data.stats.rewardCount),
  7737. 1
  7738. /* TEXT */
  7739. ),
  7740. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7741. ]),
  7742. vue.createElementVNode("view", { class: "stats-divider" }),
  7743. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7744. ]),
  7745. vue.createElementVNode("view", { class: "stats-cell" }, [
  7746. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7747. vue.createElementVNode("text", { class: "stats-num" }, [
  7748. vue.createTextVNode(
  7749. vue.toDisplayString($data.stats.punishCount),
  7750. 1
  7751. /* TEXT */
  7752. ),
  7753. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7754. ]),
  7755. vue.createElementVNode("view", { class: "stats-divider" }),
  7756. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7757. ]),
  7758. vue.createElementVNode("view", { class: "stats-cell" }, [
  7759. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7760. vue.createElementVNode(
  7761. "text",
  7762. { class: "stats-num reward-num" },
  7763. vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
  7764. 1
  7765. /* TEXT */
  7766. ),
  7767. vue.createElementVNode("view", { class: "stats-divider" }),
  7768. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7769. ]),
  7770. vue.createElementVNode("view", { class: "stats-cell" }, [
  7771. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7772. vue.createElementVNode(
  7773. "text",
  7774. { class: "stats-num penalty-num" },
  7775. vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
  7776. 1
  7777. /* TEXT */
  7778. ),
  7779. vue.createElementVNode("view", { class: "stats-divider" }),
  7780. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7781. ])
  7782. ])
  7783. ]),
  7784. vue.createElementVNode("view", { class: "list-header" }, [
  7785. vue.createElementVNode("view", { class: "tab-bar" }, [
  7786. (vue.openBlock(true), vue.createElementBlock(
  7787. vue.Fragment,
  7788. null,
  7789. vue.renderList($data.tabs, (tab, idx) => {
  7790. return vue.openBlock(), vue.createElementBlock("view", {
  7791. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7792. key: idx,
  7793. onClick: ($event) => $options.switchTab(idx)
  7794. }, [
  7795. vue.createElementVNode(
  7796. "text",
  7797. null,
  7798. vue.toDisplayString(tab),
  7799. 1
  7800. /* TEXT */
  7801. ),
  7802. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7803. key: 0,
  7804. class: "tab-line"
  7805. })) : vue.createCommentVNode("v-if", true)
  7806. ], 10, ["onClick"]);
  7807. }),
  7808. 128
  7809. /* KEYED_FRAGMENT */
  7810. ))
  7811. ]),
  7812. vue.createElementVNode("view", {
  7813. class: "view-all-btn",
  7814. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7815. }, [
  7816. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7817. ])
  7818. ]),
  7819. vue.createElementVNode("view", { class: "record-list" }, [
  7820. (vue.openBlock(true), vue.createElementBlock(
  7821. vue.Fragment,
  7822. null,
  7823. vue.renderList($options.filteredList, (item, idx) => {
  7824. return vue.openBlock(), vue.createElementBlock("view", {
  7825. class: "record-item",
  7826. key: idx
  7827. }, [
  7828. vue.createElementVNode(
  7829. "view",
  7830. {
  7831. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7832. },
  7833. [
  7834. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7835. ],
  7836. 2
  7837. /* CLASS */
  7838. ),
  7839. vue.createElementVNode("view", { class: "ri-content" }, [
  7840. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7841. vue.createElementVNode(
  7842. "text",
  7843. { class: "ri-date" },
  7844. vue.toDisplayString(item.date),
  7845. 1
  7846. /* TEXT */
  7847. ),
  7848. vue.createElementVNode(
  7849. "text",
  7850. { class: "ri-title" },
  7851. vue.toDisplayString(item.title),
  7852. 1
  7853. /* TEXT */
  7854. )
  7855. ]),
  7856. vue.createElementVNode(
  7857. "text",
  7858. { class: "ri-desc" },
  7859. vue.toDisplayString(item.desc),
  7860. 1
  7861. /* TEXT */
  7862. )
  7863. ]),
  7864. vue.createElementVNode("view", { class: "ri-right" }, [
  7865. vue.createElementVNode(
  7866. "text",
  7867. {
  7868. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7869. },
  7870. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7871. 3
  7872. /* TEXT, CLASS */
  7873. ),
  7874. vue.createElementVNode(
  7875. "text",
  7876. {
  7877. class: vue.normalizeClass(["ri-status", item.statusClass])
  7878. },
  7879. vue.toDisplayString(item.status),
  7880. 3
  7881. /* TEXT, CLASS */
  7882. )
  7883. ])
  7884. ]);
  7885. }),
  7886. 128
  7887. /* KEYED_FRAGMENT */
  7888. )),
  7889. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  7890. ]),
  7891. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  7892. key: 0,
  7893. class: "picker-mask",
  7894. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7895. }, [
  7896. vue.createElementVNode("view", {
  7897. class: "picker-sheet",
  7898. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  7899. }, ["stop"]))
  7900. }, [
  7901. vue.createElementVNode("view", { class: "picker-header" }, [
  7902. vue.createElementVNode("text", {
  7903. class: "picker-cancel",
  7904. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7905. }, "取消"),
  7906. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  7907. vue.createElementVNode("text", {
  7908. class: "picker-confirm",
  7909. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  7910. }, "确定")
  7911. ]),
  7912. vue.createElementVNode("view", { class: "picker-body" }, [
  7913. vue.createElementVNode("scroll-view", {
  7914. "scroll-y": "",
  7915. class: "picker-column",
  7916. "scroll-top": $data.yearScrollTop,
  7917. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  7918. }, [
  7919. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7920. (vue.openBlock(true), vue.createElementBlock(
  7921. vue.Fragment,
  7922. null,
  7923. vue.renderList($data.years, (year) => {
  7924. return vue.openBlock(), vue.createElementBlock("view", {
  7925. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  7926. key: year,
  7927. onClick: ($event) => $data.pickerYear = year
  7928. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  7929. }),
  7930. 128
  7931. /* KEYED_FRAGMENT */
  7932. )),
  7933. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7934. ], 40, ["scroll-top"]),
  7935. vue.createElementVNode("view", { class: "picker-highlight" }),
  7936. vue.createElementVNode("scroll-view", {
  7937. "scroll-y": "",
  7938. class: "picker-column",
  7939. "scroll-top": $data.monthScrollTop,
  7940. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  7941. }, [
  7942. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7943. (vue.openBlock(true), vue.createElementBlock(
  7944. vue.Fragment,
  7945. null,
  7946. vue.renderList($data.months, (month) => {
  7947. return vue.openBlock(), vue.createElementBlock("view", {
  7948. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  7949. key: month,
  7950. onClick: ($event) => $data.pickerMonth = month
  7951. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  7952. }),
  7953. 128
  7954. /* KEYED_FRAGMENT */
  7955. )),
  7956. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7957. ], 40, ["scroll-top"])
  7958. ])
  7959. ])
  7960. ])) : vue.createCommentVNode("v-if", true)
  7961. ]);
  7962. }
  7963. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  7964. const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
  7965. const _sfc_main$m = {
  7966. data() {
  7967. const now = /* @__PURE__ */ new Date();
  7968. return {
  7969. tabs: ["全部", "奖励", "惩罚"],
  7970. activeTab: 0,
  7971. selectedYear: now.getFullYear(),
  7972. selectedMonth: now.getMonth() + 1,
  7973. // 原始分组数据
  7974. allGroups: [],
  7975. loading: false
  7976. };
  7977. },
  7978. computed: {
  7979. currentPickerDate() {
  7980. return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
  7981. },
  7982. filteredGroups() {
  7983. if (this.activeTab === 0)
  7984. return this.allGroups;
  7985. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  7986. return this.allGroups.map((g) => ({
  7987. ...g,
  7988. items: g.items.filter((i) => i.type === typeKey)
  7989. })).filter((g) => g.items.length > 0);
  7990. }
  7991. },
  7992. onShow() {
  7993. this.fetchMonthData();
  7994. },
  7995. methods: {
  7996. async fetchMonthData() {
  7997. if (this.loading)
  7998. return;
  7999. this.loading = true;
  8000. try {
  8001. const params = {
  8002. year: this.selectedYear,
  8003. month: this.selectedMonth
  8004. };
  8005. const res = await listOnAppReward(params);
  8006. const data = res.data || [];
  8007. if (data.length === 0) {
  8008. this.allGroups = [];
  8009. return;
  8010. }
  8011. let credited = 0;
  8012. const items = data.map((item) => {
  8013. const isAdd = item.type === "add";
  8014. const amountVal = Math.abs(item.amount) / 100;
  8015. if (isAdd)
  8016. credited += amountVal;
  8017. let dateStr = "";
  8018. if (item.createTime) {
  8019. const datePart = item.createTime.split(" ")[0];
  8020. const parts = datePart.split("-");
  8021. if (parts.length >= 3) {
  8022. dateStr = `${parts[1]}-${parts[2]}`;
  8023. }
  8024. }
  8025. return {
  8026. ...item,
  8027. date: dateStr,
  8028. title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
  8029. desc: item.reason || "",
  8030. amount: isAdd ? amountVal : -amountVal,
  8031. type: isAdd ? "reward" : "penalty",
  8032. status: isAdd ? "已入账" : "已扣款",
  8033. statusClass: isAdd ? "credited" : "deducted"
  8034. };
  8035. });
  8036. this.allGroups = [{
  8037. month: this.selectedMonth,
  8038. year: this.selectedYear,
  8039. credited,
  8040. pending: 0,
  8041. items
  8042. }];
  8043. } catch (err) {
  8044. formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
  8045. } finally {
  8046. this.loading = false;
  8047. }
  8048. },
  8049. onDateChange(e) {
  8050. const val = e.detail.value;
  8051. const parts = val.split("-");
  8052. this.selectedYear = parseInt(parts[0]);
  8053. this.selectedMonth = parseInt(parts[1]);
  8054. this.fetchMonthData();
  8055. },
  8056. switchTab(idx) {
  8057. this.activeTab = idx;
  8058. }
  8059. }
  8060. };
  8061. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  8062. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8063. vue.createElementVNode("view", { class: "filter-header" }, [
  8064. vue.createElementVNode("view", { class: "tab-bar" }, [
  8065. (vue.openBlock(true), vue.createElementBlock(
  8066. vue.Fragment,
  8067. null,
  8068. vue.renderList($data.tabs, (tab, idx) => {
  8069. return vue.openBlock(), vue.createElementBlock("view", {
  8070. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8071. key: idx,
  8072. onClick: ($event) => $options.switchTab(idx)
  8073. }, [
  8074. vue.createElementVNode(
  8075. "text",
  8076. null,
  8077. vue.toDisplayString(tab),
  8078. 1
  8079. /* TEXT */
  8080. ),
  8081. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8082. key: 0,
  8083. class: "tab-line"
  8084. })) : vue.createCommentVNode("v-if", true)
  8085. ], 10, ["onClick"]);
  8086. }),
  8087. 128
  8088. /* KEYED_FRAGMENT */
  8089. ))
  8090. ]),
  8091. vue.createElementVNode("view", { class: "date-filter" }, [
  8092. vue.createElementVNode("picker", {
  8093. mode: "date",
  8094. fields: "month",
  8095. value: $options.currentPickerDate,
  8096. onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  8097. }, [
  8098. vue.createElementVNode("view", { class: "picker-trigger" }, [
  8099. vue.createElementVNode(
  8100. "text",
  8101. null,
  8102. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
  8103. 1
  8104. /* TEXT */
  8105. ),
  8106. vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
  8107. ])
  8108. ], 40, ["value"])
  8109. ])
  8110. ]),
  8111. vue.createElementVNode("scroll-view", {
  8112. "scroll-y": "",
  8113. class: "main-scroll"
  8114. }, [
  8115. (vue.openBlock(true), vue.createElementBlock(
  8116. vue.Fragment,
  8117. null,
  8118. vue.renderList($options.filteredGroups, (group, gIdx) => {
  8119. return vue.openBlock(), vue.createElementBlock("view", {
  8120. key: gIdx,
  8121. class: "month-group"
  8122. }, [
  8123. vue.createElementVNode("view", { class: "month-header" }, [
  8124. vue.createElementVNode(
  8125. "text",
  8126. { class: "month-title" },
  8127. vue.toDisplayString(group.month) + "月",
  8128. 1
  8129. /* TEXT */
  8130. ),
  8131. vue.createElementVNode("view", { class: "month-summary" }, [
  8132. vue.createElementVNode(
  8133. "text",
  8134. { class: "month-sum-text" },
  8135. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  8136. 1
  8137. /* TEXT */
  8138. ),
  8139. vue.createElementVNode(
  8140. "text",
  8141. { class: "month-sum-text" },
  8142. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  8143. 1
  8144. /* TEXT */
  8145. )
  8146. ])
  8147. ]),
  8148. (vue.openBlock(true), vue.createElementBlock(
  8149. vue.Fragment,
  8150. null,
  8151. vue.renderList(group.items, (item, rIdx) => {
  8152. return vue.openBlock(), vue.createElementBlock("view", {
  8153. class: "record-item",
  8154. key: rIdx
  8155. }, [
  8156. vue.createElementVNode(
  8157. "view",
  8158. {
  8159. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8160. },
  8161. [
  8162. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8163. ],
  8164. 2
  8165. /* CLASS */
  8166. ),
  8167. vue.createElementVNode("view", { class: "ri-content" }, [
  8168. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8169. vue.createElementVNode(
  8170. "text",
  8171. { class: "ri-date" },
  8172. vue.toDisplayString(item.date),
  8173. 1
  8174. /* TEXT */
  8175. ),
  8176. vue.createElementVNode(
  8177. "text",
  8178. { class: "ri-title" },
  8179. vue.toDisplayString(item.title),
  8180. 1
  8181. /* TEXT */
  8182. )
  8183. ]),
  8184. vue.createElementVNode(
  8185. "text",
  8186. { class: "ri-desc" },
  8187. vue.toDisplayString(item.desc),
  8188. 1
  8189. /* TEXT */
  8190. )
  8191. ]),
  8192. vue.createElementVNode("view", { class: "ri-right" }, [
  8193. vue.createElementVNode(
  8194. "text",
  8195. {
  8196. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8197. },
  8198. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8199. 3
  8200. /* TEXT, CLASS */
  8201. ),
  8202. vue.createElementVNode(
  8203. "text",
  8204. {
  8205. class: vue.normalizeClass(["ri-status", item.statusClass])
  8206. },
  8207. vue.toDisplayString(item.status),
  8208. 3
  8209. /* TEXT, CLASS */
  8210. )
  8211. ])
  8212. ]);
  8213. }),
  8214. 128
  8215. /* KEYED_FRAGMENT */
  8216. ))
  8217. ]);
  8218. }),
  8219. 128
  8220. /* KEYED_FRAGMENT */
  8221. )),
  8222. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  8223. ])
  8224. ]);
  8225. }
  8226. 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"]]);
  8227. const logic = {
  8228. components: {
  8229. customTabbar
  8230. },
  8231. data() {
  8232. return {
  8233. showServicePopup: false,
  8234. showLogoutPopup: false,
  8235. profile: null,
  8236. profileLoading: false
  8237. };
  8238. },
  8239. onShow() {
  8240. uni.hideTabBar();
  8241. if (isLoggedIn()) {
  8242. this.loadProfile();
  8243. }
  8244. },
  8245. methods: {
  8246. async loadProfile() {
  8247. if (this.profileLoading)
  8248. return;
  8249. this.profileLoading = true;
  8250. try {
  8251. const res = await getMyProfile();
  8252. this.profile = res.data || null;
  8253. } catch (err) {
  8254. formatAppLog("error", "at pages/mine/logic.js:32", "获取个人信息失败:", err);
  8255. } finally {
  8256. this.profileLoading = false;
  8257. }
  8258. },
  8259. navToSettings() {
  8260. uni.navigateTo({
  8261. url: "/pages/mine/settings/index"
  8262. });
  8263. },
  8264. navToProfile() {
  8265. uni.navigateTo({
  8266. url: "/pages/mine/settings/profile/index"
  8267. });
  8268. },
  8269. navToLevel() {
  8270. uni.navigateTo({
  8271. url: "/pages/mine/level/index"
  8272. });
  8273. },
  8274. navToNotification() {
  8275. uni.navigateTo({
  8276. url: "/pages/mine/message/index"
  8277. });
  8278. },
  8279. navToWallet() {
  8280. uni.navigateTo({
  8281. url: "/pages/mine/wallet/index"
  8282. });
  8283. },
  8284. navToPoints() {
  8285. uni.navigateTo({
  8286. url: "/pages/mine/points/index"
  8287. });
  8288. },
  8289. navToOrderStats() {
  8290. uni.navigateTo({
  8291. url: "/pages/mine/order-stats"
  8292. });
  8293. },
  8294. navToRewards() {
  8295. uni.navigateTo({
  8296. url: "/pages/mine/rewards"
  8297. });
  8298. },
  8299. openServicePopup() {
  8300. this.showServicePopup = true;
  8301. },
  8302. closeServicePopup() {
  8303. this.showServicePopup = false;
  8304. },
  8305. previewQRCode() {
  8306. uni.previewImage({
  8307. urls: ["/static/logo.png"]
  8308. });
  8309. },
  8310. openOnlineService() {
  8311. uni.showToast({
  8312. title: "正在跳转企业微信客服...",
  8313. icon: "none"
  8314. });
  8315. },
  8316. callServicePhone() {
  8317. uni.makePhoneCall({
  8318. phoneNumber: "400-123-4567"
  8319. });
  8320. },
  8321. logout() {
  8322. this.showLogoutPopup = true;
  8323. },
  8324. cancelLogout() {
  8325. this.showLogoutPopup = false;
  8326. },
  8327. async confirmLogout() {
  8328. this.showLogoutPopup = false;
  8329. try {
  8330. await logout();
  8331. } catch (e) {
  8332. }
  8333. clearAuth();
  8334. uni.reLaunch({
  8335. url: "/pages/login/login"
  8336. });
  8337. }
  8338. }
  8339. };
  8340. const _imports_0$1 = "/static/icons/motorbike.svg";
  8341. const _imports_1$5 = "/static/icons/location.svg";
  8342. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  8343. const _imports_3$1 = "/static/icons/calendar.svg";
  8344. const _imports_4 = "/static/icons/settings.svg";
  8345. const _imports_1$4 = "/static/icons/crown.svg";
  8346. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  8347. const _imports_3 = "/static/icons/chevron_right.svg";
  8348. const _imports_8 = "/static/icons/money_linear.svg";
  8349. const _imports_9 = "/static/icons/headset_linear.svg";
  8350. const _imports_10 = "/static/icons/close_gray.svg";
  8351. const _imports_12 = "/static/icons/headset_green.svg";
  8352. const _imports_14 = "/static/icons/phone_green.svg";
  8353. const _sfc_main$l = {
  8354. ...logic
  8355. };
  8356. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  8357. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
  8358. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8359. return vue.openBlock(), vue.createElementBlock(
  8360. vue.Fragment,
  8361. null,
  8362. [
  8363. vue.createElementVNode("view", { class: "container" }, [
  8364. vue.createElementVNode("view", { class: "nav-bg" }, [
  8365. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8366. vue.createElementVNode("view", { class: "bg-circle-2" })
  8367. ]),
  8368. vue.createElementVNode("view", { class: "header-section" }, [
  8369. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8370. vue.createElementVNode("view", {
  8371. class: "user-card",
  8372. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8373. }, [
  8374. vue.createElementVNode("image", {
  8375. class: "avatar",
  8376. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8377. mode: "aspectFill"
  8378. }, null, 8, ["src"]),
  8379. vue.createElementVNode("view", { class: "info-content" }, [
  8380. vue.createElementVNode("view", { class: "name-row" }, [
  8381. vue.createElementVNode(
  8382. "text",
  8383. { class: "name" },
  8384. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8385. 1
  8386. /* TEXT */
  8387. ),
  8388. vue.createElementVNode("view", { class: "tags" }, [
  8389. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8390. key: 0,
  8391. class: "tag green"
  8392. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8393. key: 1,
  8394. class: "tag green"
  8395. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8396. key: 2,
  8397. class: "tag",
  8398. style: { "background": "#eee", "color": "#999" }
  8399. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8400. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8401. key: 3,
  8402. class: "tag blue"
  8403. }, "全职")) : vue.createCommentVNode("v-if", true),
  8404. vue.createElementVNode("image", {
  8405. class: "bike-icon",
  8406. src: _imports_0$1
  8407. })
  8408. ])
  8409. ]),
  8410. vue.createElementVNode("view", { class: "detail-row" }, [
  8411. vue.createElementVNode("image", {
  8412. class: "small-icon",
  8413. src: _imports_1$5
  8414. }),
  8415. vue.createElementVNode(
  8416. "text",
  8417. null,
  8418. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8419. 1
  8420. /* TEXT */
  8421. ),
  8422. vue.createElementVNode("image", {
  8423. class: "arrow-icon-small",
  8424. src: _imports_0
  8425. })
  8426. ]),
  8427. vue.createElementVNode("view", { class: "detail-row" }, [
  8428. vue.createElementVNode("image", {
  8429. class: "small-icon",
  8430. src: _imports_3$1
  8431. }),
  8432. vue.createElementVNode(
  8433. "text",
  8434. null,
  8435. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8436. 1
  8437. /* TEXT */
  8438. )
  8439. ])
  8440. ]),
  8441. vue.createElementVNode("image", {
  8442. class: "settings-icon",
  8443. src: _imports_4,
  8444. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8445. })
  8446. ]),
  8447. vue.createElementVNode("view", { class: "vip-card" }, [
  8448. vue.createElementVNode("view", { class: "vip-left" }, [
  8449. vue.createElementVNode("image", {
  8450. class: "vip-icon",
  8451. src: _imports_1$4
  8452. }),
  8453. vue.createElementVNode("view", { class: "vip-text" }, [
  8454. vue.createElementVNode(
  8455. "text",
  8456. { class: "vip-title" },
  8457. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.levelName) || "普通履约者"),
  8458. 1
  8459. /* TEXT */
  8460. ),
  8461. vue.createElementVNode(
  8462. "text",
  8463. { class: "vip-desc" },
  8464. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.levelDesc) || "完成更多订单即可升级"),
  8465. 1
  8466. /* TEXT */
  8467. )
  8468. ])
  8469. ]),
  8470. vue.createElementVNode("view", {
  8471. class: "vip-btn",
  8472. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8473. }, [
  8474. vue.createElementVNode("text", null, "查看权益"),
  8475. vue.createElementVNode("image", {
  8476. class: "arrow-icon-small",
  8477. src: _imports_6
  8478. })
  8479. ])
  8480. ])
  8481. ]),
  8482. vue.createElementVNode("view", { class: "stats-panel" }, [
  8483. vue.createElementVNode("view", {
  8484. class: "stat-item",
  8485. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8486. }, [
  8487. vue.createElementVNode("view", { class: "stat-header" }, [
  8488. vue.createElementVNode("view", { class: "red-bar" }),
  8489. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8490. vue.createElementVNode("image", {
  8491. class: "arrow-icon",
  8492. src: _imports_3
  8493. })
  8494. ]),
  8495. vue.createElementVNode("view", { class: "stat-value" }, [
  8496. vue.createElementVNode(
  8497. "text",
  8498. { class: "num" },
  8499. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8500. 1
  8501. /* TEXT */
  8502. ),
  8503. vue.createElementVNode("text", { class: "unit" }, "元")
  8504. ]),
  8505. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8506. ]),
  8507. vue.createElementVNode("view", { class: "divider" }),
  8508. vue.createElementVNode("view", {
  8509. class: "stat-item",
  8510. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8511. }, [
  8512. vue.createElementVNode("view", { class: "stat-header" }, [
  8513. vue.createElementVNode("view", { class: "green-bar" }),
  8514. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8515. vue.createElementVNode("image", {
  8516. class: "arrow-icon",
  8517. src: _imports_3
  8518. })
  8519. ]),
  8520. vue.createElementVNode("view", { class: "stat-value" }, [
  8521. vue.createElementVNode(
  8522. "text",
  8523. { class: "num" },
  8524. vue.toDisplayString(((_m = _ctx.profile) == null ? void 0 : _m.orderCount) || 0),
  8525. 1
  8526. /* TEXT */
  8527. ),
  8528. vue.createElementVNode("text", { class: "unit" }, "单")
  8529. ]),
  8530. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8531. ]),
  8532. vue.createElementVNode("view", { class: "divider" }),
  8533. vue.createElementVNode("view", {
  8534. class: "stat-item",
  8535. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8536. }, [
  8537. vue.createElementVNode("view", { class: "stat-header" }, [
  8538. vue.createElementVNode("view", { class: "orange-bar" }),
  8539. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8540. vue.createElementVNode("image", {
  8541. class: "arrow-icon",
  8542. src: _imports_3
  8543. })
  8544. ]),
  8545. vue.createElementVNode("view", { class: "stat-value" }, [
  8546. vue.createElementVNode(
  8547. "text",
  8548. { class: "num" },
  8549. vue.toDisplayString(((_n = _ctx.profile) == null ? void 0 : _n.points) || 0),
  8550. 1
  8551. /* TEXT */
  8552. ),
  8553. vue.createElementVNode("text", { class: "unit" }, "分")
  8554. ]),
  8555. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8556. ])
  8557. ]),
  8558. vue.createElementVNode("view", { class: "menu-list" }, [
  8559. vue.createElementVNode("view", {
  8560. class: "menu-item",
  8561. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8562. }, [
  8563. vue.createElementVNode("image", {
  8564. class: "menu-icon",
  8565. src: _imports_8
  8566. }),
  8567. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8568. vue.createElementVNode("image", {
  8569. class: "arrow-icon",
  8570. src: _imports_3
  8571. })
  8572. ]),
  8573. vue.createElementVNode("view", {
  8574. class: "menu-item",
  8575. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8576. }, [
  8577. vue.createElementVNode("image", {
  8578. class: "menu-icon",
  8579. src: _imports_9
  8580. }),
  8581. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8582. vue.createElementVNode("image", {
  8583. class: "arrow-icon",
  8584. src: _imports_3
  8585. })
  8586. ])
  8587. ]),
  8588. vue.createElementVNode("view", {
  8589. class: "logout-btn",
  8590. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.logout && _ctx.logout(...args))
  8591. }, "退出登录"),
  8592. vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
  8593. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8594. key: 0,
  8595. class: "service-popup-mask",
  8596. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8597. }, [
  8598. vue.createElementVNode("view", {
  8599. class: "service-popup",
  8600. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  8601. }, ["stop"]))
  8602. }, [
  8603. vue.createElementVNode("view", { class: "service-header" }, [
  8604. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8605. vue.createElementVNode("image", {
  8606. class: "close-icon",
  8607. src: _imports_10,
  8608. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8609. })
  8610. ]),
  8611. vue.createElementVNode("view", { class: "qr-section" }, [
  8612. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8613. vue.createElementVNode("image", {
  8614. class: "qr-img",
  8615. src: _imports_1$8,
  8616. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8617. }),
  8618. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8619. ]),
  8620. vue.createElementVNode("view", { class: "service-list" }, [
  8621. vue.createElementVNode("view", {
  8622. class: "service-row",
  8623. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8624. }, [
  8625. vue.createElementVNode("image", {
  8626. class: "service-row-icon",
  8627. src: _imports_12
  8628. }),
  8629. vue.createElementVNode("view", { class: "service-info" }, [
  8630. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8631. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8632. ]),
  8633. vue.createElementVNode("image", {
  8634. class: "arrow-icon-small",
  8635. src: _imports_3
  8636. })
  8637. ]),
  8638. vue.createElementVNode("view", { class: "service-row" }, [
  8639. vue.createElementVNode("image", {
  8640. class: "service-row-icon",
  8641. src: _imports_13
  8642. }),
  8643. vue.createElementVNode("view", { class: "service-info" }, [
  8644. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8645. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8646. ]),
  8647. vue.createElementVNode("view", {
  8648. class: "call-btn",
  8649. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8650. }, [
  8651. vue.createElementVNode("image", {
  8652. class: "phone-icon-small",
  8653. src: _imports_14
  8654. }),
  8655. vue.createElementVNode("text", null, "拨打")
  8656. ])
  8657. ])
  8658. ])
  8659. ])
  8660. ])) : vue.createCommentVNode("v-if", true),
  8661. vue.createElementVNode(
  8662. "view",
  8663. {
  8664. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8665. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8666. onTouchmove: _cache[19] || (_cache[19] = vue.withModifiers(() => {
  8667. }, ["stop", "prevent"]))
  8668. },
  8669. [
  8670. vue.createElementVNode("view", {
  8671. class: "popup-modal",
  8672. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  8673. }, ["stop"]))
  8674. }, [
  8675. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8676. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8677. vue.createElementVNode("view", { class: "popup-actions" }, [
  8678. vue.createElementVNode("view", {
  8679. class: "popup-btn cancel",
  8680. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8681. }, "取消"),
  8682. vue.createElementVNode("view", {
  8683. class: "popup-btn confirm",
  8684. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8685. }, "确定")
  8686. ])
  8687. ])
  8688. ],
  8689. 34
  8690. /* CLASS, NEED_HYDRATION */
  8691. )
  8692. ]),
  8693. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8694. ],
  8695. 64
  8696. /* STABLE_FRAGMENT */
  8697. );
  8698. }
  8699. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8700. const _sfc_main$k = {
  8701. data() {
  8702. return {};
  8703. },
  8704. methods: {
  8705. navBack() {
  8706. uni.navigateBack({
  8707. delta: 1
  8708. });
  8709. },
  8710. navTo(type) {
  8711. let url = "";
  8712. switch (type) {
  8713. case "profile":
  8714. url = "/pages/mine/settings/profile/index";
  8715. break;
  8716. case "auth":
  8717. url = "/pages/mine/settings/auth/index";
  8718. break;
  8719. case "bank":
  8720. url = "/pages/mine/settings/bank/index";
  8721. break;
  8722. case "security":
  8723. url = "/pages/mine/settings/security/index";
  8724. break;
  8725. case "push":
  8726. url = "/pages/mine/settings/notification/index";
  8727. break;
  8728. case "about":
  8729. url = "/pages/mine/settings/about/index";
  8730. break;
  8731. default:
  8732. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8733. return;
  8734. }
  8735. uni.navigateTo({ url });
  8736. },
  8737. clearCache() {
  8738. uni.showToast({ title: "缓存已清理", icon: "none" });
  8739. }
  8740. }
  8741. };
  8742. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8743. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8744. vue.createElementVNode("view", { class: "custom-header" }, [
  8745. vue.createElementVNode("view", {
  8746. class: "header-left",
  8747. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8748. }, [
  8749. vue.createElementVNode("image", {
  8750. class: "back-icon",
  8751. src: _imports_0,
  8752. style: { "transform": "rotate(180deg)" }
  8753. })
  8754. ]),
  8755. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8756. vue.createElementVNode("view", { class: "header-right" })
  8757. ]),
  8758. vue.createElementVNode("view", { class: "header-placeholder" }),
  8759. vue.createElementVNode("view", { class: "group-card" }, [
  8760. vue.createElementVNode("view", {
  8761. class: "list-item",
  8762. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8763. }, [
  8764. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8765. vue.createElementVNode("image", {
  8766. class: "arrow-icon",
  8767. src: _imports_3
  8768. })
  8769. ]),
  8770. vue.createElementVNode("view", {
  8771. class: "list-item",
  8772. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8773. }, [
  8774. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8775. vue.createElementVNode("image", {
  8776. class: "arrow-icon",
  8777. src: _imports_3
  8778. })
  8779. ]),
  8780. vue.createElementVNode("view", {
  8781. class: "list-item",
  8782. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8783. }, [
  8784. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8785. vue.createElementVNode("view", { class: "item-right" }, [
  8786. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8787. vue.createElementVNode("image", {
  8788. class: "arrow-icon",
  8789. src: _imports_3
  8790. })
  8791. ])
  8792. ]),
  8793. vue.createElementVNode("view", {
  8794. class: "list-item no-border",
  8795. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8796. }, [
  8797. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8798. vue.createElementVNode("image", {
  8799. class: "arrow-icon",
  8800. src: _imports_3
  8801. })
  8802. ])
  8803. ]),
  8804. vue.createElementVNode("view", { class: "group-card" }, [
  8805. vue.createElementVNode("view", {
  8806. class: "list-item",
  8807. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8808. }, [
  8809. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8810. vue.createElementVNode("view", { class: "item-right" }, [
  8811. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8812. vue.createElementVNode("image", {
  8813. class: "arrow-icon",
  8814. src: _imports_3
  8815. })
  8816. ])
  8817. ]),
  8818. vue.createElementVNode("view", { class: "list-item" }, [
  8819. vue.createElementVNode("view", { class: "item-row-left" }, [
  8820. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8821. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8822. ]),
  8823. vue.createElementVNode("switch", {
  8824. checked: "",
  8825. color: "#FF5722",
  8826. style: { "transform": "scale(0.8)" }
  8827. })
  8828. ]),
  8829. vue.createElementVNode("view", {
  8830. class: "list-item",
  8831. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8832. }, [
  8833. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8834. vue.createElementVNode("view", { class: "item-right" }, [
  8835. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8836. vue.createElementVNode("image", {
  8837. class: "arrow-icon",
  8838. src: _imports_3
  8839. })
  8840. ])
  8841. ]),
  8842. vue.createElementVNode("view", {
  8843. class: "list-item no-border",
  8844. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8845. }, [
  8846. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8847. vue.createElementVNode("view", { class: "item-right" }, [
  8848. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8849. vue.createElementVNode("image", {
  8850. class: "arrow-icon",
  8851. src: _imports_3
  8852. })
  8853. ])
  8854. ])
  8855. ])
  8856. ]);
  8857. }
  8858. 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"]]);
  8859. const _sfc_main$j = {
  8860. data() {
  8861. return {
  8862. userInfo: {
  8863. name: "",
  8864. workType: "",
  8865. workStatus: "",
  8866. city: "",
  8867. avatar: "/static/touxiang.png",
  8868. stationName: ""
  8869. },
  8870. isStatusPickerShow: false,
  8871. isCityPickerShow: false,
  8872. // 城市级联选择器(与我要加入页面一致)
  8873. selectStep: 0,
  8874. selectedPathway: [],
  8875. currentCityList: [],
  8876. selectedCityId: null
  8877. };
  8878. },
  8879. onLoad() {
  8880. this.loadUserInfo();
  8881. uni.$on("updateName", (newName) => {
  8882. this.userInfo.name = newName;
  8883. });
  8884. },
  8885. onUnload() {
  8886. uni.$off("updateName");
  8887. },
  8888. methods: {
  8889. // 加载用户信息 @author steelwei
  8890. async loadUserInfo() {
  8891. uni.showLoading({ title: "加载中..." });
  8892. try {
  8893. const res = await getMyProfile();
  8894. if (res.code === 200) {
  8895. const data = res.data;
  8896. this.userInfo = {
  8897. name: data.realName || data.name,
  8898. workType: data.workType === "full_time" ? "全职" : "兼职",
  8899. workStatus: this.formatStatus(data.status),
  8900. city: data.cityName || "",
  8901. avatar: data.avatarUrl || "/static/touxiang.png",
  8902. stationName: data.stationName || "未分配站点"
  8903. };
  8904. } else {
  8905. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  8906. }
  8907. } catch (error) {
  8908. formatAppLog("error", "at pages/mine/settings/profile/index.vue:173", "加载用户信息失败:", error);
  8909. uni.showToast({ title: "网络错误", icon: "none" });
  8910. } finally {
  8911. uni.hideLoading();
  8912. }
  8913. },
  8914. // 格式化状态 @author steelwei
  8915. formatStatus(status) {
  8916. const statusMap = {
  8917. "busy": "接单中",
  8918. "resting": "休息中",
  8919. "disabled": "已禁用"
  8920. };
  8921. return statusMap[status] || status;
  8922. },
  8923. navBack() {
  8924. uni.navigateBack({ delta: 1 });
  8925. },
  8926. // 修改头像 @author steelwei
  8927. changeAvatar() {
  8928. uni.chooseImage({
  8929. count: 1,
  8930. success: async (res) => {
  8931. const tempFilePath = res.tempFilePaths[0];
  8932. uni.showLoading({ title: "上传中..." });
  8933. try {
  8934. const uploadRes = await uploadFile(tempFilePath);
  8935. if (uploadRes.code === 200) {
  8936. const { url, ossId } = uploadRes.data;
  8937. const result = await updateAvatar(ossId);
  8938. if (result.code === 200) {
  8939. this.userInfo.avatar = url;
  8940. uni.showToast({ title: "修改成功", icon: "success" });
  8941. } else {
  8942. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  8943. }
  8944. }
  8945. } catch (error) {
  8946. formatAppLog("error", "at pages/mine/settings/profile/index.vue:218", "修改头像失败:", error);
  8947. uni.showToast({ title: "上传失败", icon: "none" });
  8948. } finally {
  8949. uni.hideLoading();
  8950. }
  8951. }
  8952. });
  8953. },
  8954. editName() {
  8955. uni.navigateTo({
  8956. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  8957. });
  8958. },
  8959. showStatusPicker() {
  8960. this.isStatusPickerShow = true;
  8961. },
  8962. closeStatusPicker() {
  8963. this.isStatusPickerShow = false;
  8964. },
  8965. // 选择状态 @author steelwei
  8966. async selectStatus(statusText) {
  8967. const statusMap = {
  8968. "接单中": "busy",
  8969. "休息中": "resting"
  8970. };
  8971. const status = statusMap[statusText];
  8972. try {
  8973. const res = await updateStatus(status);
  8974. if (res.code === 200) {
  8975. this.userInfo.workStatus = statusText;
  8976. uni.showToast({ title: "状态已更新", icon: "success" });
  8977. } else {
  8978. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8979. }
  8980. } catch (error) {
  8981. formatAppLog("error", "at pages/mine/settings/profile/index.vue:258", "修改状态失败:", error);
  8982. uni.showToast({ title: "网络错误", icon: "none" });
  8983. } finally {
  8984. this.closeStatusPicker();
  8985. }
  8986. },
  8987. // 城市级联选择器(与我要加入页面一致) @author steelwei
  8988. async showCityPicker() {
  8989. this.isCityPickerShow = true;
  8990. if (this.selectedPathway.length === 0) {
  8991. await this.resetCityPicker();
  8992. }
  8993. },
  8994. async resetCityPicker() {
  8995. this.selectStep = 0;
  8996. this.selectedPathway = [];
  8997. await this.loadAreaChildren(0);
  8998. },
  8999. closeCityPicker() {
  9000. this.isCityPickerShow = false;
  9001. },
  9002. async loadAreaChildren(parentId) {
  9003. try {
  9004. const res = await getAreaChildren(parentId);
  9005. this.currentCityList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  9006. id: item.id,
  9007. name: item.name,
  9008. type: item.type,
  9009. parentId: item.parentId
  9010. }));
  9011. } catch (err) {
  9012. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载区域数据失败:", err);
  9013. this.currentCityList = [];
  9014. }
  9015. },
  9016. async selectCityItem(item) {
  9017. this.selectedPathway[this.selectStep] = item;
  9018. if (item.type === 0) {
  9019. this.selectStep++;
  9020. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  9021. await this.loadAreaChildren(item.id);
  9022. if (this.currentCityList.length === 0) {
  9023. this.selectedCityId = item.id;
  9024. this.confirmCity();
  9025. }
  9026. } else {
  9027. this.selectedCityId = item.id;
  9028. this.confirmCity();
  9029. }
  9030. },
  9031. async jumpToStep(step) {
  9032. this.selectStep = step;
  9033. if (step === 0) {
  9034. await this.loadAreaChildren(0);
  9035. } else {
  9036. const parent = this.selectedPathway[step - 1];
  9037. if (parent) {
  9038. await this.loadAreaChildren(parent.id);
  9039. }
  9040. }
  9041. },
  9042. // 确认城市选择 @author steelwei
  9043. async confirmCity() {
  9044. if (this.selectedPathway.length === 0) {
  9045. uni.showToast({ title: "请选择城市", icon: "none" });
  9046. return;
  9047. }
  9048. const cityName = this.selectedPathway.map((i) => i.name).join(" ");
  9049. const cityCode = String(this.selectedCityId);
  9050. try {
  9051. const res = await updateCity(cityCode, cityName);
  9052. if (res.code === 200) {
  9053. this.userInfo.city = cityName;
  9054. uni.showToast({ title: "修改成功", icon: "success" });
  9055. this.closeCityPicker();
  9056. this.selectedPathway = [];
  9057. } else {
  9058. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9059. }
  9060. } catch (error) {
  9061. formatAppLog("error", "at pages/mine/settings/profile/index.vue:346", "修改城市失败:", error);
  9062. uni.showToast({ title: "网络错误", icon: "none" });
  9063. }
  9064. }
  9065. }
  9066. };
  9067. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  9068. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9069. vue.createElementVNode("view", { class: "custom-header" }, [
  9070. vue.createElementVNode("view", {
  9071. class: "header-left",
  9072. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9073. }, [
  9074. vue.createElementVNode("image", {
  9075. class: "back-icon",
  9076. src: _imports_0,
  9077. style: { "transform": "rotate(180deg)" }
  9078. })
  9079. ]),
  9080. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  9081. vue.createElementVNode("view", { class: "header-right" })
  9082. ]),
  9083. vue.createElementVNode("view", { class: "header-placeholder" }),
  9084. vue.createElementVNode("view", { class: "group-card" }, [
  9085. vue.createElementVNode("view", {
  9086. class: "list-item",
  9087. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  9088. }, [
  9089. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  9090. vue.createElementVNode("view", { class: "item-right" }, [
  9091. vue.createElementVNode("image", {
  9092. class: "user-avatar",
  9093. src: $data.userInfo.avatar,
  9094. mode: "aspectFill"
  9095. }, null, 8, ["src"]),
  9096. vue.createElementVNode("image", {
  9097. class: "arrow-icon",
  9098. src: _imports_3
  9099. })
  9100. ])
  9101. ]),
  9102. vue.createElementVNode("view", {
  9103. class: "list-item",
  9104. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  9105. }, [
  9106. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  9107. vue.createElementVNode("view", { class: "item-right" }, [
  9108. vue.createElementVNode(
  9109. "text",
  9110. { class: "item-value" },
  9111. vue.toDisplayString($data.userInfo.name),
  9112. 1
  9113. /* TEXT */
  9114. ),
  9115. vue.createElementVNode("image", {
  9116. class: "arrow-icon",
  9117. src: _imports_3
  9118. })
  9119. ])
  9120. ])
  9121. ]),
  9122. vue.createElementVNode("view", { class: "group-card" }, [
  9123. vue.createElementVNode("view", {
  9124. class: "list-item",
  9125. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  9126. }, [
  9127. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  9128. vue.createElementVNode("view", { class: "item-right" }, [
  9129. vue.createElementVNode(
  9130. "text",
  9131. { class: "item-value-black" },
  9132. vue.toDisplayString($data.userInfo.workStatus),
  9133. 1
  9134. /* TEXT */
  9135. ),
  9136. vue.createElementVNode("image", {
  9137. class: "arrow-icon",
  9138. src: _imports_3
  9139. })
  9140. ])
  9141. ])
  9142. ]),
  9143. vue.createElementVNode("view", { class: "group-card" }, [
  9144. vue.createElementVNode("view", {
  9145. class: "list-item",
  9146. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  9147. }, [
  9148. vue.createElementVNode("text", { class: "item-title" }, "工作城市"),
  9149. vue.createElementVNode("view", { class: "item-right" }, [
  9150. vue.createElementVNode(
  9151. "text",
  9152. { class: "item-value" },
  9153. vue.toDisplayString($data.userInfo.city),
  9154. 1
  9155. /* TEXT */
  9156. ),
  9157. vue.createElementVNode("image", {
  9158. class: "arrow-icon",
  9159. src: _imports_3
  9160. })
  9161. ])
  9162. ]),
  9163. vue.createElementVNode("view", { class: "list-item no-border" }, [
  9164. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  9165. vue.createElementVNode("view", { class: "item-right" }, [
  9166. vue.createElementVNode(
  9167. "text",
  9168. { class: "item-value" },
  9169. vue.toDisplayString($data.userInfo.stationName || "未分配站点"),
  9170. 1
  9171. /* TEXT */
  9172. )
  9173. ])
  9174. ])
  9175. ]),
  9176. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9177. key: 0,
  9178. class: "popup-mask",
  9179. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9180. }, [
  9181. vue.createElementVNode("view", {
  9182. class: "popup-content",
  9183. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  9184. }, ["stop"]))
  9185. }, [
  9186. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  9187. vue.createElementVNode("view", {
  9188. class: "popup-item",
  9189. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  9190. }, "接单中"),
  9191. vue.createElementVNode("view", {
  9192. class: "popup-item",
  9193. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  9194. }, "休息中"),
  9195. vue.createElementVNode("view", {
  9196. class: "popup-cancel",
  9197. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9198. }, "取消")
  9199. ])
  9200. ])) : vue.createCommentVNode("v-if", true),
  9201. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9202. key: 1,
  9203. class: "popup-mask",
  9204. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9205. }, [
  9206. vue.createElementVNode("view", {
  9207. class: "popup-content",
  9208. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  9209. }, ["stop"]))
  9210. }, [
  9211. vue.createElementVNode("view", { class: "popup-header-row" }, [
  9212. vue.createElementVNode("text", {
  9213. class: "popup-btn-cancel",
  9214. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9215. }, "取消"),
  9216. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市"),
  9217. vue.createElementVNode("text", {
  9218. class: "popup-btn-confirm",
  9219. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  9220. }, "确定")
  9221. ]),
  9222. vue.createElementVNode("view", { class: "picker-body" }, [
  9223. vue.createElementVNode("view", { class: "timeline-area" }, [
  9224. (vue.openBlock(true), vue.createElementBlock(
  9225. vue.Fragment,
  9226. null,
  9227. vue.renderList($data.selectedPathway, (item, index) => {
  9228. return vue.openBlock(), vue.createElementBlock("view", {
  9229. class: "timeline-item",
  9230. key: index,
  9231. onClick: ($event) => $options.jumpToStep(index)
  9232. }, [
  9233. vue.createElementVNode("view", { class: "timeline-dot" }),
  9234. vue.createElementVNode(
  9235. "text",
  9236. null,
  9237. vue.toDisplayString(item.name),
  9238. 1
  9239. /* TEXT */
  9240. )
  9241. ], 8, ["onClick"]);
  9242. }),
  9243. 128
  9244. /* KEYED_FRAGMENT */
  9245. )),
  9246. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  9247. key: 0,
  9248. class: "timeline-item active"
  9249. }, [
  9250. vue.createElementVNode("view", { class: "timeline-dot" }),
  9251. vue.createElementVNode("text", null, "请选择")
  9252. ])) : vue.createCommentVNode("v-if", true)
  9253. ]),
  9254. vue.createElementVNode("scroll-view", {
  9255. "scroll-y": "",
  9256. class: "list-area"
  9257. }, [
  9258. (vue.openBlock(true), vue.createElementBlock(
  9259. vue.Fragment,
  9260. null,
  9261. vue.renderList($data.currentCityList, (item) => {
  9262. return vue.openBlock(), vue.createElementBlock("view", {
  9263. class: "list-item",
  9264. key: item.id,
  9265. onClick: ($event) => $options.selectCityItem(item)
  9266. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  9267. }),
  9268. 128
  9269. /* KEYED_FRAGMENT */
  9270. )),
  9271. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9272. key: 0,
  9273. style: { "padding": "20rpx", "color": "#999" }
  9274. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  9275. ])
  9276. ])
  9277. ])
  9278. ])) : vue.createCommentVNode("v-if", true)
  9279. ]);
  9280. }
  9281. 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"]]);
  9282. const _sfc_main$i = {
  9283. data() {
  9284. return {
  9285. authInfo: {
  9286. realName: "",
  9287. idCard: "",
  9288. idCardFront: "",
  9289. idCardBack: "",
  9290. serviceTypes: [],
  9291. authId: false,
  9292. authQual: false,
  9293. pendingAudit: false,
  9294. qualImages: []
  9295. }
  9296. };
  9297. },
  9298. onLoad() {
  9299. this.loadAuthInfo();
  9300. },
  9301. methods: {
  9302. navBack() {
  9303. uni.navigateBack({
  9304. delta: 1
  9305. });
  9306. },
  9307. async loadAuthInfo() {
  9308. try {
  9309. const res = await getAuthInfo();
  9310. if (res.code === 200 && res.data) {
  9311. this.authInfo = {
  9312. realName: res.data.realName || "",
  9313. idCard: res.data.idCard || "",
  9314. idCardFront: res.data.idCardFrontUrl || "",
  9315. idCardBack: res.data.idCardBackUrl || "",
  9316. serviceTypes: res.data.serviceTypeList || [],
  9317. authId: res.data.authId || false,
  9318. authQual: res.data.authQual || false,
  9319. pendingAudit: res.data.pendingAudit || false,
  9320. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  9321. };
  9322. }
  9323. } catch (e) {
  9324. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  9325. uni.showToast({ title: "加载失败", icon: "none" });
  9326. }
  9327. },
  9328. maskIdCard(idCard) {
  9329. if (!idCard || idCard.length < 8)
  9330. return idCard;
  9331. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9332. },
  9333. editAuth() {
  9334. uni.showModal({
  9335. title: "提示",
  9336. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9337. success: (res) => {
  9338. if (res.confirm) {
  9339. uni.navigateTo({
  9340. url: "/pages/mine/settings/auth/edit"
  9341. });
  9342. }
  9343. }
  9344. });
  9345. }
  9346. }
  9347. };
  9348. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  9349. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9350. vue.createElementVNode("view", { class: "custom-header" }, [
  9351. vue.createElementVNode("view", {
  9352. class: "header-left",
  9353. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9354. }, [
  9355. vue.createElementVNode("image", {
  9356. class: "back-icon",
  9357. src: _imports_0,
  9358. style: { "transform": "rotate(180deg)" }
  9359. })
  9360. ]),
  9361. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9362. vue.createElementVNode("view", { class: "header-right" })
  9363. ]),
  9364. vue.createElementVNode("view", { class: "header-placeholder" }),
  9365. vue.createElementVNode("view", { class: "card" }, [
  9366. vue.createElementVNode("view", { class: "section-header" }, [
  9367. vue.createElementVNode("view", { class: "orange-bar" }),
  9368. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9369. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9370. key: 0,
  9371. class: "tag-orange"
  9372. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9373. key: 1,
  9374. class: "tag-green"
  9375. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9376. key: 2,
  9377. class: "tag-gray"
  9378. }, "未认证"))
  9379. ]),
  9380. vue.createElementVNode("view", { class: "info-row" }, [
  9381. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9382. vue.createElementVNode(
  9383. "text",
  9384. { class: "value" },
  9385. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9386. 1
  9387. /* TEXT */
  9388. )
  9389. ]),
  9390. vue.createElementVNode("view", { class: "info-row" }, [
  9391. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9392. vue.createElementVNode(
  9393. "text",
  9394. { class: "value" },
  9395. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9396. 1
  9397. /* TEXT */
  9398. )
  9399. ]),
  9400. vue.createElementVNode("view", { class: "id-card-row" }, [
  9401. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9402. key: 0,
  9403. class: "id-card-box green-bg"
  9404. }, [
  9405. vue.createElementVNode("image", {
  9406. class: "id-card-img",
  9407. src: $data.authInfo.idCardFront,
  9408. mode: "aspectFill"
  9409. }, null, 8, ["src"]),
  9410. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9411. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9412. key: 1,
  9413. class: "id-card-box green-bg"
  9414. }, [
  9415. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9416. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9417. ])),
  9418. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9419. key: 2,
  9420. class: "id-card-box green-bg"
  9421. }, [
  9422. vue.createElementVNode("image", {
  9423. class: "id-card-img",
  9424. src: $data.authInfo.idCardBack,
  9425. mode: "aspectFill"
  9426. }, null, 8, ["src"]),
  9427. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9428. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9429. key: 3,
  9430. class: "id-card-box green-bg"
  9431. }, [
  9432. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9433. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9434. ]))
  9435. ])
  9436. ]),
  9437. vue.createElementVNode("view", { class: "card" }, [
  9438. vue.createElementVNode("view", { class: "section-header" }, [
  9439. vue.createElementVNode("view", { class: "orange-bar" }),
  9440. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9441. ]),
  9442. vue.createElementVNode("view", { class: "tags-row" }, [
  9443. (vue.openBlock(true), vue.createElementBlock(
  9444. vue.Fragment,
  9445. null,
  9446. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9447. return vue.openBlock(), vue.createElementBlock(
  9448. "view",
  9449. {
  9450. class: "service-tag",
  9451. key: index
  9452. },
  9453. vue.toDisplayString(type),
  9454. 1
  9455. /* TEXT */
  9456. );
  9457. }),
  9458. 128
  9459. /* KEYED_FRAGMENT */
  9460. )),
  9461. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9462. key: 0,
  9463. class: "empty-text"
  9464. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9465. ])
  9466. ]),
  9467. vue.createElementVNode("view", { class: "card" }, [
  9468. vue.createElementVNode("view", { class: "section-header" }, [
  9469. vue.createElementVNode("view", { class: "orange-bar" }),
  9470. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9471. ]),
  9472. vue.createElementVNode(
  9473. "text",
  9474. { class: "sub-title" },
  9475. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9476. 1
  9477. /* TEXT */
  9478. ),
  9479. vue.createElementVNode("view", { class: "cert-row" }, [
  9480. (vue.openBlock(true), vue.createElementBlock(
  9481. vue.Fragment,
  9482. null,
  9483. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9484. return vue.openBlock(), vue.createElementBlock("view", {
  9485. class: "cert-box yellow-bg",
  9486. key: index
  9487. }, [
  9488. vue.createElementVNode("image", {
  9489. class: "cert-img",
  9490. src: img,
  9491. mode: "aspectFill"
  9492. }, null, 8, ["src"])
  9493. ]);
  9494. }),
  9495. 128
  9496. /* KEYED_FRAGMENT */
  9497. )),
  9498. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9499. key: 0,
  9500. class: "empty-text"
  9501. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9502. ])
  9503. ]),
  9504. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9505. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9506. key: 0,
  9507. class: "action-btn disabled",
  9508. disabled: ""
  9509. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9510. key: 1,
  9511. class: "action-btn",
  9512. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9513. }, "修改认证信息")),
  9514. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9515. key: 2,
  9516. class: "tips"
  9517. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9518. key: 3,
  9519. class: "tips"
  9520. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9521. ])
  9522. ]);
  9523. }
  9524. 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"]]);
  9525. const _sfc_main$h = {
  9526. data() {
  9527. return {
  9528. idCardFront: "",
  9529. idCardBack: "",
  9530. idCardFrontOssId: "",
  9531. idCardBackOssId: "",
  9532. serviceOptions: [],
  9533. selectedServices: [],
  9534. qualifications: {},
  9535. qualOssIds: {}
  9536. };
  9537. },
  9538. async onLoad() {
  9539. await this.loadServiceOptions();
  9540. this.loadAuthInfo();
  9541. },
  9542. methods: {
  9543. async loadServiceOptions() {
  9544. try {
  9545. const res = await getServiceTypes();
  9546. this.serviceOptions = (res.data || []).map((item) => ({
  9547. id: String(item.id),
  9548. name: item.name
  9549. }));
  9550. } catch (e) {
  9551. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9552. }
  9553. },
  9554. async loadAuthInfo() {
  9555. try {
  9556. uni.showLoading({ title: "加载中..." });
  9557. const res = await getAuthInfo();
  9558. if (res.code === 200 && res.data) {
  9559. this.idCardFront = res.data.idCardFrontUrl || "";
  9560. this.idCardBack = res.data.idCardBackUrl || "";
  9561. this.idCardFrontOssId = res.data.idCardFront || "";
  9562. this.idCardBackOssId = res.data.idCardBack || "";
  9563. let serviceIds = [];
  9564. if (res.data.serviceTypes) {
  9565. serviceIds = [...new Set(
  9566. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9567. )];
  9568. }
  9569. this.selectedServices = serviceIds;
  9570. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9571. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9572. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9573. validNames.forEach((name, idx) => {
  9574. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9575. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9576. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9577. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9578. });
  9579. }
  9580. uni.hideLoading();
  9581. } catch (e) {
  9582. uni.hideLoading();
  9583. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9584. uni.showToast({ title: "加载失败", icon: "none" });
  9585. }
  9586. },
  9587. navBack() {
  9588. uni.navigateBack({ delta: 1 });
  9589. },
  9590. chooseImage(side) {
  9591. uni.chooseImage({
  9592. count: 1,
  9593. sizeType: ["compressed"],
  9594. sourceType: ["album", "camera"],
  9595. success: async (res) => {
  9596. const tempPath = res.tempFilePaths[0];
  9597. if (side === "front") {
  9598. this.idCardFront = tempPath;
  9599. } else {
  9600. this.idCardBack = tempPath;
  9601. }
  9602. try {
  9603. uni.showLoading({ title: "上传中..." });
  9604. const uploadRes = await uploadFile(tempPath);
  9605. if (side === "front") {
  9606. this.idCardFrontOssId = uploadRes.data.ossId;
  9607. } else {
  9608. this.idCardBackOssId = uploadRes.data.ossId;
  9609. }
  9610. uni.hideLoading();
  9611. uni.showToast({ title: "上传成功", icon: "success" });
  9612. } catch (err) {
  9613. uni.hideLoading();
  9614. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9615. uni.showToast({ title: "上传失败", icon: "none" });
  9616. }
  9617. }
  9618. });
  9619. },
  9620. deleteImage(side) {
  9621. if (side === "front") {
  9622. this.idCardFront = "";
  9623. this.idCardFrontOssId = "";
  9624. } else {
  9625. this.idCardBack = "";
  9626. this.idCardBackOssId = "";
  9627. }
  9628. },
  9629. getServiceName(serviceId) {
  9630. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9631. return found ? found.name : "";
  9632. },
  9633. toggleService(service) {
  9634. const index = this.selectedServices.indexOf(service.id);
  9635. if (index > -1) {
  9636. this.selectedServices.splice(index, 1);
  9637. this.$delete(this.qualifications, service.name);
  9638. this.$delete(this.qualOssIds, service.name);
  9639. } else {
  9640. this.selectedServices.push(service.id);
  9641. this.$set(this.qualifications, service.name, []);
  9642. this.$set(this.qualOssIds, service.name, []);
  9643. }
  9644. this.$forceUpdate();
  9645. },
  9646. chooseQualImage(service) {
  9647. uni.chooseImage({
  9648. count: 9,
  9649. sizeType: ["compressed"],
  9650. sourceType: ["album", "camera"],
  9651. success: async (res) => {
  9652. if (!this.qualifications[service]) {
  9653. this.qualifications[service] = [];
  9654. this.qualOssIds[service] = [];
  9655. }
  9656. for (const tempPath of res.tempFilePaths) {
  9657. this.qualifications[service].push(tempPath);
  9658. this.$forceUpdate();
  9659. try {
  9660. uni.showLoading({ title: "上传中..." });
  9661. const uploadRes = await uploadFile(tempPath);
  9662. this.qualOssIds[service].push(uploadRes.data.ossId);
  9663. uni.hideLoading();
  9664. } catch (err) {
  9665. uni.hideLoading();
  9666. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9667. }
  9668. }
  9669. }
  9670. });
  9671. },
  9672. deleteQualImage(service, index) {
  9673. this.qualifications[service].splice(index, 1);
  9674. if (this.qualOssIds[service]) {
  9675. this.qualOssIds[service].splice(index, 1);
  9676. }
  9677. this.$forceUpdate();
  9678. },
  9679. previewImage(service, index) {
  9680. uni.previewImage({
  9681. urls: this.qualifications[service],
  9682. current: index
  9683. });
  9684. },
  9685. async submitAuth() {
  9686. if (!this.idCardFront || !this.idCardBack) {
  9687. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9688. return;
  9689. }
  9690. if (this.selectedServices.length === 0) {
  9691. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9692. return;
  9693. }
  9694. for (const serviceId of this.selectedServices) {
  9695. const name = this.getServiceName(serviceId);
  9696. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9697. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9698. return;
  9699. }
  9700. }
  9701. uni.showModal({
  9702. title: "提示",
  9703. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9704. success: (res) => {
  9705. if (res.confirm) {
  9706. this.doSubmit();
  9707. }
  9708. }
  9709. });
  9710. },
  9711. async doSubmit() {
  9712. const allQualOssIds = [];
  9713. Object.values(this.qualOssIds).forEach((ids) => {
  9714. allQualOssIds.push(...ids);
  9715. });
  9716. const submitData = {
  9717. idCardFront: this.idCardFrontOssId,
  9718. idCardBack: this.idCardBackOssId,
  9719. serviceTypes: this.selectedServices.join(","),
  9720. // 逗号分隔的服务类型ID
  9721. qualifications: allQualOssIds.join(",")
  9722. // 逗号分隔的资质图片OSS ID
  9723. };
  9724. try {
  9725. uni.showLoading({ title: "提交中..." });
  9726. await updateAuthInfo(submitData);
  9727. uni.hideLoading();
  9728. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9729. setTimeout(() => {
  9730. uni.navigateBack({ delta: 1 });
  9731. }, 1500);
  9732. } catch (err) {
  9733. uni.hideLoading();
  9734. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9735. uni.showToast({ title: "提交失败", icon: "none" });
  9736. }
  9737. }
  9738. }
  9739. };
  9740. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9741. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9742. vue.createElementVNode("view", { class: "custom-header" }, [
  9743. vue.createElementVNode("view", {
  9744. class: "header-left",
  9745. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9746. }, [
  9747. vue.createElementVNode("image", {
  9748. class: "back-icon",
  9749. src: _imports_0,
  9750. style: { "transform": "rotate(180deg)" }
  9751. })
  9752. ]),
  9753. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9754. vue.createElementVNode("view", { class: "header-right" })
  9755. ]),
  9756. vue.createElementVNode("view", { class: "header-placeholder" }),
  9757. vue.createElementVNode("view", { class: "warning-tip" }, [
  9758. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9759. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9760. ]),
  9761. vue.createElementVNode("view", { class: "section-card" }, [
  9762. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9763. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9764. vue.createElementVNode("view", { class: "id-card-row" }, [
  9765. vue.createElementVNode("view", {
  9766. class: "id-card-upload",
  9767. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9768. }, [
  9769. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9770. key: 0,
  9771. src: $data.idCardFront,
  9772. class: "id-card-img",
  9773. mode: "aspectFill"
  9774. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9775. key: 1,
  9776. class: "id-card-placeholder"
  9777. }, [
  9778. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9779. ])),
  9780. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9781. key: 2,
  9782. class: "delete-btn",
  9783. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9784. }, "×")) : vue.createCommentVNode("v-if", true),
  9785. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9786. ]),
  9787. vue.createElementVNode("view", {
  9788. class: "id-card-upload",
  9789. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9790. }, [
  9791. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9792. key: 0,
  9793. src: $data.idCardBack,
  9794. class: "id-card-img",
  9795. mode: "aspectFill"
  9796. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9797. key: 1,
  9798. class: "id-card-placeholder"
  9799. }, [
  9800. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9801. ])),
  9802. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9803. key: 2,
  9804. class: "delete-btn",
  9805. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9806. }, "×")) : vue.createCommentVNode("v-if", true),
  9807. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9808. ])
  9809. ])
  9810. ]),
  9811. vue.createElementVNode("view", { class: "section-card" }, [
  9812. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9813. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9814. vue.createElementVNode("view", { class: "service-list" }, [
  9815. (vue.openBlock(true), vue.createElementBlock(
  9816. vue.Fragment,
  9817. null,
  9818. vue.renderList($data.serviceOptions, (service, index) => {
  9819. return vue.openBlock(), vue.createElementBlock("view", {
  9820. class: "service-item",
  9821. key: service.id,
  9822. onClick: ($event) => $options.toggleService(service)
  9823. }, [
  9824. vue.createElementVNode(
  9825. "text",
  9826. { class: "service-name" },
  9827. vue.toDisplayString(service.name),
  9828. 1
  9829. /* TEXT */
  9830. ),
  9831. vue.createElementVNode(
  9832. "view",
  9833. {
  9834. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9835. },
  9836. [
  9837. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9838. ],
  9839. 2
  9840. /* CLASS */
  9841. )
  9842. ], 8, ["onClick"]);
  9843. }),
  9844. 128
  9845. /* KEYED_FRAGMENT */
  9846. ))
  9847. ])
  9848. ]),
  9849. vue.createElementVNode("view", { class: "section-card" }, [
  9850. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9851. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9852. (vue.openBlock(true), vue.createElementBlock(
  9853. vue.Fragment,
  9854. null,
  9855. vue.renderList($data.selectedServices, (serviceId, index) => {
  9856. return vue.openBlock(), vue.createElementBlock("view", {
  9857. key: serviceId,
  9858. class: "qual-section"
  9859. }, [
  9860. vue.createElementVNode(
  9861. "text",
  9862. { class: "qual-title" },
  9863. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  9864. 1
  9865. /* TEXT */
  9866. ),
  9867. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  9868. (vue.openBlock(true), vue.createElementBlock(
  9869. vue.Fragment,
  9870. null,
  9871. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  9872. return vue.openBlock(), vue.createElementBlock("view", {
  9873. class: "qual-item",
  9874. key: imgIndex,
  9875. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  9876. }, [
  9877. vue.createElementVNode("image", {
  9878. src: img,
  9879. class: "qual-img",
  9880. mode: "aspectFill"
  9881. }, null, 8, ["src"]),
  9882. vue.createElementVNode("view", {
  9883. class: "delete-btn",
  9884. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  9885. }, "×", 8, ["onClick"])
  9886. ], 8, ["onClick"]);
  9887. }),
  9888. 128
  9889. /* KEYED_FRAGMENT */
  9890. )),
  9891. vue.createElementVNode("view", {
  9892. class: "qual-upload-btn",
  9893. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  9894. }, [
  9895. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  9896. ], 8, ["onClick"])
  9897. ])
  9898. ]);
  9899. }),
  9900. 128
  9901. /* KEYED_FRAGMENT */
  9902. )),
  9903. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9904. key: 0,
  9905. class: "empty-hint"
  9906. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  9907. ]),
  9908. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9909. vue.createElementVNode("button", {
  9910. class: "submit-btn",
  9911. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  9912. }, "提交审核")
  9913. ])
  9914. ]);
  9915. }
  9916. 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"]]);
  9917. const _imports_1$3 = "/static/icons/shield.svg";
  9918. const _sfc_main$g = {
  9919. data() {
  9920. return {
  9921. hasShieldIcon: false
  9922. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  9923. };
  9924. },
  9925. methods: {
  9926. navBack() {
  9927. uni.navigateBack({
  9928. delta: 1
  9929. });
  9930. },
  9931. editBank() {
  9932. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  9933. }
  9934. }
  9935. };
  9936. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  9937. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9938. vue.createElementVNode("view", { class: "custom-header" }, [
  9939. vue.createElementVNode("view", {
  9940. class: "header-left",
  9941. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9942. }, [
  9943. vue.createElementVNode("image", {
  9944. class: "back-icon",
  9945. src: _imports_0,
  9946. style: { "transform": "rotate(180deg)" }
  9947. })
  9948. ]),
  9949. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  9950. vue.createElementVNode("view", { class: "header-right" })
  9951. ]),
  9952. vue.createElementVNode("view", { class: "header-placeholder" }),
  9953. vue.createElementVNode("view", { class: "bank-card" }, [
  9954. vue.createElementVNode("view", { class: "card-top" }, [
  9955. vue.createElementVNode("view", { class: "bank-info" }, [
  9956. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  9957. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  9958. ]),
  9959. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  9960. ]),
  9961. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  9962. ]),
  9963. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  9964. vue.createElementVNode("view", { class: "card-bg-circle" })
  9965. ]),
  9966. vue.createElementVNode("button", {
  9967. class: "action-btn",
  9968. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  9969. }, "修改银行卡信息"),
  9970. vue.createElementVNode("view", { class: "security-tip" }, [
  9971. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  9972. key: 0,
  9973. class: "shield-icon",
  9974. src: _imports_1$3
  9975. })) : vue.createCommentVNode("v-if", true),
  9976. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  9977. ])
  9978. ]);
  9979. }
  9980. 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"]]);
  9981. const _sfc_main$f = {
  9982. data() {
  9983. return {
  9984. phone: "",
  9985. hasPassword: false
  9986. };
  9987. },
  9988. onLoad() {
  9989. this.loadProfile();
  9990. },
  9991. methods: {
  9992. navBack() {
  9993. uni.navigateBack({
  9994. delta: 1
  9995. });
  9996. },
  9997. async loadProfile() {
  9998. try {
  9999. const res = await getMyProfile();
  10000. if (res.code === 200 && res.data) {
  10001. this.phone = res.data.phone || "";
  10002. this.hasPassword = !!res.data.hasPassword;
  10003. }
  10004. } catch (e) {
  10005. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  10006. }
  10007. },
  10008. maskPhone(phone) {
  10009. if (!phone || phone.length < 11)
  10010. return phone;
  10011. return phone.substring(0, 3) + "****" + phone.substring(7);
  10012. },
  10013. changeMobile() {
  10014. uni.navigateTo({
  10015. url: "/pages/mine/settings/security/change-phone"
  10016. });
  10017. },
  10018. changePassword() {
  10019. uni.navigateTo({
  10020. url: "/pages/mine/settings/security/change-password"
  10021. });
  10022. },
  10023. async deleteAccount() {
  10024. uni.showModal({
  10025. title: "警示",
  10026. content: "注销账号后将无法恢复,确定要继续吗?",
  10027. success: async (res) => {
  10028. if (res.confirm) {
  10029. try {
  10030. const result = await deleteAccount();
  10031. if (result.code === 200) {
  10032. uni.showToast({ title: "账号已注销", icon: "success" });
  10033. setTimeout(() => {
  10034. uni.reLaunch({ url: "/pages/login/login" });
  10035. }, 1500);
  10036. } else {
  10037. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  10038. }
  10039. } catch (e) {
  10040. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  10041. uni.showToast({ title: "注销失败", icon: "none" });
  10042. }
  10043. }
  10044. }
  10045. });
  10046. }
  10047. }
  10048. };
  10049. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  10050. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10051. vue.createElementVNode("view", { class: "custom-header" }, [
  10052. vue.createElementVNode("view", {
  10053. class: "header-left",
  10054. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10055. }, [
  10056. vue.createElementVNode("image", {
  10057. class: "back-icon",
  10058. src: _imports_0,
  10059. style: { "transform": "rotate(180deg)" }
  10060. })
  10061. ]),
  10062. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  10063. vue.createElementVNode("view", { class: "header-right" })
  10064. ]),
  10065. vue.createElementVNode("view", { class: "header-placeholder" }),
  10066. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  10067. vue.createElementVNode("view", { class: "group-card" }, [
  10068. vue.createElementVNode("view", {
  10069. class: "list-item",
  10070. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  10071. }, [
  10072. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  10073. vue.createElementVNode("view", { class: "item-right" }, [
  10074. vue.createElementVNode(
  10075. "text",
  10076. { class: "item-value" },
  10077. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  10078. 1
  10079. /* TEXT */
  10080. ),
  10081. vue.createElementVNode("image", {
  10082. class: "arrow-icon",
  10083. src: _imports_3
  10084. })
  10085. ])
  10086. ]),
  10087. vue.createElementVNode("view", {
  10088. class: "list-item",
  10089. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  10090. }, [
  10091. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  10092. vue.createElementVNode("view", { class: "item-right" }, [
  10093. vue.createElementVNode(
  10094. "text",
  10095. { class: "item-value" },
  10096. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  10097. 1
  10098. /* TEXT */
  10099. ),
  10100. vue.createElementVNode("image", {
  10101. class: "arrow-icon",
  10102. src: _imports_3
  10103. })
  10104. ])
  10105. ])
  10106. ]),
  10107. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  10108. vue.createElementVNode("view", { class: "group-card" }, [
  10109. vue.createElementVNode("view", {
  10110. class: "list-item no-border",
  10111. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  10112. }, [
  10113. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  10114. vue.createElementVNode("image", {
  10115. class: "arrow-icon",
  10116. src: _imports_3
  10117. })
  10118. ])
  10119. ])
  10120. ]);
  10121. }
  10122. 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"]]);
  10123. const _sfc_main$e = {
  10124. data() {
  10125. return {
  10126. name: ""
  10127. };
  10128. },
  10129. onLoad(options) {
  10130. if (options.name) {
  10131. this.name = decodeURIComponent(options.name);
  10132. }
  10133. },
  10134. methods: {
  10135. navBack() {
  10136. uni.navigateBack({ delta: 1 });
  10137. },
  10138. // 提交修改 @author steelwei
  10139. async submitChange() {
  10140. if (!this.name || !this.name.trim()) {
  10141. uni.showToast({ title: "请输入姓名", icon: "none" });
  10142. return;
  10143. }
  10144. if (this.name.trim().length < 2) {
  10145. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  10146. return;
  10147. }
  10148. uni.showLoading({ title: "提交中..." });
  10149. try {
  10150. const res = await updateName(this.name.trim());
  10151. if (res.code === 200) {
  10152. uni.showToast({
  10153. title: "修改成功",
  10154. icon: "success",
  10155. duration: 2e3
  10156. });
  10157. uni.$emit("updateName", this.name.trim());
  10158. setTimeout(() => {
  10159. uni.navigateBack({ delta: 1 });
  10160. }, 2e3);
  10161. } else {
  10162. uni.showToast({
  10163. title: res.msg || "修改失败",
  10164. icon: "none"
  10165. });
  10166. }
  10167. } catch (error) {
  10168. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  10169. uni.showToast({ title: "网络错误", icon: "none" });
  10170. } finally {
  10171. uni.hideLoading();
  10172. }
  10173. }
  10174. }
  10175. };
  10176. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  10177. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10178. vue.createElementVNode("view", { class: "custom-header" }, [
  10179. vue.createElementVNode("view", {
  10180. class: "header-left",
  10181. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10182. }, [
  10183. vue.createElementVNode("image", {
  10184. class: "back-icon",
  10185. src: _imports_0,
  10186. style: { "transform": "rotate(180deg)" }
  10187. })
  10188. ]),
  10189. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  10190. vue.createElementVNode("view", { class: "header-right" })
  10191. ]),
  10192. vue.createElementVNode("view", { class: "header-placeholder" }),
  10193. vue.createElementVNode("view", { class: "form-card" }, [
  10194. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10195. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  10196. vue.withDirectives(vue.createElementVNode(
  10197. "input",
  10198. {
  10199. class: "form-input",
  10200. type: "text",
  10201. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  10202. placeholder: "请输入真实姓名",
  10203. "placeholder-class": "placeholder",
  10204. maxlength: "20"
  10205. },
  10206. null,
  10207. 512
  10208. /* NEED_PATCH */
  10209. ), [
  10210. [vue.vModelText, $data.name]
  10211. ])
  10212. ])
  10213. ]),
  10214. vue.createElementVNode("view", { class: "btn-area" }, [
  10215. vue.createElementVNode("button", {
  10216. class: "submit-btn",
  10217. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  10218. }, "确认修改")
  10219. ]),
  10220. vue.createElementVNode("view", { class: "tips" }, [
  10221. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  10222. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  10223. ])
  10224. ]);
  10225. }
  10226. 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"]]);
  10227. const _sfc_main$d = {
  10228. data() {
  10229. return {
  10230. oldPassword: "",
  10231. newPassword: "",
  10232. confirmPassword: ""
  10233. };
  10234. },
  10235. methods: {
  10236. navBack() {
  10237. uni.navigateBack({ delta: 1 });
  10238. },
  10239. // 提交修改 @author steelwei
  10240. async submitChange() {
  10241. if (!this.oldPassword) {
  10242. uni.showToast({ title: "请输入旧密码", icon: "none" });
  10243. return;
  10244. }
  10245. if (!this.newPassword) {
  10246. uni.showToast({ title: "请输入新密码", icon: "none" });
  10247. return;
  10248. }
  10249. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  10250. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  10251. return;
  10252. }
  10253. if (this.newPassword !== this.confirmPassword) {
  10254. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  10255. return;
  10256. }
  10257. uni.showLoading({ title: "提交中..." });
  10258. try {
  10259. const res = await updatePassword(this.oldPassword, this.newPassword);
  10260. if (res.code === 200) {
  10261. uni.showToast({
  10262. title: "修改成功",
  10263. icon: "success",
  10264. duration: 2e3
  10265. });
  10266. setTimeout(() => {
  10267. uni.navigateBack({ delta: 1 });
  10268. }, 2e3);
  10269. } else {
  10270. uni.showToast({
  10271. title: res.msg || "修改失败",
  10272. icon: "none"
  10273. });
  10274. }
  10275. } catch (error) {
  10276. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  10277. uni.showToast({ title: "网络错误", icon: "none" });
  10278. } finally {
  10279. uni.hideLoading();
  10280. }
  10281. }
  10282. }
  10283. };
  10284. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  10285. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10286. vue.createElementVNode("view", { class: "custom-header" }, [
  10287. vue.createElementVNode("view", {
  10288. class: "header-left",
  10289. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10290. }, [
  10291. vue.createElementVNode("image", {
  10292. class: "back-icon",
  10293. src: _imports_0,
  10294. style: { "transform": "rotate(180deg)" }
  10295. })
  10296. ]),
  10297. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  10298. vue.createElementVNode("view", { class: "header-right" })
  10299. ]),
  10300. vue.createElementVNode("view", { class: "header-placeholder" }),
  10301. vue.createElementVNode("view", { class: "form-card" }, [
  10302. vue.createElementVNode("view", { class: "form-item" }, [
  10303. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  10304. vue.withDirectives(vue.createElementVNode(
  10305. "input",
  10306. {
  10307. class: "form-input",
  10308. type: "password",
  10309. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  10310. placeholder: "请输入旧密码",
  10311. "placeholder-class": "placeholder"
  10312. },
  10313. null,
  10314. 512
  10315. /* NEED_PATCH */
  10316. ), [
  10317. [vue.vModelText, $data.oldPassword]
  10318. ])
  10319. ]),
  10320. vue.createElementVNode("view", { class: "form-item" }, [
  10321. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  10322. vue.withDirectives(vue.createElementVNode(
  10323. "input",
  10324. {
  10325. class: "form-input",
  10326. type: "password",
  10327. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  10328. placeholder: "请输入新密码(6-20位)",
  10329. "placeholder-class": "placeholder"
  10330. },
  10331. null,
  10332. 512
  10333. /* NEED_PATCH */
  10334. ), [
  10335. [vue.vModelText, $data.newPassword]
  10336. ])
  10337. ]),
  10338. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10339. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10340. vue.withDirectives(vue.createElementVNode(
  10341. "input",
  10342. {
  10343. class: "form-input",
  10344. type: "password",
  10345. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10346. placeholder: "请再次输入新密码",
  10347. "placeholder-class": "placeholder"
  10348. },
  10349. null,
  10350. 512
  10351. /* NEED_PATCH */
  10352. ), [
  10353. [vue.vModelText, $data.confirmPassword]
  10354. ])
  10355. ])
  10356. ]),
  10357. vue.createElementVNode("view", { class: "btn-area" }, [
  10358. vue.createElementVNode("button", {
  10359. class: "submit-btn",
  10360. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10361. }, "确认修改")
  10362. ])
  10363. ]);
  10364. }
  10365. 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"]]);
  10366. const _sfc_main$c = {
  10367. data() {
  10368. return {
  10369. phone: "",
  10370. code: "",
  10371. countdown: 0,
  10372. timer: null
  10373. };
  10374. },
  10375. onUnload() {
  10376. if (this.timer) {
  10377. clearInterval(this.timer);
  10378. }
  10379. },
  10380. methods: {
  10381. navBack() {
  10382. uni.navigateBack({ delta: 1 });
  10383. },
  10384. // 发送验证码 @author steelwei
  10385. sendCode() {
  10386. if (!this.phone) {
  10387. uni.showToast({ title: "请输入手机号", icon: "none" });
  10388. return;
  10389. }
  10390. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10391. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10392. return;
  10393. }
  10394. uni.showToast({ title: "验证码已发送", icon: "success" });
  10395. this.countdown = 60;
  10396. this.timer = setInterval(() => {
  10397. this.countdown--;
  10398. if (this.countdown <= 0) {
  10399. clearInterval(this.timer);
  10400. }
  10401. }, 1e3);
  10402. },
  10403. // 提交修改 @author steelwei
  10404. async submitChange() {
  10405. if (!this.phone) {
  10406. uni.showToast({ title: "请输入手机号", icon: "none" });
  10407. return;
  10408. }
  10409. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10410. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10411. return;
  10412. }
  10413. if (!this.code) {
  10414. uni.showToast({ title: "请输入验证码", icon: "none" });
  10415. return;
  10416. }
  10417. uni.showLoading({ title: "提交中..." });
  10418. try {
  10419. const res = await updatePhone(this.phone, this.code);
  10420. if (res.code === 200) {
  10421. uni.showToast({
  10422. title: "修改成功",
  10423. icon: "success",
  10424. duration: 2e3
  10425. });
  10426. setTimeout(() => {
  10427. uni.navigateBack({ delta: 1 });
  10428. }, 2e3);
  10429. } else {
  10430. uni.showToast({
  10431. title: res.msg || "修改失败",
  10432. icon: "none"
  10433. });
  10434. }
  10435. } catch (error) {
  10436. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10437. uni.showToast({ title: "网络错误", icon: "none" });
  10438. } finally {
  10439. uni.hideLoading();
  10440. }
  10441. }
  10442. }
  10443. };
  10444. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10445. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10446. vue.createElementVNode("view", { class: "custom-header" }, [
  10447. vue.createElementVNode("view", {
  10448. class: "header-left",
  10449. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10450. }, [
  10451. vue.createElementVNode("image", {
  10452. class: "back-icon",
  10453. src: _imports_0,
  10454. style: { "transform": "rotate(180deg)" }
  10455. })
  10456. ]),
  10457. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10458. vue.createElementVNode("view", { class: "header-right" })
  10459. ]),
  10460. vue.createElementVNode("view", { class: "header-placeholder" }),
  10461. vue.createElementVNode("view", { class: "form-card" }, [
  10462. vue.createElementVNode("view", { class: "form-item" }, [
  10463. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10464. vue.withDirectives(vue.createElementVNode(
  10465. "input",
  10466. {
  10467. class: "form-input",
  10468. type: "number",
  10469. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10470. placeholder: "请输入新手机号",
  10471. "placeholder-class": "placeholder",
  10472. maxlength: "11"
  10473. },
  10474. null,
  10475. 512
  10476. /* NEED_PATCH */
  10477. ), [
  10478. [vue.vModelText, $data.phone]
  10479. ])
  10480. ]),
  10481. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10482. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10483. vue.withDirectives(vue.createElementVNode(
  10484. "input",
  10485. {
  10486. class: "form-input",
  10487. type: "number",
  10488. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10489. placeholder: "请输入验证码",
  10490. "placeholder-class": "placeholder",
  10491. maxlength: "6"
  10492. },
  10493. null,
  10494. 512
  10495. /* NEED_PATCH */
  10496. ), [
  10497. [vue.vModelText, $data.code]
  10498. ]),
  10499. vue.createElementVNode("button", {
  10500. class: "code-btn",
  10501. disabled: $data.countdown > 0,
  10502. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10503. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10504. ])
  10505. ]),
  10506. vue.createElementVNode("view", { class: "btn-area" }, [
  10507. vue.createElementVNode("button", {
  10508. class: "submit-btn",
  10509. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10510. }, "确认修改")
  10511. ]),
  10512. vue.createElementVNode("view", { class: "tips" }, [
  10513. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10514. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10515. ])
  10516. ]);
  10517. }
  10518. 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"]]);
  10519. const _sfc_main$b = {
  10520. data() {
  10521. return {};
  10522. },
  10523. methods: {
  10524. navBack() {
  10525. uni.navigateBack({
  10526. delta: 1
  10527. });
  10528. },
  10529. switchChange(type, e) {
  10530. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10531. }
  10532. }
  10533. };
  10534. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10535. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10536. vue.createElementVNode("view", { class: "custom-header" }, [
  10537. vue.createElementVNode("view", {
  10538. class: "header-left",
  10539. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10540. }, [
  10541. vue.createElementVNode("image", {
  10542. class: "back-icon",
  10543. src: _imports_0,
  10544. style: { "transform": "rotate(180deg)" }
  10545. })
  10546. ]),
  10547. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10548. vue.createElementVNode("view", { class: "header-right" })
  10549. ]),
  10550. vue.createElementVNode("view", { class: "header-placeholder" }),
  10551. vue.createElementVNode("view", { class: "group-card" }, [
  10552. vue.createElementVNode("view", { class: "list-item" }, [
  10553. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10554. vue.createElementVNode(
  10555. "switch",
  10556. {
  10557. checked: "",
  10558. color: "#FF5722",
  10559. style: { "transform": "scale(0.8)" },
  10560. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10561. },
  10562. null,
  10563. 32
  10564. /* NEED_HYDRATION */
  10565. )
  10566. ]),
  10567. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10568. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10569. vue.createElementVNode(
  10570. "switch",
  10571. {
  10572. checked: "",
  10573. color: "#FF5722",
  10574. style: { "transform": "scale(0.8)" },
  10575. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10576. },
  10577. null,
  10578. 32
  10579. /* NEED_HYDRATION */
  10580. )
  10581. ])
  10582. ]),
  10583. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10584. ]);
  10585. }
  10586. 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"]]);
  10587. const _sfc_main$a = {
  10588. data() {
  10589. return {};
  10590. },
  10591. methods: {
  10592. navBack() {
  10593. uni.navigateBack({
  10594. delta: 1
  10595. });
  10596. }
  10597. }
  10598. };
  10599. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  10600. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10601. vue.createElementVNode("view", { class: "custom-header" }, [
  10602. vue.createElementVNode("view", {
  10603. class: "header-left",
  10604. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10605. }, [
  10606. vue.createElementVNode("image", {
  10607. class: "back-icon",
  10608. src: _imports_0,
  10609. style: { "transform": "rotate(180deg)" }
  10610. })
  10611. ]),
  10612. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10613. vue.createElementVNode("view", { class: "header-right" })
  10614. ]),
  10615. vue.createElementVNode("view", { class: "header-placeholder" }),
  10616. vue.createElementVNode("view", { class: "logo-area" }, [
  10617. vue.createElementVNode("image", {
  10618. class: "app-logo",
  10619. src: _imports_1$8,
  10620. mode: "aspectFit"
  10621. }),
  10622. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10623. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10624. ]),
  10625. vue.createElementVNode("view", { class: "group-card" }, [
  10626. vue.createElementVNode("view", { class: "list-item" }, [
  10627. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10628. vue.createElementVNode("image", {
  10629. class: "arrow-icon",
  10630. src: _imports_3
  10631. })
  10632. ]),
  10633. vue.createElementVNode("view", { class: "list-item" }, [
  10634. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10635. vue.createElementVNode("image", {
  10636. class: "arrow-icon",
  10637. src: _imports_3
  10638. })
  10639. ]),
  10640. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10641. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10642. vue.createElementVNode("view", { class: "item-right" }, [
  10643. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10644. vue.createElementVNode("image", {
  10645. class: "arrow-icon",
  10646. src: _imports_3
  10647. })
  10648. ])
  10649. ])
  10650. ])
  10651. ]);
  10652. }
  10653. 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"]]);
  10654. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10655. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10656. const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
  10657. const _sfc_main$9 = {
  10658. data() {
  10659. return {
  10660. balance: "0.00",
  10661. pendingBalance: "0.00",
  10662. currentTab: 0,
  10663. list: [],
  10664. pageNum: 1,
  10665. pageSize: 10,
  10666. total: 0,
  10667. loading: false
  10668. };
  10669. },
  10670. computed: {
  10671. displayList() {
  10672. if (this.currentTab === 0)
  10673. return this.list;
  10674. if (this.currentTab === 1)
  10675. return this.list.filter((item) => item.type === "income");
  10676. if (this.currentTab === 2)
  10677. return this.list.filter((item) => item.type === "expense");
  10678. return [];
  10679. }
  10680. },
  10681. onShow() {
  10682. this.fetchData();
  10683. this.fetchList(true);
  10684. },
  10685. onReachBottom() {
  10686. this.fetchList();
  10687. },
  10688. methods: {
  10689. async fetchData() {
  10690. try {
  10691. const res = await getBalanceOnApp();
  10692. if (res.code === 200 && res.data) {
  10693. this.balance = (res.data.balance / 100).toFixed(2);
  10694. this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
  10695. }
  10696. } catch (error) {
  10697. formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
  10698. }
  10699. },
  10700. async fetchList(reset = false) {
  10701. if (reset) {
  10702. this.pageNum = 1;
  10703. this.list = [];
  10704. this.total = 0;
  10705. }
  10706. if (this.loading)
  10707. return;
  10708. if (!reset && this.list.length >= this.total && this.total !== 0)
  10709. return;
  10710. this.loading = true;
  10711. try {
  10712. const res = await pageBalanceOnApp({
  10713. pageNum: this.pageNum,
  10714. pageSize: this.pageSize
  10715. });
  10716. if (res.code === 200) {
  10717. this.total = res.total || 0;
  10718. const rows = res.rows || [];
  10719. const mappedRows = rows.map((item) => {
  10720. const isAdd = item.type === "add";
  10721. const uiType = isAdd ? "income" : "expense";
  10722. const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
  10723. let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
  10724. if (!isAdd) {
  10725. amountStr = "-" + amountStr;
  10726. }
  10727. return {
  10728. ...item,
  10729. title,
  10730. desc: item.reason || "",
  10731. time: item.createTime || "",
  10732. amount: amountStr,
  10733. type: uiType,
  10734. // 'income' or 'expense' for template class
  10735. tag: title
  10736. };
  10737. });
  10738. this.list = this.list.concat(mappedRows);
  10739. this.pageNum++;
  10740. }
  10741. } catch (error) {
  10742. formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
  10743. } finally {
  10744. this.loading = false;
  10745. }
  10746. },
  10747. navBack() {
  10748. uni.navigateBack();
  10749. },
  10750. navToBill() {
  10751. uni.navigateTo({
  10752. url: "/pages/mine/wallet/bill"
  10753. });
  10754. },
  10755. switchTab(index) {
  10756. this.currentTab = index;
  10757. }
  10758. }
  10759. };
  10760. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10761. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10762. vue.createElementVNode("view", { class: "nav-bar" }, [
  10763. vue.createElementVNode("view", {
  10764. class: "nav-left",
  10765. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10766. }, [
  10767. vue.createElementVNode("image", {
  10768. class: "back-icon",
  10769. src: _imports_0
  10770. })
  10771. ]),
  10772. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10773. vue.createElementVNode("view", { class: "nav-right" })
  10774. ]),
  10775. vue.createElementVNode("view", { class: "wallet-card" }, [
  10776. vue.createElementVNode("view", { class: "bg-circle big" }),
  10777. vue.createElementVNode("view", { class: "bg-circle small" }),
  10778. vue.createElementVNode("view", { class: "card-content" }, [
  10779. vue.createElementVNode("view", { class: "card-top" }, [
  10780. vue.createElementVNode("view", { class: "app-info" }, [
  10781. vue.createElementVNode("image", {
  10782. class: "app-logo",
  10783. src: _imports_1$2,
  10784. mode: "aspectFit"
  10785. }),
  10786. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10787. ]),
  10788. vue.createElementVNode("view", {
  10789. class: "bill-btn",
  10790. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10791. }, [
  10792. vue.createElementVNode("text", null, "账单")
  10793. ])
  10794. ]),
  10795. vue.createElementVNode("view", { class: "balance-container" }, [
  10796. vue.createElementVNode("view", { class: "balance-main" }, [
  10797. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10798. vue.createElementVNode(
  10799. "text",
  10800. { class: "balance-num" },
  10801. vue.toDisplayString($data.balance),
  10802. 1
  10803. /* TEXT */
  10804. )
  10805. ]),
  10806. vue.createElementVNode("view", { class: "balance-pending" }, [
  10807. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10808. vue.createElementVNode(
  10809. "text",
  10810. { class: "pending-num" },
  10811. vue.toDisplayString($data.pendingBalance),
  10812. 1
  10813. /* TEXT */
  10814. )
  10815. ])
  10816. ])
  10817. ])
  10818. ]),
  10819. vue.createElementVNode("view", { class: "record-container" }, [
  10820. vue.createElementVNode("view", { class: "record-header" }, [
  10821. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10822. vue.createElementVNode("view", {
  10823. class: "header-more",
  10824. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10825. }, [
  10826. vue.createElementVNode("text", null, "查看全部"),
  10827. vue.createElementVNode("image", {
  10828. class: "more-icon",
  10829. src: _imports_2$2
  10830. })
  10831. ])
  10832. ]),
  10833. vue.createElementVNode("view", { class: "tabs-row" }, [
  10834. vue.createElementVNode(
  10835. "view",
  10836. {
  10837. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10838. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10839. },
  10840. [
  10841. vue.createElementVNode("text", null, "全部"),
  10842. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10843. key: 0,
  10844. class: "tab-line"
  10845. })) : vue.createCommentVNode("v-if", true)
  10846. ],
  10847. 2
  10848. /* CLASS */
  10849. ),
  10850. vue.createElementVNode(
  10851. "view",
  10852. {
  10853. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10854. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10855. },
  10856. [
  10857. vue.createElementVNode("text", null, "收入"),
  10858. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10859. key: 0,
  10860. class: "tab-line"
  10861. })) : vue.createCommentVNode("v-if", true)
  10862. ],
  10863. 2
  10864. /* CLASS */
  10865. ),
  10866. vue.createElementVNode(
  10867. "view",
  10868. {
  10869. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10870. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  10871. },
  10872. [
  10873. vue.createElementVNode("text", null, "支出"),
  10874. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10875. key: 0,
  10876. class: "tab-line"
  10877. })) : vue.createCommentVNode("v-if", true)
  10878. ],
  10879. 2
  10880. /* CLASS */
  10881. )
  10882. ]),
  10883. vue.createElementVNode("view", { class: "record-list" }, [
  10884. (vue.openBlock(true), vue.createElementBlock(
  10885. vue.Fragment,
  10886. null,
  10887. vue.renderList($options.displayList, (item, index) => {
  10888. return vue.openBlock(), vue.createElementBlock("view", {
  10889. class: "list-item",
  10890. key: index
  10891. }, [
  10892. vue.createElementVNode("view", { class: "item-left" }, [
  10893. vue.createElementVNode(
  10894. "text",
  10895. { class: "item-title" },
  10896. vue.toDisplayString(item.title),
  10897. 1
  10898. /* TEXT */
  10899. ),
  10900. vue.createElementVNode(
  10901. "text",
  10902. { class: "item-desc" },
  10903. vue.toDisplayString(item.desc),
  10904. 1
  10905. /* TEXT */
  10906. ),
  10907. vue.createElementVNode(
  10908. "text",
  10909. { class: "item-time" },
  10910. vue.toDisplayString(item.time),
  10911. 1
  10912. /* TEXT */
  10913. )
  10914. ]),
  10915. vue.createElementVNode("view", { class: "item-right" }, [
  10916. vue.createElementVNode(
  10917. "text",
  10918. {
  10919. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10920. },
  10921. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10922. 3
  10923. /* TEXT, CLASS */
  10924. ),
  10925. vue.createElementVNode("view", { class: "item-tag" }, [
  10926. vue.createElementVNode(
  10927. "text",
  10928. null,
  10929. vue.toDisplayString(item.tag),
  10930. 1
  10931. /* TEXT */
  10932. )
  10933. ])
  10934. ])
  10935. ]);
  10936. }),
  10937. 128
  10938. /* KEYED_FRAGMENT */
  10939. ))
  10940. ])
  10941. ])
  10942. ]);
  10943. }
  10944. 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"]]);
  10945. const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
  10946. const _sfc_main$8 = {
  10947. data() {
  10948. const d = /* @__PURE__ */ new Date();
  10949. return {
  10950. currentTab: 0,
  10951. year: d.getFullYear(),
  10952. month: d.getMonth() + 1,
  10953. groups: []
  10954. };
  10955. },
  10956. computed: {
  10957. currentDate() {
  10958. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  10959. },
  10960. displayGroups() {
  10961. if (this.currentTab === 0)
  10962. return this.groups;
  10963. return this.groups.map((group) => {
  10964. const filteredItems = group.items.filter((item) => {
  10965. const type = this.currentTab === 1 ? "income" : "expense";
  10966. return item.type === type;
  10967. });
  10968. return {
  10969. ...group,
  10970. items: filteredItems
  10971. };
  10972. }).filter((group) => group.items.length > 0);
  10973. }
  10974. },
  10975. onShow() {
  10976. this.fetchData();
  10977. },
  10978. methods: {
  10979. async fetchData() {
  10980. try {
  10981. const res = await listBalanceOnApp({
  10982. year: this.year,
  10983. month: this.month
  10984. });
  10985. if (res.code === 200) {
  10986. const list = res.data || [];
  10987. let incomeTotal = 0;
  10988. let expenseTotal = 0;
  10989. const items = list.map((item) => {
  10990. const isAdd = item.type === "add";
  10991. const uiType = isAdd ? "income" : "expense";
  10992. const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
  10993. let amountVal = Math.abs(item.amount) / 100;
  10994. if (isAdd) {
  10995. incomeTotal += amountVal;
  10996. } else {
  10997. expenseTotal += amountVal;
  10998. }
  10999. let amountStr = amountVal.toFixed(2);
  11000. if (!isAdd)
  11001. amountStr = "-" + amountStr;
  11002. let timeStr = item.createTime || "";
  11003. if (timeStr.length >= 16) {
  11004. timeStr = timeStr.substring(5, 16);
  11005. }
  11006. return {
  11007. ...item,
  11008. title,
  11009. desc: item.reason || "",
  11010. time: timeStr,
  11011. amount: amountStr,
  11012. type: uiType,
  11013. tag: title
  11014. };
  11015. });
  11016. this.groups = [
  11017. {
  11018. month: `${this.month}月 ${this.year}`,
  11019. income: incomeTotal.toFixed(2),
  11020. expense: expenseTotal.toFixed(2),
  11021. items
  11022. }
  11023. ];
  11024. }
  11025. } catch (error) {
  11026. formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
  11027. }
  11028. },
  11029. onDateChange(e) {
  11030. const val = e.detail.value;
  11031. const [y, m] = val.split("-");
  11032. this.year = parseInt(y, 10);
  11033. this.month = parseInt(m, 10);
  11034. this.fetchData();
  11035. },
  11036. navBack() {
  11037. uni.navigateBack();
  11038. },
  11039. switchTab(index) {
  11040. this.currentTab = index;
  11041. }
  11042. }
  11043. };
  11044. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  11045. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11046. vue.createElementVNode("view", { class: "nav-bar" }, [
  11047. vue.createElementVNode("view", {
  11048. class: "nav-left",
  11049. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11050. }, [
  11051. vue.createElementVNode("image", {
  11052. class: "back-icon",
  11053. src: _imports_0
  11054. })
  11055. ]),
  11056. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  11057. vue.createElementVNode("view", { class: "nav-right" })
  11058. ]),
  11059. vue.createElementVNode("view", { class: "content-area" }, [
  11060. vue.createElementVNode("view", { class: "filter-area" }, [
  11061. vue.createElementVNode("view", { class: "tabs-row" }, [
  11062. vue.createElementVNode(
  11063. "view",
  11064. {
  11065. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11066. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11067. },
  11068. [
  11069. vue.createElementVNode("text", null, "全部"),
  11070. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11071. key: 0,
  11072. class: "tab-line"
  11073. })) : vue.createCommentVNode("v-if", true)
  11074. ],
  11075. 2
  11076. /* CLASS */
  11077. ),
  11078. vue.createElementVNode(
  11079. "view",
  11080. {
  11081. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11082. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11083. },
  11084. [
  11085. vue.createElementVNode("text", null, "收入"),
  11086. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11087. key: 0,
  11088. class: "tab-line"
  11089. })) : vue.createCommentVNode("v-if", true)
  11090. ],
  11091. 2
  11092. /* CLASS */
  11093. ),
  11094. vue.createElementVNode(
  11095. "view",
  11096. {
  11097. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11098. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11099. },
  11100. [
  11101. vue.createElementVNode("text", null, "支出"),
  11102. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11103. key: 0,
  11104. class: "tab-line"
  11105. })) : vue.createCommentVNode("v-if", true)
  11106. ],
  11107. 2
  11108. /* CLASS */
  11109. )
  11110. ]),
  11111. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  11112. vue.createElementVNode("picker", {
  11113. mode: "date",
  11114. fields: "month",
  11115. value: $options.currentDate,
  11116. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  11117. }, [
  11118. vue.createElementVNode("view", { class: "date-picker" }, [
  11119. vue.createElementVNode(
  11120. "text",
  11121. { class: "date-text" },
  11122. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  11123. 1
  11124. /* TEXT */
  11125. ),
  11126. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  11127. ])
  11128. ], 40, ["value"])
  11129. ])
  11130. ]),
  11131. vue.createElementVNode("scroll-view", {
  11132. "scroll-y": "",
  11133. class: "bill-list"
  11134. }, [
  11135. (vue.openBlock(true), vue.createElementBlock(
  11136. vue.Fragment,
  11137. null,
  11138. vue.renderList($options.displayGroups, (group, gIndex) => {
  11139. return vue.openBlock(), vue.createElementBlock("view", {
  11140. key: gIndex,
  11141. class: "month-group"
  11142. }, [
  11143. vue.createElementVNode("view", { class: "group-header" }, [
  11144. vue.createElementVNode(
  11145. "text",
  11146. { class: "month-title" },
  11147. vue.toDisplayString(group.month),
  11148. 1
  11149. /* TEXT */
  11150. ),
  11151. vue.createElementVNode(
  11152. "text",
  11153. { class: "month-summary" },
  11154. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  11155. 1
  11156. /* TEXT */
  11157. )
  11158. ]),
  11159. (vue.openBlock(true), vue.createElementBlock(
  11160. vue.Fragment,
  11161. null,
  11162. vue.renderList(group.items, (item, index) => {
  11163. return vue.openBlock(), vue.createElementBlock("view", {
  11164. class: "list-item",
  11165. key: index
  11166. }, [
  11167. vue.createElementVNode(
  11168. "view",
  11169. {
  11170. class: vue.normalizeClass(["item-icon-box", item.type])
  11171. },
  11172. [
  11173. vue.createElementVNode(
  11174. "text",
  11175. { class: "item-icon-symbol" },
  11176. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11177. 1
  11178. /* TEXT */
  11179. )
  11180. ],
  11181. 2
  11182. /* CLASS */
  11183. ),
  11184. vue.createElementVNode("view", { class: "item-center" }, [
  11185. vue.createElementVNode(
  11186. "text",
  11187. { class: "item-title" },
  11188. vue.toDisplayString(item.title),
  11189. 1
  11190. /* TEXT */
  11191. ),
  11192. vue.createElementVNode(
  11193. "text",
  11194. { class: "item-desc" },
  11195. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11196. 1
  11197. /* TEXT */
  11198. )
  11199. ]),
  11200. vue.createElementVNode("view", { class: "item-right" }, [
  11201. vue.createElementVNode(
  11202. "text",
  11203. {
  11204. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11205. },
  11206. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11207. 3
  11208. /* TEXT, CLASS */
  11209. ),
  11210. vue.createElementVNode("view", { class: "item-tag" }, [
  11211. vue.createElementVNode(
  11212. "text",
  11213. null,
  11214. vue.toDisplayString(item.tag),
  11215. 1
  11216. /* TEXT */
  11217. )
  11218. ])
  11219. ])
  11220. ]);
  11221. }),
  11222. 128
  11223. /* KEYED_FRAGMENT */
  11224. ))
  11225. ]);
  11226. }),
  11227. 128
  11228. /* KEYED_FRAGMENT */
  11229. )),
  11230. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11231. ])
  11232. ])
  11233. ]);
  11234. }
  11235. 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"]]);
  11236. const _sfc_main$7 = {
  11237. data() {
  11238. return {
  11239. currentIndex: 2,
  11240. // 默认选中 L3
  11241. levels: [
  11242. {
  11243. id: "L1",
  11244. name: "青铜履约者",
  11245. score: "需成长值 0",
  11246. isCurrent: false,
  11247. benefits: [
  11248. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" }
  11249. ]
  11250. },
  11251. {
  11252. id: "L2",
  11253. name: "白银履约者",
  11254. score: "需成长值 200",
  11255. isCurrent: false,
  11256. benefits: [
  11257. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" },
  11258. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单", icon: "" }
  11259. ]
  11260. },
  11261. {
  11262. id: "L3",
  11263. name: "黄金履约者",
  11264. score: "需成长值 500",
  11265. isCurrent: true,
  11266. benefits: [
  11267. { name: "极速提现", desc: "提现申请 2 小时内极速到账,无需等待。", icon: "" },
  11268. { name: "晋升奖励", desc: "晋升等级可获得现金红包奖励。", icon: "/static/icons/reward.svg" },
  11269. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单。", icon: "" }
  11270. ]
  11271. },
  11272. {
  11273. id: "L4",
  11274. name: "钻石履约者",
  11275. score: "需成长值 2000",
  11276. isCurrent: false,
  11277. benefits: [
  11278. { name: "专属客服", desc: "享受 7x24 小时专属客服通道。", icon: "/static/icons/service.svg" },
  11279. { name: "生日礼包", desc: "生日当天获赠专属礼包。", icon: "/static/icons/reward.svg" },
  11280. { name: "装备免费换", desc: "每年可免费更换一套履约装备。", icon: "" },
  11281. { name: "医疗互助", desc: "享受平台提供的医疗互助保障。", icon: "" }
  11282. ]
  11283. }
  11284. ],
  11285. isPopupShow: false,
  11286. currentBenefit: null
  11287. };
  11288. },
  11289. computed: {
  11290. currentLevel() {
  11291. return this.levels[this.currentIndex];
  11292. }
  11293. },
  11294. methods: {
  11295. navBack() {
  11296. uni.navigateBack({
  11297. delta: 1
  11298. });
  11299. },
  11300. swiperChange(e) {
  11301. this.currentIndex = e.detail.current;
  11302. },
  11303. changeLevel(index) {
  11304. this.currentIndex = index;
  11305. },
  11306. showBenefitDetail(benefit) {
  11307. this.currentBenefit = benefit;
  11308. this.isPopupShow = true;
  11309. },
  11310. closePopup() {
  11311. this.isPopupShow = false;
  11312. }
  11313. }
  11314. };
  11315. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  11316. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11317. vue.createElementVNode("view", { class: "custom-header" }, [
  11318. vue.createElementVNode("view", {
  11319. class: "header-left",
  11320. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11321. }, [
  11322. vue.createElementVNode("image", {
  11323. class: "back-icon",
  11324. src: _imports_0,
  11325. style: { "transform": "rotate(180deg)" }
  11326. })
  11327. ]),
  11328. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  11329. vue.createElementVNode("view", { class: "header-right" })
  11330. ]),
  11331. vue.createElementVNode("view", { class: "header-placeholder" }),
  11332. vue.createElementVNode("view", { class: "swiper-container" }, [
  11333. vue.createElementVNode("swiper", {
  11334. class: "level-swiper",
  11335. "previous-margin": "80rpx",
  11336. "next-margin": "80rpx",
  11337. current: $data.currentIndex,
  11338. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  11339. }, [
  11340. (vue.openBlock(true), vue.createElementBlock(
  11341. vue.Fragment,
  11342. null,
  11343. vue.renderList($data.levels, (level, index) => {
  11344. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  11345. key: index,
  11346. onClick: ($event) => $options.changeLevel(index)
  11347. }, [
  11348. vue.createElementVNode(
  11349. "view",
  11350. {
  11351. class: vue.normalizeClass(["level-card", "level-card-" + (index + 1)]),
  11352. style: vue.normalizeStyle({ transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)" })
  11353. },
  11354. [
  11355. vue.createElementVNode("view", { class: "card-content" }, [
  11356. vue.createElementVNode("view", { class: "card-header" }, [
  11357. vue.createElementVNode(
  11358. "view",
  11359. { class: "level-badge" },
  11360. vue.toDisplayString(level.id),
  11361. 1
  11362. /* TEXT */
  11363. ),
  11364. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  11365. key: 0,
  11366. class: "current-badge"
  11367. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  11368. ]),
  11369. vue.createElementVNode(
  11370. "text",
  11371. { class: "level-name" },
  11372. vue.toDisplayString(level.name),
  11373. 1
  11374. /* TEXT */
  11375. ),
  11376. vue.createElementVNode(
  11377. "text",
  11378. { class: "level-score" },
  11379. vue.toDisplayString(level.score),
  11380. 1
  11381. /* TEXT */
  11382. ),
  11383. vue.createElementVNode("image", {
  11384. class: "crown-overlay",
  11385. src: _imports_1$4,
  11386. mode: "aspectFit"
  11387. })
  11388. ])
  11389. ],
  11390. 6
  11391. /* CLASS, STYLE */
  11392. )
  11393. ], 8, ["onClick"]);
  11394. }),
  11395. 128
  11396. /* KEYED_FRAGMENT */
  11397. ))
  11398. ], 40, ["current"]),
  11399. vue.createElementVNode("view", { class: "swiper-dots" }, [
  11400. (vue.openBlock(true), vue.createElementBlock(
  11401. vue.Fragment,
  11402. null,
  11403. vue.renderList($data.levels, (item, index) => {
  11404. return vue.openBlock(), vue.createElementBlock(
  11405. "view",
  11406. {
  11407. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  11408. key: index
  11409. },
  11410. null,
  11411. 2
  11412. /* CLASS */
  11413. );
  11414. }),
  11415. 128
  11416. /* KEYED_FRAGMENT */
  11417. ))
  11418. ])
  11419. ]),
  11420. vue.createElementVNode("view", { class: "benefits-title-row" }, [
  11421. vue.createElementVNode(
  11422. "text",
  11423. { class: "benefits-title" },
  11424. vue.toDisplayString($options.currentLevel.id) + " 专属权益",
  11425. 1
  11426. /* TEXT */
  11427. ),
  11428. vue.createElementVNode(
  11429. "text",
  11430. { class: "benefits-count" },
  11431. "(" + vue.toDisplayString($options.currentLevel.benefits.length) + ")",
  11432. 1
  11433. /* TEXT */
  11434. )
  11435. ]),
  11436. vue.createElementVNode("view", { class: "benefits-grid" }, [
  11437. (vue.openBlock(true), vue.createElementBlock(
  11438. vue.Fragment,
  11439. null,
  11440. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11441. return vue.openBlock(), vue.createElementBlock("view", {
  11442. class: "benefit-item",
  11443. key: index,
  11444. onClick: ($event) => $options.showBenefitDetail(benefit)
  11445. }, [
  11446. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11447. benefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  11448. key: 0,
  11449. class: "benefit-icon",
  11450. src: benefit.icon,
  11451. mode: "aspectFit"
  11452. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11453. "view",
  11454. {
  11455. key: 1,
  11456. class: "benefit-icon-placeholder"
  11457. },
  11458. vue.toDisplayString(benefit.name[0]),
  11459. 1
  11460. /* TEXT */
  11461. ))
  11462. ]),
  11463. vue.createElementVNode(
  11464. "text",
  11465. { class: "benefit-name" },
  11466. vue.toDisplayString(benefit.name),
  11467. 1
  11468. /* TEXT */
  11469. )
  11470. ], 8, ["onClick"]);
  11471. }),
  11472. 128
  11473. /* KEYED_FRAGMENT */
  11474. ))
  11475. ]),
  11476. vue.createElementVNode(
  11477. "view",
  11478. {
  11479. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11480. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11481. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11482. }, ["stop", "prevent"]))
  11483. },
  11484. [
  11485. vue.createElementVNode("view", {
  11486. class: "popup-modal",
  11487. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11488. }, ["stop"]))
  11489. }, [
  11490. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11491. $data.currentBenefit && $data.currentBenefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  11492. key: 0,
  11493. class: "benefit-icon-large",
  11494. src: $data.currentBenefit.icon,
  11495. mode: "aspectFit"
  11496. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11497. "view",
  11498. {
  11499. key: 1,
  11500. class: "benefit-icon-placeholder-large"
  11501. },
  11502. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11503. 1
  11504. /* TEXT */
  11505. ))
  11506. ]),
  11507. vue.createElementVNode(
  11508. "text",
  11509. { class: "popup-title" },
  11510. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11511. 1
  11512. /* TEXT */
  11513. ),
  11514. vue.createElementVNode(
  11515. "text",
  11516. { class: "popup-desc" },
  11517. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.desc : ""),
  11518. 1
  11519. /* TEXT */
  11520. ),
  11521. vue.createElementVNode("button", {
  11522. class: "popup-btn",
  11523. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11524. }, "我知道了")
  11525. ])
  11526. ],
  11527. 34
  11528. /* CLASS, NEED_HYDRATION */
  11529. )
  11530. ]);
  11531. }
  11532. 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"]]);
  11533. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11534. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11535. const _sfc_main$6 = {
  11536. data() {
  11537. return {};
  11538. },
  11539. methods: {
  11540. navBack() {
  11541. uni.navigateBack();
  11542. },
  11543. navToOrderMsg() {
  11544. uni.navigateTo({
  11545. url: "/pages/mine/message/order"
  11546. });
  11547. },
  11548. navToSystemMsg() {
  11549. uni.navigateTo({
  11550. url: "/pages/mine/message/system"
  11551. });
  11552. }
  11553. }
  11554. };
  11555. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  11556. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11557. vue.createElementVNode("view", { class: "nav-bar" }, [
  11558. vue.createElementVNode("view", {
  11559. class: "nav-left",
  11560. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11561. }, [
  11562. vue.createElementVNode("image", {
  11563. class: "back-icon",
  11564. src: _imports_0,
  11565. style: { "transform": "rotate(180deg)" }
  11566. })
  11567. ]),
  11568. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11569. vue.createElementVNode("view", { class: "nav-right" }, [
  11570. vue.createElementVNode("view", { class: "more-dots" }, [
  11571. vue.createElementVNode("view", { class: "dot" }),
  11572. vue.createElementVNode("view", { class: "dot" }),
  11573. vue.createElementVNode("view", { class: "dot" })
  11574. ])
  11575. ])
  11576. ]),
  11577. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11578. vue.createElementVNode("view", { class: "message-list" }, [
  11579. vue.createElementVNode("view", {
  11580. class: "message-item",
  11581. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11582. }, [
  11583. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11584. vue.createElementVNode("image", {
  11585. class: "msg-icon",
  11586. src: _imports_1$1
  11587. }),
  11588. vue.createElementVNode("view", { class: "red-dot-badge" })
  11589. ]),
  11590. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11591. vue.createElementVNode("view", { class: "top-row" }, [
  11592. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11593. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11594. ]),
  11595. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11596. ])
  11597. ]),
  11598. vue.createElementVNode("view", {
  11599. class: "message-item",
  11600. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11601. }, [
  11602. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11603. vue.createElementVNode("image", {
  11604. class: "msg-icon",
  11605. src: _imports_2$1
  11606. })
  11607. ]),
  11608. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11609. vue.createElementVNode("view", { class: "top-row" }, [
  11610. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11611. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11612. ]),
  11613. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11614. ])
  11615. ])
  11616. ])
  11617. ]);
  11618. }
  11619. 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"]]);
  11620. const _sfc_main$5 = {
  11621. methods: {
  11622. navBack() {
  11623. uni.navigateBack();
  11624. }
  11625. }
  11626. };
  11627. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11628. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11629. vue.createElementVNode("view", { class: "nav-bar" }, [
  11630. vue.createElementVNode("view", {
  11631. class: "nav-left",
  11632. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11633. }, [
  11634. vue.createElementVNode("image", {
  11635. class: "back-icon",
  11636. src: _imports_0,
  11637. style: { "transform": "rotate(180deg)" }
  11638. })
  11639. ]),
  11640. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11641. vue.createElementVNode("view", { class: "nav-right" })
  11642. ]),
  11643. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11644. vue.createElementVNode("view", { class: "msg-group" }, [
  11645. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11646. vue.createElementVNode("view", { class: "msg-card" }, [
  11647. vue.createElementVNode("view", { class: "card-header" }, [
  11648. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11649. vue.createElementVNode("view", { class: "red-dot" })
  11650. ]),
  11651. vue.createElementVNode("view", { class: "card-body" }, [
  11652. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11653. ]),
  11654. vue.createElementVNode("view", { class: "card-footer" }, [
  11655. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11656. vue.createElementVNode("image", {
  11657. class: "arrow-icon",
  11658. src: _imports_3
  11659. })
  11660. ])
  11661. ]),
  11662. vue.createElementVNode("view", { class: "msg-card" }, [
  11663. vue.createElementVNode("view", { class: "card-header" }, [
  11664. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11665. ]),
  11666. vue.createElementVNode("view", { class: "card-body" }, [
  11667. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11668. ]),
  11669. vue.createElementVNode("view", { class: "card-footer" }, [
  11670. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11671. vue.createElementVNode("image", {
  11672. class: "arrow-icon",
  11673. src: _imports_3
  11674. })
  11675. ])
  11676. ])
  11677. ]),
  11678. vue.createElementVNode("view", { class: "msg-group" }, [
  11679. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11680. vue.createElementVNode("view", { class: "msg-card" }, [
  11681. vue.createElementVNode("view", { class: "card-header" }, [
  11682. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11683. ]),
  11684. vue.createElementVNode("view", { class: "card-body" }, [
  11685. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11686. ]),
  11687. vue.createElementVNode("view", { class: "card-footer" }, [
  11688. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11689. vue.createElementVNode("image", {
  11690. class: "arrow-icon",
  11691. src: _imports_3
  11692. })
  11693. ])
  11694. ])
  11695. ])
  11696. ]);
  11697. }
  11698. 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"]]);
  11699. const _sfc_main$4 = {
  11700. methods: {
  11701. navBack() {
  11702. uni.navigateBack();
  11703. },
  11704. navToDetail() {
  11705. uni.navigateTo({
  11706. url: "/pages/mine/message/detail"
  11707. });
  11708. }
  11709. }
  11710. };
  11711. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11712. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11713. vue.createElementVNode("view", { class: "nav-bar" }, [
  11714. vue.createElementVNode("view", {
  11715. class: "nav-left",
  11716. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11717. }, [
  11718. vue.createElementVNode("image", {
  11719. class: "back-icon",
  11720. src: _imports_0,
  11721. style: { "transform": "rotate(180deg)" }
  11722. })
  11723. ]),
  11724. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11725. vue.createElementVNode("view", { class: "nav-right" })
  11726. ]),
  11727. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11728. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11729. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11730. vue.createElementVNode("view", {
  11731. class: "sys-card",
  11732. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11733. }, [
  11734. vue.createElementVNode("view", { class: "sys-header" }, [
  11735. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11736. vue.createElementVNode("view", { class: "red-dot" })
  11737. ]),
  11738. vue.createElementVNode("view", { class: "sys-content" }, [
  11739. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11740. ]),
  11741. vue.createElementVNode("view", { class: "sys-footer" }, [
  11742. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11743. vue.createElementVNode("view", { class: "check-more" }, [
  11744. vue.createElementVNode("text", null, "查看详情"),
  11745. vue.createElementVNode("image", {
  11746. class: "arrow-icon-small",
  11747. src: _imports_3
  11748. })
  11749. ])
  11750. ])
  11751. ]),
  11752. vue.createElementVNode("view", { class: "sys-card" }, [
  11753. vue.createElementVNode("view", { class: "sys-header" }, [
  11754. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11755. ]),
  11756. vue.createElementVNode("view", { class: "sys-content" }, [
  11757. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11758. ]),
  11759. vue.createElementVNode("view", { class: "sys-footer" }, [
  11760. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11761. vue.createElementVNode("view", { class: "check-more" }, [
  11762. vue.createElementVNode("text", null, "查看详情"),
  11763. vue.createElementVNode("image", {
  11764. class: "arrow-icon-small",
  11765. src: _imports_3
  11766. })
  11767. ])
  11768. ])
  11769. ]),
  11770. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11771. vue.createElementVNode("view", { class: "sys-card" }, [
  11772. vue.createElementVNode("view", { class: "sys-header" }, [
  11773. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11774. ]),
  11775. vue.createElementVNode("view", { class: "sys-content" }, [
  11776. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11777. ]),
  11778. vue.createElementVNode("view", { class: "sys-footer" }, [
  11779. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11780. vue.createElementVNode("view", { class: "check-more" }, [
  11781. vue.createElementVNode("text", null, "查看详情"),
  11782. vue.createElementVNode("image", {
  11783. class: "arrow-icon-small",
  11784. src: _imports_3
  11785. })
  11786. ])
  11787. ])
  11788. ])
  11789. ])
  11790. ]);
  11791. }
  11792. 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"]]);
  11793. const _sfc_main$3 = {
  11794. methods: {
  11795. navBack() {
  11796. uni.navigateBack();
  11797. }
  11798. }
  11799. };
  11800. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11801. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11802. vue.createElementVNode("view", { class: "nav-bar" }, [
  11803. vue.createElementVNode("view", {
  11804. class: "nav-left",
  11805. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11806. }, [
  11807. vue.createElementVNode("image", {
  11808. class: "back-icon",
  11809. src: _imports_0,
  11810. style: { "transform": "rotate(180deg)" }
  11811. })
  11812. ]),
  11813. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11814. vue.createElementVNode("view", { class: "nav-right" })
  11815. ]),
  11816. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11817. vue.createElementVNode("view", { class: "detail-content" }, [
  11818. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11819. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11820. vue.createElementVNode("view", { class: "detail-body" }, [
  11821. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11822. ]),
  11823. vue.createElementVNode("view", { class: "detail-footer" }, [
  11824. vue.createElementVNode("view", { class: "divider" }),
  11825. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11826. ])
  11827. ])
  11828. ]);
  11829. }
  11830. 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"]]);
  11831. const _imports_1 = "/static/icons/diamond_white.svg";
  11832. const _imports_2 = "/static/icons/star_decor.svg";
  11833. const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
  11834. const _sfc_main$2 = {
  11835. data() {
  11836. return {
  11837. points: 0,
  11838. currentTab: 0,
  11839. list: [],
  11840. pageNum: 1,
  11841. pageSize: 10,
  11842. total: 0,
  11843. loading: false
  11844. };
  11845. },
  11846. computed: {
  11847. displayList() {
  11848. if (this.currentTab === 0)
  11849. return this.list;
  11850. const type = this.currentTab === 1 ? "income" : "expense";
  11851. return this.list.filter((item) => item.type === type);
  11852. }
  11853. },
  11854. onShow() {
  11855. this.fetchPoints();
  11856. this.fetchList(true);
  11857. },
  11858. onReachBottom() {
  11859. this.fetchList();
  11860. },
  11861. methods: {
  11862. async fetchPoints() {
  11863. try {
  11864. const res = await pointsOnApp();
  11865. if (res.code === 200) {
  11866. this.points = res.data || 0;
  11867. }
  11868. } catch (error) {
  11869. formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
  11870. }
  11871. },
  11872. async fetchList(reset = false) {
  11873. if (reset) {
  11874. this.pageNum = 1;
  11875. this.list = [];
  11876. this.total = 0;
  11877. }
  11878. if (this.loading)
  11879. return;
  11880. if (!reset && this.list.length >= this.total && this.total !== 0)
  11881. return;
  11882. this.loading = true;
  11883. try {
  11884. const res = await pagePointsOnApp({
  11885. pageNum: this.pageNum,
  11886. pageSize: this.pageSize
  11887. });
  11888. if (res.code === 200) {
  11889. this.total = res.total || 0;
  11890. const rows = res.rows || [];
  11891. const mappedRows = rows.map((item) => {
  11892. const isAdd = item.type === "add";
  11893. const uiType = isAdd ? "income" : "expense";
  11894. const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
  11895. let amountStr = Math.abs(item.amount);
  11896. if (!isAdd) {
  11897. amountStr = "-" + amountStr;
  11898. }
  11899. return {
  11900. ...item,
  11901. title,
  11902. desc: item.reason || "",
  11903. time: item.createTime || "",
  11904. amount: amountStr,
  11905. type: uiType,
  11906. tag: title
  11907. };
  11908. });
  11909. this.list = this.list.concat(mappedRows);
  11910. this.pageNum++;
  11911. }
  11912. } catch (error) {
  11913. formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
  11914. } finally {
  11915. this.loading = false;
  11916. }
  11917. },
  11918. navBack() {
  11919. uni.navigateBack();
  11920. },
  11921. navToDetail() {
  11922. uni.navigateTo({
  11923. url: "/pages/mine/points/detail"
  11924. });
  11925. },
  11926. navToEquity() {
  11927. },
  11928. switchTab(index) {
  11929. this.currentTab = index;
  11930. }
  11931. }
  11932. };
  11933. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  11934. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11935. vue.createElementVNode("view", { class: "nav-bar" }, [
  11936. vue.createElementVNode("view", {
  11937. class: "nav-left",
  11938. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11939. }, [
  11940. vue.createElementVNode("image", {
  11941. class: "back-icon",
  11942. src: _imports_0
  11943. })
  11944. ]),
  11945. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  11946. vue.createElementVNode("view", { class: "nav-right" })
  11947. ]),
  11948. vue.createElementVNode("view", { class: "points-card" }, [
  11949. vue.createElementVNode("view", { class: "card-header" }, [
  11950. vue.createElementVNode("view", {
  11951. class: "equity-btn",
  11952. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  11953. }, [
  11954. vue.createElementVNode("image", {
  11955. class: "equity-icon",
  11956. src: _imports_1
  11957. }),
  11958. vue.createElementVNode("text", null, "积分权益")
  11959. ]),
  11960. vue.createElementVNode("view", {
  11961. class: "detail-link",
  11962. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11963. }, [
  11964. vue.createElementVNode("text", null, "明细")
  11965. ])
  11966. ]),
  11967. vue.createElementVNode("view", { class: "card-body" }, [
  11968. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  11969. vue.createElementVNode(
  11970. "text",
  11971. { class: "value" },
  11972. vue.toDisplayString($data.points),
  11973. 1
  11974. /* TEXT */
  11975. )
  11976. ]),
  11977. vue.createElementVNode("image", {
  11978. class: "bg-decor",
  11979. src: _imports_2,
  11980. mode: "aspectFit"
  11981. })
  11982. ]),
  11983. vue.createElementVNode("view", { class: "record-container" }, [
  11984. vue.createElementVNode("view", { class: "record-header" }, [
  11985. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  11986. vue.createElementVNode("view", {
  11987. class: "header-more",
  11988. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11989. }, [
  11990. vue.createElementVNode("text", null, "查看全部"),
  11991. vue.createElementVNode("image", {
  11992. class: "more-icon",
  11993. src: _imports_3
  11994. })
  11995. ])
  11996. ]),
  11997. vue.createElementVNode("view", { class: "tabs-row" }, [
  11998. vue.createElementVNode(
  11999. "view",
  12000. {
  12001. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12002. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  12003. },
  12004. [
  12005. vue.createElementVNode("text", null, "全部"),
  12006. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12007. key: 0,
  12008. class: "tab-line"
  12009. })) : vue.createCommentVNode("v-if", true)
  12010. ],
  12011. 2
  12012. /* CLASS */
  12013. ),
  12014. vue.createElementVNode(
  12015. "view",
  12016. {
  12017. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12018. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  12019. },
  12020. [
  12021. vue.createElementVNode("text", null, "获取"),
  12022. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12023. key: 0,
  12024. class: "tab-line"
  12025. })) : vue.createCommentVNode("v-if", true)
  12026. ],
  12027. 2
  12028. /* CLASS */
  12029. ),
  12030. vue.createElementVNode(
  12031. "view",
  12032. {
  12033. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12034. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  12035. },
  12036. [
  12037. vue.createElementVNode("text", null, "扣减"),
  12038. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12039. key: 0,
  12040. class: "tab-line"
  12041. })) : vue.createCommentVNode("v-if", true)
  12042. ],
  12043. 2
  12044. /* CLASS */
  12045. )
  12046. ]),
  12047. vue.createElementVNode("view", { class: "record-list" }, [
  12048. (vue.openBlock(true), vue.createElementBlock(
  12049. vue.Fragment,
  12050. null,
  12051. vue.renderList($options.displayList, (item, index) => {
  12052. return vue.openBlock(), vue.createElementBlock("view", {
  12053. class: "list-item",
  12054. key: index
  12055. }, [
  12056. vue.createElementVNode("view", { class: "item-left" }, [
  12057. vue.createElementVNode(
  12058. "text",
  12059. { class: "item-title" },
  12060. vue.toDisplayString(item.title),
  12061. 1
  12062. /* TEXT */
  12063. ),
  12064. vue.createElementVNode(
  12065. "text",
  12066. { class: "item-desc" },
  12067. vue.toDisplayString(item.desc),
  12068. 1
  12069. /* TEXT */
  12070. ),
  12071. vue.createElementVNode(
  12072. "text",
  12073. { class: "item-time" },
  12074. vue.toDisplayString(item.time),
  12075. 1
  12076. /* TEXT */
  12077. )
  12078. ]),
  12079. vue.createElementVNode("view", { class: "item-right" }, [
  12080. vue.createElementVNode(
  12081. "text",
  12082. {
  12083. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12084. },
  12085. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12086. 3
  12087. /* TEXT, CLASS */
  12088. ),
  12089. vue.createElementVNode("view", { class: "item-tag" }, [
  12090. vue.createElementVNode(
  12091. "text",
  12092. null,
  12093. vue.toDisplayString(item.tag),
  12094. 1
  12095. /* TEXT */
  12096. )
  12097. ])
  12098. ])
  12099. ]);
  12100. }),
  12101. 128
  12102. /* KEYED_FRAGMENT */
  12103. ))
  12104. ])
  12105. ])
  12106. ]);
  12107. }
  12108. 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"]]);
  12109. const bizTypeMap = fulfillerEnum.FlfPointsBizType;
  12110. const _sfc_main$1 = {
  12111. data() {
  12112. const d = /* @__PURE__ */ new Date();
  12113. return {
  12114. currentTab: 0,
  12115. year: d.getFullYear(),
  12116. month: d.getMonth() + 1,
  12117. groups: []
  12118. };
  12119. },
  12120. computed: {
  12121. currentDate() {
  12122. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  12123. },
  12124. displayGroups() {
  12125. if (this.currentTab === 0)
  12126. return this.groups;
  12127. return this.groups.map((group) => {
  12128. const filteredItems = group.items.filter((item) => {
  12129. const type = this.currentTab === 1 ? "income" : "expense";
  12130. return item.type === type;
  12131. });
  12132. return {
  12133. ...group,
  12134. items: filteredItems
  12135. };
  12136. }).filter((group) => group.items.length > 0);
  12137. }
  12138. },
  12139. onShow() {
  12140. this.fetchData();
  12141. },
  12142. methods: {
  12143. async fetchData() {
  12144. try {
  12145. const res = await listPointsOnApp({
  12146. year: this.year,
  12147. month: this.month
  12148. });
  12149. if (res.code === 200) {
  12150. const list = res.data || [];
  12151. let incomeTotal = 0;
  12152. let expenseTotal = 0;
  12153. const items = list.map((item) => {
  12154. const isAdd = item.type === "add";
  12155. const uiType = isAdd ? "income" : "expense";
  12156. const title = bizTypeMap[item.bizType] || item.bizType || "其他";
  12157. let amountVal = Math.abs(item.amount);
  12158. if (isAdd) {
  12159. incomeTotal += amountVal;
  12160. } else {
  12161. expenseTotal += amountVal;
  12162. }
  12163. let amountStr = String(amountVal);
  12164. if (!isAdd)
  12165. amountStr = "-" + amountStr;
  12166. let timeStr = item.createTime || "";
  12167. if (timeStr.length >= 16) {
  12168. timeStr = timeStr.substring(5, 16);
  12169. }
  12170. return {
  12171. ...item,
  12172. title,
  12173. desc: item.reason || "",
  12174. time: timeStr,
  12175. amount: amountStr,
  12176. type: uiType,
  12177. tag: title
  12178. };
  12179. });
  12180. this.groups = [
  12181. {
  12182. month: `${this.month}月 ${this.year}`,
  12183. income: String(incomeTotal),
  12184. expense: String(expenseTotal),
  12185. items
  12186. }
  12187. ];
  12188. }
  12189. } catch (error) {
  12190. formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
  12191. }
  12192. },
  12193. onDateChange(e) {
  12194. const val = e.detail.value;
  12195. const [y, m] = val.split("-");
  12196. this.year = parseInt(y, 10);
  12197. this.month = parseInt(m, 10);
  12198. this.fetchData();
  12199. },
  12200. navBack() {
  12201. uni.navigateBack();
  12202. },
  12203. switchTab(index) {
  12204. this.currentTab = index;
  12205. }
  12206. }
  12207. };
  12208. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  12209. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12210. vue.createElementVNode("view", { class: "nav-bar" }, [
  12211. vue.createElementVNode("view", {
  12212. class: "nav-left",
  12213. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12214. }, [
  12215. vue.createElementVNode("image", {
  12216. class: "back-icon",
  12217. src: _imports_0
  12218. })
  12219. ]),
  12220. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  12221. vue.createElementVNode("view", { class: "nav-right" })
  12222. ]),
  12223. vue.createElementVNode("view", { class: "content-area" }, [
  12224. vue.createElementVNode("view", { class: "filter-area" }, [
  12225. vue.createElementVNode("view", { class: "tabs-row" }, [
  12226. vue.createElementVNode(
  12227. "view",
  12228. {
  12229. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12230. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  12231. },
  12232. [
  12233. vue.createElementVNode("text", null, "全部"),
  12234. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12235. key: 0,
  12236. class: "tab-line"
  12237. })) : vue.createCommentVNode("v-if", true)
  12238. ],
  12239. 2
  12240. /* CLASS */
  12241. ),
  12242. vue.createElementVNode(
  12243. "view",
  12244. {
  12245. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12246. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  12247. },
  12248. [
  12249. vue.createElementVNode("text", null, "获取"),
  12250. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12251. key: 0,
  12252. class: "tab-line"
  12253. })) : vue.createCommentVNode("v-if", true)
  12254. ],
  12255. 2
  12256. /* CLASS */
  12257. ),
  12258. vue.createElementVNode(
  12259. "view",
  12260. {
  12261. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12262. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  12263. },
  12264. [
  12265. vue.createElementVNode("text", null, "扣减"),
  12266. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12267. key: 0,
  12268. class: "tab-line"
  12269. })) : vue.createCommentVNode("v-if", true)
  12270. ],
  12271. 2
  12272. /* CLASS */
  12273. )
  12274. ]),
  12275. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  12276. vue.createElementVNode("picker", {
  12277. mode: "date",
  12278. fields: "month",
  12279. value: $options.currentDate,
  12280. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  12281. }, [
  12282. vue.createElementVNode("view", { class: "date-picker" }, [
  12283. vue.createElementVNode(
  12284. "text",
  12285. { class: "date-text" },
  12286. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  12287. 1
  12288. /* TEXT */
  12289. ),
  12290. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  12291. ])
  12292. ], 40, ["value"])
  12293. ])
  12294. ]),
  12295. vue.createElementVNode("scroll-view", {
  12296. "scroll-y": "",
  12297. class: "bill-list"
  12298. }, [
  12299. (vue.openBlock(true), vue.createElementBlock(
  12300. vue.Fragment,
  12301. null,
  12302. vue.renderList($options.displayGroups, (group, gIndex) => {
  12303. return vue.openBlock(), vue.createElementBlock("view", {
  12304. key: gIndex,
  12305. class: "month-group"
  12306. }, [
  12307. vue.createElementVNode("view", { class: "group-header" }, [
  12308. vue.createElementVNode(
  12309. "text",
  12310. { class: "month-title" },
  12311. vue.toDisplayString(group.month),
  12312. 1
  12313. /* TEXT */
  12314. ),
  12315. vue.createElementVNode(
  12316. "text",
  12317. { class: "month-summary" },
  12318. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  12319. 1
  12320. /* TEXT */
  12321. )
  12322. ]),
  12323. (vue.openBlock(true), vue.createElementBlock(
  12324. vue.Fragment,
  12325. null,
  12326. vue.renderList(group.items, (item, index) => {
  12327. return vue.openBlock(), vue.createElementBlock("view", {
  12328. class: "list-item",
  12329. key: index
  12330. }, [
  12331. vue.createElementVNode(
  12332. "view",
  12333. {
  12334. class: vue.normalizeClass(["item-icon-box", item.type])
  12335. },
  12336. [
  12337. vue.createElementVNode(
  12338. "text",
  12339. { class: "item-icon-symbol" },
  12340. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  12341. 1
  12342. /* TEXT */
  12343. )
  12344. ],
  12345. 2
  12346. /* CLASS */
  12347. ),
  12348. vue.createElementVNode("view", { class: "item-center" }, [
  12349. vue.createElementVNode(
  12350. "text",
  12351. { class: "item-title" },
  12352. vue.toDisplayString(item.title),
  12353. 1
  12354. /* TEXT */
  12355. ),
  12356. vue.createElementVNode(
  12357. "text",
  12358. { class: "item-desc" },
  12359. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  12360. 1
  12361. /* TEXT */
  12362. )
  12363. ]),
  12364. vue.createElementVNode("view", { class: "item-right" }, [
  12365. vue.createElementVNode(
  12366. "text",
  12367. {
  12368. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12369. },
  12370. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12371. 3
  12372. /* TEXT, CLASS */
  12373. ),
  12374. vue.createElementVNode("view", { class: "item-tag" }, [
  12375. vue.createElementVNode(
  12376. "text",
  12377. null,
  12378. vue.toDisplayString(item.tag),
  12379. 1
  12380. /* TEXT */
  12381. )
  12382. ])
  12383. ])
  12384. ]);
  12385. }),
  12386. 128
  12387. /* KEYED_FRAGMENT */
  12388. ))
  12389. ]);
  12390. }),
  12391. 128
  12392. /* KEYED_FRAGMENT */
  12393. )),
  12394. vue.createElementVNode("view", { class: "list-padding-bottom" })
  12395. ])
  12396. ])
  12397. ]);
  12398. }
  12399. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  12400. __definePage("pages/login/login", PagesLoginLogin);
  12401. __definePage("pages/recruit/landing", PagesRecruitLanding);
  12402. __definePage("pages/recruit/form", PagesRecruitForm);
  12403. __definePage("pages/recruit/auth", PagesRecruitAuth);
  12404. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  12405. __definePage("pages/recruit/success", PagesRecruitSuccess);
  12406. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  12407. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  12408. __definePage("pages/home/index", PagesHomeIndex);
  12409. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  12410. __definePage("pages/orders/index", PagesOrdersIndex);
  12411. __definePage("pages/orders/detail", PagesOrdersDetail);
  12412. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  12413. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  12414. __definePage("pages/mine/rewards", PagesMineRewards);
  12415. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  12416. __definePage("pages/mine/index", PagesMineIndex);
  12417. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  12418. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  12419. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  12420. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  12421. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  12422. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  12423. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  12424. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  12425. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  12426. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  12427. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  12428. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  12429. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  12430. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  12431. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  12432. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  12433. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  12434. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  12435. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  12436. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  12437. const _sfc_main = {
  12438. onLaunch: function() {
  12439. formatAppLog("log", "at App.vue:6", "App Launch");
  12440. if (isLoggedIn()) {
  12441. uni.switchTab({
  12442. url: "/pages/home/index"
  12443. });
  12444. }
  12445. },
  12446. onShow: function() {
  12447. formatAppLog("log", "at App.vue:15", "App Show");
  12448. },
  12449. onHide: function() {
  12450. formatAppLog("log", "at App.vue:18", "App Hide");
  12451. }
  12452. };
  12453. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  12454. function createApp() {
  12455. const app = vue.createVueApp(App);
  12456. return {
  12457. app
  12458. };
  12459. }
  12460. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  12461. uni.Vuex = __Vuex__;
  12462. uni.Pinia = __Pinia__;
  12463. __app__.provide("__globalStyles", __uniConfig.styles);
  12464. __app__._component.mpType = "app";
  12465. __app__._component.render = () => {
  12466. };
  12467. __app__.mount("#app");
  12468. })(Vue);