app-service.js 505 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal();
  15. ArrayBuffer = global.ArrayBuffer;
  16. Int8Array = global.Int8Array;
  17. Uint8Array = global.Uint8Array;
  18. Uint8ClampedArray = global.Uint8ClampedArray;
  19. Int16Array = global.Int16Array;
  20. Uint16Array = global.Uint16Array;
  21. Int32Array = global.Int32Array;
  22. Uint32Array = global.Uint32Array;
  23. Float32Array = global.Float32Array;
  24. Float64Array = global.Float64Array;
  25. BigInt64Array = global.BigInt64Array;
  26. BigUint64Array = global.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. function formatAppLog(type, filename, ...args) {
  35. if (uni.__log__) {
  36. uni.__log__(type, filename, ...args);
  37. } else {
  38. console[type].apply(console, [...args, filename]);
  39. }
  40. }
  41. const BASE_URL = "http://192.168.1.118:8080";
  42. const CLIENT_ID = "fe63fea7be31b0200b496d08bc6b517d";
  43. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  44. function uploadGps(data) {
  45. return request({
  46. url: "/fulfiller/fulfiller/gps",
  47. method: "POST",
  48. data
  49. });
  50. }
  51. function getMyProfile() {
  52. return request({
  53. url: "/fulfiller/fulfiller/my",
  54. method: "GET"
  55. });
  56. }
  57. function updateAvatar(avatar) {
  58. return request({
  59. url: "/fulfiller/fulfiller/my/avatar",
  60. method: "PUT",
  61. data: { avatar }
  62. });
  63. }
  64. function updateName(name) {
  65. return request({
  66. url: "/fulfiller/fulfiller/my/name",
  67. method: "PUT",
  68. data: { name }
  69. });
  70. }
  71. function updateStatus(status) {
  72. return request({
  73. url: "/fulfiller/fulfiller/my/status",
  74. method: "PUT",
  75. data: { status }
  76. });
  77. }
  78. function updateCity(data) {
  79. return request({
  80. url: "/fulfiller/fulfiller/my/city",
  81. method: "PUT",
  82. data
  83. });
  84. }
  85. function getAuthInfo() {
  86. return request({
  87. url: "/fulfiller/fulfiller/my/auth",
  88. method: "GET"
  89. });
  90. }
  91. function updatePhone(phone, code) {
  92. return request({
  93. url: "/fulfiller/fulfiller/my/phone",
  94. method: "PUT",
  95. data: { phone, code }
  96. });
  97. }
  98. function updatePassword(oldPassword, newPassword) {
  99. return request({
  100. url: "/fulfiller/fulfiller/my/password",
  101. method: "PUT",
  102. data: { oldPassword, newPassword }
  103. });
  104. }
  105. function deleteAccount() {
  106. return request({
  107. url: "/fulfiller/fulfiller/my/account",
  108. method: "DELETE"
  109. });
  110. }
  111. function updateAuthInfo(data) {
  112. return request({
  113. url: "/fulfiller/fulfiller/my/auth",
  114. method: "POST",
  115. data
  116. });
  117. }
  118. let gpsTimer = null;
  119. function reportGps(manual = false) {
  120. return new Promise((resolve, reject) => {
  121. uni.getLocation({
  122. type: "wgs84",
  123. success: function(res) {
  124. const data = {
  125. longitude: res.longitude,
  126. latitude: res.latitude
  127. };
  128. uploadGps(data).then(() => {
  129. formatAppLog("log", "at utils/gps.js:21", "GPS定位上传成功", data);
  130. resolve(res);
  131. }).catch((err) => {
  132. formatAppLog("error", "at utils/gps.js:24", "GPS定位上传失败", err);
  133. reject(err);
  134. });
  135. },
  136. fail: function(err) {
  137. formatAppLog("error", "at utils/gps.js:29", "获取GPS定位失败", err);
  138. if (manual) {
  139. checkAndRequestPermission(reject);
  140. } else {
  141. reject(err);
  142. }
  143. }
  144. });
  145. });
  146. }
  147. function checkAndRequestPermission(reject) {
  148. uni.getSetting({
  149. success(res) {
  150. if (!res.authSetting["scope.userLocation"]) {
  151. uni.showModal({
  152. title: "定位未授权",
  153. content: "请开启定位权限,以便为您推荐附近的订单并记录服务轨迹",
  154. confirmText: "去设置",
  155. success: (modalRes) => {
  156. if (modalRes.confirm) {
  157. uni.openSetting({
  158. success: (settingRes) => {
  159. if (settingRes.authSetting["scope.userLocation"]) {
  160. reportGps(true);
  161. }
  162. }
  163. });
  164. } else {
  165. if (reject)
  166. reject(new Error("User denied location permission"));
  167. }
  168. }
  169. });
  170. } else {
  171. uni.showToast({ title: "获取定位失败,请检查手机GPS是否开启", icon: "none" });
  172. if (reject)
  173. reject(new Error("Location failed even with permission"));
  174. }
  175. }
  176. });
  177. }
  178. function startGpsTimer() {
  179. const isEnabled = uni.getStorageSync("GPS_REPORT_ENABLED");
  180. if (isEnabled === false) {
  181. stopGpsTimer();
  182. return;
  183. }
  184. stopGpsTimer();
  185. reportGps();
  186. gpsTimer = setInterval(() => {
  187. reportGps();
  188. }, 12e5);
  189. }
  190. function stopGpsTimer() {
  191. if (gpsTimer) {
  192. clearInterval(gpsTimer);
  193. gpsTimer = null;
  194. }
  195. }
  196. const TOKEN_KEY = "fulfiller_token";
  197. const USER_INFO_KEY = "fulfiller_user_info";
  198. function getToken() {
  199. return uni.getStorageSync(TOKEN_KEY) || "";
  200. }
  201. function setToken(token) {
  202. uni.setStorageSync(TOKEN_KEY, token);
  203. }
  204. function removeToken() {
  205. uni.removeStorageSync(TOKEN_KEY);
  206. }
  207. function isLoggedIn() {
  208. return !!getToken();
  209. }
  210. function removeUserInfo() {
  211. uni.removeStorageSync(USER_INFO_KEY);
  212. }
  213. function clearAuth() {
  214. removeToken();
  215. removeUserInfo();
  216. stopGpsTimer();
  217. }
  218. function request(options = {}) {
  219. const {
  220. url,
  221. method = "GET",
  222. data,
  223. header = {},
  224. needToken = true
  225. } = options;
  226. const headers = {
  227. "Content-Type": "application/json;charset=utf-8",
  228. "clientid": CLIENT_ID,
  229. "X-Platform-Code": PLATFORM_CODE,
  230. ...header
  231. };
  232. if (needToken) {
  233. const token = getToken();
  234. if (token) {
  235. headers["Authorization"] = "Bearer " + token;
  236. }
  237. }
  238. return new Promise((resolve, reject) => {
  239. uni.request({
  240. url: BASE_URL + url,
  241. method: method.toUpperCase(),
  242. data,
  243. header: headers,
  244. timeout: 6e5,
  245. success: (res) => {
  246. formatAppLog("log", "at utils/request.js:51", res);
  247. const statusCode = res.statusCode;
  248. const code = res.data.code;
  249. const msg = res.data.msg;
  250. res.data.data;
  251. if (statusCode !== 200) {
  252. const errorMsg = msg || `请求失败(${statusCode})`;
  253. uni.showToast({ title: errorMsg, icon: "none" });
  254. return reject(new Error(errorMsg));
  255. }
  256. if (code === 401) {
  257. clearAuth();
  258. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  259. setTimeout(() => {
  260. uni.reLaunch({ url: "/pages/login/login" });
  261. }, 1500);
  262. return reject(new Error("未授权"));
  263. }
  264. if (code !== void 0 && code !== 200) {
  265. const errorMsg = msg || "操作失败";
  266. uni.showToast({ title: errorMsg, icon: "none" });
  267. return reject(new Error(errorMsg));
  268. }
  269. resolve(res.data);
  270. },
  271. fail: (err) => {
  272. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  273. reject(err);
  274. }
  275. });
  276. });
  277. }
  278. function loginByPassword(username, password) {
  279. return request({
  280. url: "/auth/login",
  281. method: "POST",
  282. needToken: false,
  283. data: {
  284. userSource: 1,
  285. username,
  286. password,
  287. clientId: CLIENT_ID,
  288. grantType: "password",
  289. source: 1
  290. }
  291. });
  292. }
  293. function logout() {
  294. return request({
  295. url: "/auth/logout",
  296. method: "POST"
  297. });
  298. }
  299. function getAgreement(id) {
  300. return request({
  301. url: "/system/agreement/" + id,
  302. method: "get"
  303. });
  304. }
  305. const logic$9 = {
  306. data() {
  307. return {
  308. currentTab: 1,
  309. // 0: 免密, 1: 密码
  310. mobile: "",
  311. code: "",
  312. password: "",
  313. showPassword: false,
  314. isAgreed: false,
  315. countDown: 0,
  316. timer: null,
  317. showAgreementModal: false,
  318. agreementTitle: "",
  319. // 协议标题
  320. agreementContent: "",
  321. // 协议内容
  322. loginLoading: false
  323. };
  324. },
  325. onLoad() {
  326. uni.removeStorageSync("recruit_form_data");
  327. uni.removeStorageSync("recruit_auth_data");
  328. uni.removeStorageSync("recruit_qual_data");
  329. },
  330. methods: {
  331. /**
  332. * 显示协议弹窗
  333. * @param {Number} id 协议ID (1: 用户服务协议, 2: 隐私政策)
  334. */
  335. async showAgreement(id) {
  336. try {
  337. uni.showLoading({ title: "加载中..." });
  338. const res = await getAgreement(id);
  339. if (res.code === 200 && res.data) {
  340. this.agreementTitle = res.data.title;
  341. this.agreementContent = res.data.content;
  342. this.showAgreementModal = true;
  343. } else {
  344. uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
  345. }
  346. } catch (err) {
  347. formatAppLog("error", "at pages/login/logic.js:47", "获取协议详情失败:", err);
  348. } finally {
  349. uni.hideLoading();
  350. }
  351. },
  352. /* async getVerifyCode() {
  353. if (this.currentTab === 1) return;
  354. if (this.countDown > 0) return;
  355. if (!this.mobile || this.mobile.length !== 11) {
  356. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  357. return;
  358. }
  359. try {
  360. const res = await sendSmsCode(this.mobile);
  361. // 发送成功,启动倒计时
  362. this.countDown = 60;
  363. this.timer = setInterval(() => {
  364. this.countDown--;
  365. if (this.countDown <= 0) {
  366. clearInterval(this.timer);
  367. }
  368. }, 1000);
  369. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  370. const devCode = res.data;
  371. if (devCode) {
  372. this.code = devCode;
  373. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  374. } else {
  375. uni.showToast({ title: '验证码已发送', icon: 'none' });
  376. }
  377. } catch (err) {
  378. __f__('error','at pages/login/logic.js:79','发送验证码失败:', err);
  379. }
  380. }, */
  381. async handleLogin() {
  382. var _a;
  383. if (!this.isAgreed) {
  384. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  385. return;
  386. }
  387. if (!this.mobile) {
  388. uni.showToast({ title: "请输入手机号", icon: "none" });
  389. return;
  390. }
  391. if (!this.password) {
  392. uni.showToast({ title: "请输入密码", icon: "none" });
  393. return;
  394. }
  395. if (this.loginLoading)
  396. return;
  397. this.loginLoading = true;
  398. uni.showLoading({
  399. title: "登录中...",
  400. mask: true
  401. });
  402. try {
  403. let res;
  404. res = await loginByPassword(this.mobile, this.password);
  405. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  406. if (token) {
  407. setToken(token);
  408. }
  409. startGpsTimer();
  410. uni.showToast({ title: "登录成功", icon: "success" });
  411. setTimeout(() => {
  412. uni.switchTab({
  413. url: "/pages/home/index"
  414. });
  415. }, 1e3);
  416. } catch (err) {
  417. formatAppLog("error", "at pages/login/logic.js:144", "登录失败:", err);
  418. } finally {
  419. this.loginLoading = false;
  420. uni.hideLoading();
  421. }
  422. },
  423. goToRecruit() {
  424. uni.navigateTo({
  425. url: "/pages/recruit/landing"
  426. });
  427. },
  428. goToForgotPwd() {
  429. uni.navigateTo({
  430. url: "/pages/login/reset-pwd-verify"
  431. });
  432. }
  433. }
  434. };
  435. const _export_sfc = (sfc, props) => {
  436. const target = sfc.__vccOpts || sfc;
  437. for (const [key, val] of props) {
  438. target[key] = val;
  439. }
  440. return target;
  441. };
  442. const _sfc_main$E = {
  443. name: "Agreement",
  444. props: {
  445. visible: {
  446. type: Boolean,
  447. default: false
  448. },
  449. title: {
  450. type: String,
  451. default: ""
  452. },
  453. content: {
  454. type: String,
  455. default: ""
  456. }
  457. },
  458. methods: {
  459. /**
  460. * 关闭弹窗
  461. */
  462. handleClose() {
  463. this.$emit("close");
  464. }
  465. }
  466. };
  467. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  468. return $props.visible ? (vue.openBlock(), vue.createElementBlock(
  469. "view",
  470. {
  471. key: 0,
  472. class: "agreement-mask",
  473. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  474. }, ["stop", "prevent"]))
  475. },
  476. [
  477. vue.createElementVNode("view", { class: "agreement-container" }, [
  478. vue.createElementVNode("view", { class: "agreement-header" }, [
  479. vue.createElementVNode(
  480. "text",
  481. { class: "agreement-title" },
  482. vue.toDisplayString($props.title || "协议详情"),
  483. 1
  484. /* TEXT */
  485. )
  486. ]),
  487. vue.createElementVNode("scroll-view", {
  488. "scroll-y": "",
  489. class: "agreement-body"
  490. }, [
  491. vue.createElementVNode("rich-text", { nodes: $props.content }, null, 8, ["nodes"])
  492. ]),
  493. vue.createElementVNode("view", { class: "agreement-footer" }, [
  494. vue.createElementVNode("button", {
  495. class: "confirm-btn",
  496. onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args))
  497. }, "确 定")
  498. ])
  499. ])
  500. ],
  501. 32
  502. /* NEED_HYDRATION */
  503. )) : vue.createCommentVNode("v-if", true);
  504. }
  505. const Agreement = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-c8509778"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/agreement/index.vue"]]);
  506. const _imports_0$3 = "/static/header.png";
  507. const _imports_1$8 = "/static/logo.png";
  508. const _sfc_main$D = {
  509. ...logic$9,
  510. components: {
  511. Agreement
  512. }
  513. };
  514. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  515. const _component_agreement = vue.resolveComponent("agreement");
  516. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  517. vue.createElementVNode("view", { class: "banner-area" }, [
  518. vue.createElementVNode("image", {
  519. class: "banner-img",
  520. src: _imports_0$3,
  521. mode: "widthFix"
  522. })
  523. ]),
  524. vue.createElementVNode("view", { class: "content-card" }, [
  525. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  526. vue.createElementVNode("image", {
  527. class: "logo-img",
  528. src: _imports_1$8,
  529. mode: "widthFix"
  530. })
  531. ]),
  532. vue.createElementVNode("view", { class: "tabs" }, [
  533. vue.createElementVNode("view", { class: "tab-item active" }, [
  534. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  535. vue.createElementVNode("view", { class: "tab-indicator" })
  536. ])
  537. ]),
  538. vue.createElementVNode("view", { class: "form-area" }, [
  539. vue.createElementVNode("view", { class: "input-group" }, [
  540. vue.createElementVNode("view", { class: "area-code" }, [
  541. vue.createElementVNode("text", null, "+86"),
  542. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  543. ]),
  544. vue.withDirectives(vue.createElementVNode(
  545. "input",
  546. {
  547. class: "input",
  548. type: "number",
  549. placeholder: "手机号",
  550. "placeholder-style": "color: #ccc",
  551. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  552. maxlength: "11"
  553. },
  554. null,
  555. 512
  556. /* NEED_PATCH */
  557. ), [
  558. [vue.vModelText, _ctx.mobile]
  559. ])
  560. ]),
  561. vue.createElementVNode("view", { class: "input-group" }, [
  562. vue.withDirectives(vue.createElementVNode("input", {
  563. class: "input",
  564. password: !_ctx.showPassword,
  565. type: "text",
  566. placeholder: "请输入密码",
  567. "placeholder-style": "color: #ccc",
  568. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  569. }, null, 8, ["password"]), [
  570. [vue.vModelText, _ctx.password]
  571. ]),
  572. vue.createElementVNode("view", {
  573. class: "eye-icon",
  574. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  575. }, [
  576. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  577. key: 0,
  578. class: "svg-icon",
  579. viewBox: "0 0 24 24",
  580. fill: "none",
  581. xmlns: "http://www.w3.org/2000/svg"
  582. }, [
  583. vue.createElementVNode("path", {
  584. 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",
  585. fill: "#CCCCCC"
  586. })
  587. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  588. key: 1,
  589. class: "svg-icon",
  590. viewBox: "0 0 24 24",
  591. fill: "none",
  592. xmlns: "http://www.w3.org/2000/svg"
  593. }, [
  594. vue.createElementVNode("path", {
  595. d: "M12 7C7 7 2.73 10.11 1 14.5",
  596. stroke: "#CCCCCC",
  597. "stroke-width": "2",
  598. "stroke-linecap": "round"
  599. }),
  600. vue.createElementVNode("path", {
  601. d: "M23 14.5C21.27 10.11 17 7 12 7",
  602. stroke: "#CCCCCC",
  603. "stroke-width": "2",
  604. "stroke-linecap": "round"
  605. }),
  606. vue.createElementVNode("path", {
  607. d: "M12 7V4",
  608. stroke: "#CCCCCC",
  609. "stroke-width": "2",
  610. "stroke-linecap": "round"
  611. }),
  612. vue.createElementVNode("path", {
  613. d: "M16 8L18 5",
  614. stroke: "#CCCCCC",
  615. "stroke-width": "2",
  616. "stroke-linecap": "round"
  617. }),
  618. vue.createElementVNode("path", {
  619. d: "M8 8L6 5",
  620. stroke: "#CCCCCC",
  621. "stroke-width": "2",
  622. "stroke-linecap": "round"
  623. }),
  624. vue.createElementVNode("path", {
  625. d: "M20 10L22 8",
  626. stroke: "#CCCCCC",
  627. "stroke-width": "2",
  628. "stroke-linecap": "round"
  629. }),
  630. vue.createElementVNode("path", {
  631. d: "M4 10L2 8",
  632. stroke: "#CCCCCC",
  633. "stroke-width": "2",
  634. "stroke-linecap": "round"
  635. })
  636. ]))
  637. ])
  638. ]),
  639. vue.createElementVNode("button", {
  640. class: "login-btn",
  641. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  642. }, "登 录"),
  643. vue.createElementVNode("view", { class: "agreement" }, [
  644. vue.createElementVNode(
  645. "view",
  646. {
  647. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  648. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  649. },
  650. [
  651. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  652. key: 0,
  653. class: "check-mark"
  654. }, "✓")) : vue.createCommentVNode("v-if", true)
  655. ],
  656. 2
  657. /* CLASS */
  658. ),
  659. vue.createElementVNode("text", { class: "agree-text" }, [
  660. vue.createTextVNode(" 我已经阅读并同意 "),
  661. vue.createElementVNode("text", {
  662. class: "link",
  663. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  664. }, "《用户服务协议》"),
  665. vue.createTextVNode(" 和 "),
  666. vue.createElementVNode("text", {
  667. class: "link",
  668. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  669. }, "《隐私政策》")
  670. ])
  671. ])
  672. ]),
  673. vue.createElementVNode("view", {
  674. class: "footer-recruit",
  675. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  676. }, [
  677. vue.createElementVNode("view", { class: "recruit-badge" }, [
  678. (vue.openBlock(), vue.createElementBlock("svg", {
  679. class: "svg-icon flag-icon",
  680. viewBox: "0 0 24 24",
  681. fill: "none",
  682. xmlns: "http://www.w3.org/2000/svg",
  683. style: { "width": "30rpx", "height": "30rpx" }
  684. }, [
  685. vue.createElementVNode("path", {
  686. d: "M4 14V4H18L17 9L18 14H4Z",
  687. stroke: "#FF5722",
  688. "stroke-width": "2",
  689. "stroke-linejoin": "round"
  690. }),
  691. vue.createElementVNode("path", {
  692. d: "M4 22V14",
  693. stroke: "#FF5722",
  694. "stroke-width": "2",
  695. "stroke-linecap": "round"
  696. })
  697. ])),
  698. vue.createElementVNode("text", null, " 宠宝履约者招募")
  699. ])
  700. ]),
  701. vue.createVNode(_component_agreement, {
  702. visible: _ctx.showAgreementModal,
  703. title: _ctx.agreementTitle,
  704. content: _ctx.agreementContent,
  705. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  706. }, null, 8, ["visible", "title", "content"])
  707. ])
  708. ]);
  709. }
  710. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  711. const logic$8 = {
  712. data() {
  713. return {
  714. statusBarHeight: 20
  715. // 默认状态栏高度
  716. };
  717. },
  718. onLoad() {
  719. const sysInfo = uni.getSystemInfoSync();
  720. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  721. },
  722. methods: {
  723. goBack() {
  724. const pages = getCurrentPages();
  725. if (pages.length > 1) {
  726. uni.navigateBack();
  727. } else {
  728. uni.reLaunch({
  729. url: "/pages/login/login"
  730. });
  731. }
  732. },
  733. goToForm() {
  734. uni.navigateTo({
  735. url: "/pages/recruit/form"
  736. });
  737. }
  738. }
  739. };
  740. const _sfc_main$C = logic$8;
  741. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  742. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  743. vue.createElementVNode(
  744. "view",
  745. {
  746. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  747. },
  748. null,
  749. 4
  750. /* STYLE */
  751. ),
  752. vue.createElementVNode("view", { class: "nav-bar" }, [
  753. vue.createElementVNode("view", {
  754. class: "back-icon",
  755. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  756. }, "‹")
  757. ]),
  758. vue.createElementVNode("view", { class: "header-area" }, [
  759. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  760. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  761. ]),
  762. vue.createElementVNode("view", { class: "content-card" }, [
  763. vue.createElementVNode("view", { class: "benefit-item" }, [
  764. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  765. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  766. ]),
  767. vue.createElementVNode("view", { class: "info" }, [
  768. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  769. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  770. ])
  771. ]),
  772. vue.createElementVNode("view", { class: "benefit-item" }, [
  773. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  774. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  775. ]),
  776. vue.createElementVNode("view", { class: "info" }, [
  777. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  778. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  779. ])
  780. ]),
  781. vue.createElementVNode("view", { class: "benefit-item" }, [
  782. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  783. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  784. ]),
  785. vue.createElementVNode("view", { class: "info" }, [
  786. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  787. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  788. ])
  789. ])
  790. ]),
  791. vue.createElementVNode("view", { class: "footer-area" }, [
  792. vue.createElementVNode("button", {
  793. class: "join-btn",
  794. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  795. }, "我要加入"),
  796. vue.createElementVNode("view", { class: "faq" }, [
  797. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  798. vue.createTextVNode(" 常见问题 ")
  799. ])
  800. ])
  801. ]);
  802. }
  803. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  804. function getAreaStationList() {
  805. return request({
  806. url: "/system/areaStation/list",
  807. method: "GET"
  808. });
  809. }
  810. function listAllService() {
  811. return request({
  812. url: "/service/list/listAll",
  813. method: "GET"
  814. });
  815. }
  816. const logic$7 = {
  817. data() {
  818. return {
  819. formData: {
  820. mobile: "",
  821. code: "",
  822. name: "",
  823. gender: 1,
  824. // 1男 2女
  825. birthday: "",
  826. password: "",
  827. serviceType: [],
  828. station: "",
  829. stationId: null,
  830. areaPath: ""
  831. // 用于回显“区域+站点”名称
  832. },
  833. showPwd: false,
  834. isAgreed: false,
  835. serviceTypes: [],
  836. // 验证码倒计时
  837. countDown: 0,
  838. timer: null,
  839. // 日期选择器相关
  840. showPicker: false,
  841. years: [],
  842. months: [],
  843. days: [],
  844. pickerValue: [0, 0, 0],
  845. tempYear: 0,
  846. tempMonth: 0,
  847. tempDay: 0,
  848. // 站点选择器(级联版)
  849. showStationPickerCascader: false,
  850. selectStep: 0,
  851. selectedPathway: [],
  852. currentList: [],
  853. fullStationData: [],
  854. // 全量数据
  855. selectedStationId: null,
  856. // 协议弹窗
  857. showPrivacy: false,
  858. agreementTitle: "",
  859. // 协议标题
  860. agreementContent: "",
  861. // 协议内容
  862. currentAgreementId: ""
  863. // 当前协议ID
  864. };
  865. },
  866. onLoad() {
  867. this.initDateData();
  868. this.loadServiceTypes();
  869. this.loadAreaStationData();
  870. this.restoreFormData();
  871. },
  872. beforeDestroy() {
  873. if (this.timer)
  874. clearInterval(this.timer);
  875. },
  876. methods: {
  877. async loadAreaStationData() {
  878. try {
  879. const res = await getAreaStationList();
  880. this.fullStationData = res.data || [];
  881. } catch (err) {
  882. formatAppLog("error", "at pages/recruit/logic.js:73", "加载站点列表失败:", err);
  883. }
  884. },
  885. restoreFormData() {
  886. try {
  887. const saved = uni.getStorageSync("recruit_form_data");
  888. if (saved) {
  889. const d = JSON.parse(saved);
  890. Object.assign(this.formData, d);
  891. if (d._selectedPathway) {
  892. this.selectedPathway = d._selectedPathway;
  893. this.selectStep = this.selectedPathway.length;
  894. }
  895. if (this.selectedPathway.length > 0) {
  896. const last = this.selectedPathway[this.selectedPathway.length - 1];
  897. if (last)
  898. this.loadStations(last.id);
  899. }
  900. }
  901. } catch (e) {
  902. formatAppLog("error", "at pages/recruit/logic.js:95", "恢复表单数据失败", e);
  903. }
  904. },
  905. initDateData() {
  906. const now = /* @__PURE__ */ new Date();
  907. const currentYear = now.getFullYear();
  908. for (let i = 1980; i <= currentYear + 5; i++) {
  909. this.years.push(i);
  910. }
  911. for (let i = 1; i <= 12; i++) {
  912. this.months.push(i);
  913. }
  914. for (let i = 1; i <= 31; i++) {
  915. this.days.push(i);
  916. }
  917. },
  918. // 打开选择器
  919. openPicker() {
  920. const dateStr = this.formData.birthday || "2000-01-01";
  921. const [y, m, d] = dateStr.split("-").map(Number);
  922. const yIndex = this.years.indexOf(y);
  923. const mIndex = this.months.indexOf(m);
  924. const dIndex = this.days.indexOf(d);
  925. this.pickerValue = [
  926. yIndex > -1 ? yIndex : 0,
  927. mIndex > -1 ? mIndex : 0,
  928. dIndex > -1 ? dIndex : 0
  929. ];
  930. this.tempYear = this.years[this.pickerValue[0]];
  931. this.tempMonth = this.months[this.pickerValue[1]];
  932. this.tempDay = this.days[this.pickerValue[2]];
  933. this.showPicker = true;
  934. },
  935. closePicker() {
  936. this.showPicker = false;
  937. },
  938. onPickerChange(e) {
  939. const val = e.detail.value;
  940. this.tempYear = this.years[val[0]];
  941. this.tempMonth = this.months[val[1]];
  942. this.tempDay = this.days[val[2]];
  943. },
  944. confirmPicker() {
  945. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  946. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  947. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  948. this.closePicker();
  949. },
  950. async loadServiceTypes() {
  951. try {
  952. const res = await listAllService();
  953. this.serviceTypes = (res.data || []).map((item) => ({
  954. id: item.id,
  955. name: item.name
  956. }));
  957. } catch (err) {
  958. formatAppLog("error", "at pages/recruit/logic.js:167", "加载服务类型失败:", err);
  959. this.serviceTypes = [];
  960. }
  961. },
  962. toggleService(item) {
  963. const idx = this.formData.serviceType.indexOf(item.id);
  964. if (idx > -1) {
  965. this.formData.serviceType.splice(idx, 1);
  966. } else {
  967. this.formData.serviceType.push(item.id);
  968. }
  969. },
  970. // 验证码
  971. /* async getVerifyCode() {
  972. if (this.countDown > 0) return;
  973. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  974. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  975. return;
  976. }
  977. try {
  978. const res = await sendSmsCode(this.formData.mobile);
  979. this.countDown = 60;
  980. this.timer = setInterval(() => {
  981. this.countDown--;
  982. if (this.countDown <= 0) clearInterval(this.timer);
  983. }, 1000);
  984. // TODO 【生产环境必须删除】开发模式自动填入验证码
  985. const devCode = res.data;
  986. if (devCode) {
  987. this.formData.code = devCode;
  988. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  989. } else {
  990. uni.showToast({ title: '验证码已发送', icon: 'none' });
  991. }
  992. } catch (err) {
  993. __f__('error','at pages/recruit/logic.js:204','发送验证码失败:', err);
  994. }
  995. }, */
  996. // 站点级联选择逻辑 (从全量本地数据中根据 parentId 过滤)
  997. async openStationPickerCascader() {
  998. this.showStationPickerCascader = true;
  999. if (this.selectedPathway.length === 0) {
  1000. await this.resetStationPicker();
  1001. }
  1002. },
  1003. async resetStationPicker() {
  1004. this.selectStep = 0;
  1005. this.selectedPathway = [];
  1006. this.filterLocalChildren(0);
  1007. },
  1008. closeStationPickerCascader() {
  1009. this.showStationPickerCascader = false;
  1010. },
  1011. filterLocalChildren(parentId) {
  1012. this.currentList = this.fullStationData.filter((item) => item.parentId == parentId);
  1013. },
  1014. async selectStationItem(item) {
  1015. this.selectedPathway[this.selectStep] = item;
  1016. const sons = this.fullStationData.filter((i) => i.parentId == item.id);
  1017. if (sons.length > 0) {
  1018. this.selectStep++;
  1019. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1020. this.currentList = sons;
  1021. } else {
  1022. this.confirmStation();
  1023. }
  1024. },
  1025. async jumpToStep(step) {
  1026. this.selectStep = step;
  1027. if (step === 0) {
  1028. this.filterLocalChildren(0);
  1029. } else {
  1030. const parent = this.selectedPathway[step - 1];
  1031. if (parent) {
  1032. this.filterLocalChildren(parent.id);
  1033. }
  1034. }
  1035. },
  1036. confirmStation() {
  1037. const path = this.selectedPathway.map((i) => i.name);
  1038. const stationName = path[path.length - 1];
  1039. const areaName = path.slice(0, -1).join(" ");
  1040. this.formData.station = stationName;
  1041. this.formData.stationId = this.selectedPathway[this.selectedPathway.length - 1].id;
  1042. this.formData.areaPath = areaName;
  1043. this.closeStationPickerCascader();
  1044. },
  1045. // --- 废弃的功能逻辑 (已被站点选择合并或移除) ---
  1046. /* async loadStations(parentId) { ... } */
  1047. /* openStationPicker() { ... } */
  1048. /* selectStation(item) { ... } */
  1049. /* async openCityPicker() { ... } */
  1050. /* loadAreaChildren(parentId) { ... } */
  1051. /* async selectCityItem(item) { ... } */
  1052. /* confirmCity() { ... } */
  1053. async openPrivacy() {
  1054. try {
  1055. uni.showLoading({ title: "加载中..." });
  1056. const res = await getAgreement(3);
  1057. if (res.code === 200 && res.data) {
  1058. this.agreementTitle = res.data.title;
  1059. this.agreementContent = res.data.content;
  1060. this.showPrivacy = true;
  1061. } else {
  1062. uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
  1063. }
  1064. } catch (err) {
  1065. formatAppLog("error", "at pages/recruit/logic.js:287", "获取协议详情失败:", err);
  1066. } finally {
  1067. uni.hideLoading();
  1068. }
  1069. },
  1070. goToAuth() {
  1071. if (!this.isAgreed) {
  1072. uni.showToast({ title: "请勾选协议", icon: "none" });
  1073. return;
  1074. }
  1075. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1076. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1077. return;
  1078. }
  1079. if (!this.formData.name) {
  1080. uni.showToast({ title: "请输入姓名", icon: "none" });
  1081. return;
  1082. }
  1083. if (this.formData.serviceType.length === 0) {
  1084. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1085. return;
  1086. }
  1087. if (!this.formData.stationId) {
  1088. uni.showToast({ title: "请选择所属站点", icon: "none" });
  1089. return;
  1090. }
  1091. uni.setStorageSync("recruit_form_data", JSON.stringify({
  1092. ...this.formData,
  1093. _selectedPathway: this.selectedPathway
  1094. // 私有存储,仅用于回显
  1095. }));
  1096. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1097. const services = JSON.stringify(selectedServices);
  1098. uni.navigateTo({
  1099. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1100. });
  1101. }
  1102. }
  1103. };
  1104. const _sfc_main$B = {
  1105. ...logic$7,
  1106. components: {
  1107. Agreement
  1108. }
  1109. };
  1110. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  1111. const _component_agreement = vue.resolveComponent("agreement");
  1112. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1113. vue.createElementVNode("view", { class: "card" }, [
  1114. vue.createElementVNode("view", { class: "form-item" }, [
  1115. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1116. vue.createElementVNode("view", { class: "input-box" }, [
  1117. vue.createElementVNode("view", { class: "prefix-area" }, [
  1118. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1119. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1120. ]),
  1121. vue.withDirectives(vue.createElementVNode(
  1122. "input",
  1123. {
  1124. class: "input",
  1125. type: "number",
  1126. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1127. },
  1128. null,
  1129. 512
  1130. /* NEED_PATCH */
  1131. ), [
  1132. [vue.vModelText, _ctx.formData.mobile]
  1133. ])
  1134. ])
  1135. ]),
  1136. vue.createElementVNode("view", { class: "form-item" }, [
  1137. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1138. vue.createElementVNode("view", { class: "input-box" }, [
  1139. vue.withDirectives(vue.createElementVNode(
  1140. "input",
  1141. {
  1142. class: "input",
  1143. type: "text",
  1144. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1145. },
  1146. null,
  1147. 512
  1148. /* NEED_PATCH */
  1149. ), [
  1150. [vue.vModelText, _ctx.formData.name]
  1151. ])
  1152. ])
  1153. ]),
  1154. vue.createElementVNode("view", { class: "form-item" }, [
  1155. vue.createElementVNode("text", { class: "label" }, "性别"),
  1156. vue.createElementVNode("view", { class: "gender-group" }, [
  1157. vue.createElementVNode("view", {
  1158. class: "radio-item",
  1159. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1160. }, [
  1161. vue.createElementVNode(
  1162. "text",
  1163. {
  1164. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1165. },
  1166. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1167. 3
  1168. /* TEXT, CLASS */
  1169. ),
  1170. vue.createElementVNode(
  1171. "text",
  1172. {
  1173. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1174. },
  1175. " 男",
  1176. 2
  1177. /* CLASS */
  1178. )
  1179. ]),
  1180. vue.createElementVNode("view", {
  1181. class: "radio-item",
  1182. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1183. }, [
  1184. vue.createElementVNode(
  1185. "text",
  1186. {
  1187. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1188. },
  1189. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1190. 3
  1191. /* TEXT, CLASS */
  1192. ),
  1193. vue.createElementVNode(
  1194. "text",
  1195. {
  1196. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1197. },
  1198. " 女",
  1199. 2
  1200. /* CLASS */
  1201. )
  1202. ])
  1203. ])
  1204. ]),
  1205. vue.createElementVNode("view", { class: "form-item" }, [
  1206. vue.createElementVNode("text", { class: "label" }, "生日"),
  1207. vue.createElementVNode("view", {
  1208. class: "input-box",
  1209. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1210. }, [
  1211. vue.createElementVNode(
  1212. "text",
  1213. null,
  1214. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1215. 1
  1216. /* TEXT */
  1217. ),
  1218. (vue.openBlock(), vue.createElementBlock("svg", {
  1219. class: "arrow-right",
  1220. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1221. viewBox: "0 0 1024 1024",
  1222. version: "1.1",
  1223. xmlns: "http://www.w3.org/2000/svg"
  1224. }, [
  1225. vue.createElementVNode("path", {
  1226. 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",
  1227. fill: "#CCCCCC"
  1228. })
  1229. ]))
  1230. ])
  1231. ]),
  1232. vue.createElementVNode("view", { class: "form-item" }, [
  1233. vue.createElementVNode("text", { class: "label" }, "密码"),
  1234. vue.createElementVNode("view", { class: "input-box" }, [
  1235. vue.withDirectives(vue.createElementVNode("input", {
  1236. class: "input",
  1237. password: !_ctx.showPwd,
  1238. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1239. placeholder: "设置登录密码"
  1240. }, null, 8, ["password"]), [
  1241. [vue.vModelText, _ctx.formData.password]
  1242. ]),
  1243. vue.createElementVNode("view", {
  1244. class: "monkey-icon",
  1245. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1246. }, [
  1247. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1248. key: 0,
  1249. class: "svg-icon",
  1250. viewBox: "0 0 24 24",
  1251. fill: "none",
  1252. xmlns: "http://www.w3.org/2000/svg"
  1253. }, [
  1254. vue.createElementVNode("path", {
  1255. 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",
  1256. fill: "#CCCCCC"
  1257. })
  1258. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1259. key: 1,
  1260. class: "svg-icon",
  1261. viewBox: "0 0 24 24",
  1262. fill: "none",
  1263. xmlns: "http://www.w3.org/2000/svg"
  1264. }, [
  1265. vue.createElementVNode("path", {
  1266. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1267. stroke: "#CCCCCC",
  1268. "stroke-width": "2",
  1269. "stroke-linecap": "round"
  1270. }),
  1271. vue.createElementVNode("path", {
  1272. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1273. stroke: "#CCCCCC",
  1274. "stroke-width": "2",
  1275. "stroke-linecap": "round"
  1276. }),
  1277. vue.createElementVNode("path", {
  1278. d: "M12 7V4",
  1279. stroke: "#CCCCCC",
  1280. "stroke-width": "2",
  1281. "stroke-linecap": "round"
  1282. }),
  1283. vue.createElementVNode("path", {
  1284. d: "M16 8L18 5",
  1285. stroke: "#CCCCCC",
  1286. "stroke-width": "2",
  1287. "stroke-linecap": "round"
  1288. }),
  1289. vue.createElementVNode("path", {
  1290. d: "M8 8L6 5",
  1291. stroke: "#CCCCCC",
  1292. "stroke-width": "2",
  1293. "stroke-linecap": "round"
  1294. }),
  1295. vue.createElementVNode("path", {
  1296. d: "M20 10L22 8",
  1297. stroke: "#CCCCCC",
  1298. "stroke-width": "2",
  1299. "stroke-linecap": "round"
  1300. }),
  1301. vue.createElementVNode("path", {
  1302. d: "M4 10L2 8",
  1303. stroke: "#CCCCCC",
  1304. "stroke-width": "2",
  1305. "stroke-linecap": "round"
  1306. })
  1307. ]))
  1308. ])
  1309. ])
  1310. ])
  1311. ]),
  1312. vue.createElementVNode("view", { class: "card" }, [
  1313. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1314. vue.createElementVNode("view", { class: "service-types" }, [
  1315. (vue.openBlock(true), vue.createElementBlock(
  1316. vue.Fragment,
  1317. null,
  1318. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1319. return vue.openBlock(), vue.createElementBlock("view", {
  1320. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1321. key: item.id,
  1322. onClick: ($event) => _ctx.toggleService(item)
  1323. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1324. }),
  1325. 128
  1326. /* KEYED_FRAGMENT */
  1327. ))
  1328. ]),
  1329. vue.createElementVNode("view", { class: "form-item" }, [
  1330. vue.createElementVNode("text", { class: "label" }, "所属站点"),
  1331. vue.createElementVNode("view", {
  1332. class: "input-box",
  1333. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openStationPickerCascader && _ctx.openStationPickerCascader(...args))
  1334. }, [
  1335. _ctx.formData.station ? (vue.openBlock(), vue.createElementBlock("view", {
  1336. key: 0,
  1337. class: "station-display"
  1338. }, [
  1339. _ctx.formData.areaPath ? (vue.openBlock(), vue.createElementBlock(
  1340. "text",
  1341. {
  1342. key: 0,
  1343. class: "area-tag"
  1344. },
  1345. vue.toDisplayString(_ctx.formData.areaPath),
  1346. 1
  1347. /* TEXT */
  1348. )) : vue.createCommentVNode("v-if", true),
  1349. vue.createElementVNode(
  1350. "text",
  1351. { class: "station-name" },
  1352. vue.toDisplayString(_ctx.formData.station),
  1353. 1
  1354. /* TEXT */
  1355. )
  1356. ])) : (vue.openBlock(), vue.createElementBlock("text", {
  1357. key: 1,
  1358. style: { "color": "#ccc" }
  1359. }, "请选择所属站点")),
  1360. (vue.openBlock(), vue.createElementBlock("svg", {
  1361. class: "arrow-right",
  1362. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1363. viewBox: "0 0 1024 1024",
  1364. version: "1.1",
  1365. xmlns: "http://www.w3.org/2000/svg"
  1366. }, [
  1367. vue.createElementVNode("path", {
  1368. 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",
  1369. fill: "#CCCCCC"
  1370. })
  1371. ]))
  1372. ])
  1373. ])
  1374. ]),
  1375. vue.createElementVNode(
  1376. "view",
  1377. {
  1378. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPickerCascader }]),
  1379. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeStationPickerCascader && _ctx.closeStationPickerCascader(...args))
  1380. },
  1381. [
  1382. vue.createElementVNode("view", {
  1383. class: "picker-content",
  1384. onClick: _cache[10] || (_cache[10] = vue.withModifiers(() => {
  1385. }, ["stop"]))
  1386. }, [
  1387. vue.createElementVNode("view", { class: "picker-header" }, [
  1388. vue.createElementVNode("text", {
  1389. class: "picker-btn-cancel",
  1390. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeStationPickerCascader && _ctx.closeStationPickerCascader(...args))
  1391. }, "取消"),
  1392. vue.createElementVNode("text", { class: "picker-title" }, "请选择所属站点"),
  1393. vue.createElementVNode("text", {
  1394. class: "picker-btn-confirm",
  1395. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeStationPickerCascader && _ctx.closeStationPickerCascader(...args))
  1396. }, "关闭")
  1397. ]),
  1398. vue.createElementVNode("view", { class: "picker-body" }, [
  1399. vue.createElementVNode("view", { class: "timeline-area" }, [
  1400. (vue.openBlock(true), vue.createElementBlock(
  1401. vue.Fragment,
  1402. null,
  1403. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1404. return vue.openBlock(), vue.createElementBlock("view", {
  1405. class: "timeline-item",
  1406. key: index,
  1407. onClick: ($event) => _ctx.jumpToStep(index)
  1408. }, [
  1409. vue.createElementVNode("view", { class: "timeline-dot" }),
  1410. vue.createElementVNode(
  1411. "text",
  1412. null,
  1413. vue.toDisplayString(item.name),
  1414. 1
  1415. /* TEXT */
  1416. )
  1417. ], 8, ["onClick"]);
  1418. }),
  1419. 128
  1420. /* KEYED_FRAGMENT */
  1421. )),
  1422. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1423. key: 0,
  1424. class: "timeline-item active"
  1425. }, [
  1426. vue.createElementVNode("view", { class: "timeline-dot" }),
  1427. vue.createElementVNode("text", null, "请选择")
  1428. ])) : vue.createCommentVNode("v-if", true)
  1429. ]),
  1430. vue.createElementVNode("scroll-view", {
  1431. "scroll-y": "",
  1432. class: "list-area"
  1433. }, [
  1434. (vue.openBlock(true), vue.createElementBlock(
  1435. vue.Fragment,
  1436. null,
  1437. vue.renderList(_ctx.currentList, (item, index) => {
  1438. return vue.openBlock(), vue.createElementBlock("view", {
  1439. class: "list-item",
  1440. key: item.id,
  1441. onClick: ($event) => _ctx.selectStationItem(item)
  1442. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1443. }),
  1444. 128
  1445. /* KEYED_FRAGMENT */
  1446. )),
  1447. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1448. key: 0,
  1449. style: { "padding": "20rpx", "color": "#999" }
  1450. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1451. ])
  1452. ])
  1453. ])
  1454. ],
  1455. 2
  1456. /* CLASS */
  1457. ),
  1458. vue.createElementVNode("view", { class: "footer-actions" }, [
  1459. vue.createElementVNode("view", { class: "agreement-row" }, [
  1460. vue.createElementVNode(
  1461. "view",
  1462. {
  1463. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1464. onClick: _cache[12] || (_cache[12] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1465. },
  1466. [
  1467. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1468. key: 0,
  1469. class: "check-mark"
  1470. }, "✓")) : vue.createCommentVNode("v-if", true)
  1471. ],
  1472. 2
  1473. /* CLASS */
  1474. ),
  1475. vue.createElementVNode("text", { class: "agree-text" }, [
  1476. vue.createTextVNode("我已阅读并同意 "),
  1477. vue.createElementVNode("text", {
  1478. style: { "color": "#2979ff" },
  1479. onClick: _cache[13] || (_cache[13] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1480. }, "《宠宝履约者说明》")
  1481. ])
  1482. ]),
  1483. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1484. vue.createElementVNode("button", {
  1485. class: "submit-btn",
  1486. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1487. }, "下一步,实名认证")
  1488. ])
  1489. ]),
  1490. vue.createElementVNode(
  1491. "view",
  1492. {
  1493. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1494. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1495. },
  1496. [
  1497. vue.createElementVNode("view", {
  1498. class: "picker-content",
  1499. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  1500. }, ["stop"]))
  1501. }, [
  1502. vue.createElementVNode("view", { class: "picker-header" }, [
  1503. vue.createElementVNode("text", {
  1504. class: "picker-btn-cancel",
  1505. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1506. }, "取消"),
  1507. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1508. vue.createElementVNode("text", {
  1509. class: "picker-btn-confirm",
  1510. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1511. }, "确定")
  1512. ]),
  1513. vue.createElementVNode("picker-view", {
  1514. class: "picker-view",
  1515. "indicator-style": "height: 50px;",
  1516. value: _ctx.pickerValue,
  1517. onChange: _cache[17] || (_cache[17] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1518. }, [
  1519. vue.createElementVNode("picker-view-column", null, [
  1520. (vue.openBlock(true), vue.createElementBlock(
  1521. vue.Fragment,
  1522. null,
  1523. vue.renderList(_ctx.years, (item, index) => {
  1524. return vue.openBlock(), vue.createElementBlock(
  1525. "view",
  1526. {
  1527. class: "picker-item",
  1528. key: index
  1529. },
  1530. vue.toDisplayString(item) + "年",
  1531. 1
  1532. /* TEXT */
  1533. );
  1534. }),
  1535. 128
  1536. /* KEYED_FRAGMENT */
  1537. ))
  1538. ]),
  1539. vue.createElementVNode("picker-view-column", null, [
  1540. (vue.openBlock(true), vue.createElementBlock(
  1541. vue.Fragment,
  1542. null,
  1543. vue.renderList(_ctx.months, (item, index) => {
  1544. return vue.openBlock(), vue.createElementBlock(
  1545. "view",
  1546. {
  1547. class: "picker-item",
  1548. key: index
  1549. },
  1550. vue.toDisplayString(item) + "月",
  1551. 1
  1552. /* TEXT */
  1553. );
  1554. }),
  1555. 128
  1556. /* KEYED_FRAGMENT */
  1557. ))
  1558. ]),
  1559. vue.createElementVNode("picker-view-column", null, [
  1560. (vue.openBlock(true), vue.createElementBlock(
  1561. vue.Fragment,
  1562. null,
  1563. vue.renderList(_ctx.days, (item, index) => {
  1564. return vue.openBlock(), vue.createElementBlock(
  1565. "view",
  1566. {
  1567. class: "picker-item",
  1568. key: index
  1569. },
  1570. vue.toDisplayString(item) + "日",
  1571. 1
  1572. /* TEXT */
  1573. );
  1574. }),
  1575. 128
  1576. /* KEYED_FRAGMENT */
  1577. ))
  1578. ])
  1579. ], 40, ["value"])
  1580. ])
  1581. ],
  1582. 2
  1583. /* CLASS */
  1584. ),
  1585. vue.createVNode(_component_agreement, {
  1586. visible: _ctx.showPrivacy,
  1587. title: _ctx.agreementTitle,
  1588. content: _ctx.agreementContent,
  1589. onClose: _cache[20] || (_cache[20] = ($event) => _ctx.showPrivacy = false)
  1590. }, null, 8, ["visible", "title", "content"])
  1591. ]);
  1592. }
  1593. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1594. function submitAudit(data) {
  1595. return request({
  1596. url: "/fulfiller/app/audit/submit",
  1597. method: "POST",
  1598. needToken: false,
  1599. data
  1600. });
  1601. }
  1602. function getServiceTypes() {
  1603. return request({
  1604. url: "/fulfiller/app/service/list",
  1605. method: "GET",
  1606. needToken: false
  1607. });
  1608. }
  1609. function uploadFile(filePath) {
  1610. return new Promise((resolve, reject) => {
  1611. const token = uni.getStorageSync("fulfiller_token");
  1612. uni.uploadFile({
  1613. url: BASE_URL + "/fulfiller/app/upload",
  1614. filePath,
  1615. name: "file",
  1616. timeout: 6e5,
  1617. header: {
  1618. "clientid": CLIENT_ID,
  1619. "X-Platform-Code": PLATFORM_CODE,
  1620. "Authorization": token ? `Bearer ${token}` : ""
  1621. },
  1622. success: (res) => {
  1623. try {
  1624. const data = JSON.parse(res.data);
  1625. if (data.code === 200) {
  1626. resolve(data);
  1627. } else {
  1628. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  1629. reject(data);
  1630. }
  1631. } catch (e) {
  1632. reject(e);
  1633. }
  1634. },
  1635. fail: (err) => {
  1636. uni.showToast({ title: "上传失败", icon: "none" });
  1637. reject(err);
  1638. }
  1639. });
  1640. });
  1641. }
  1642. const logic$6 = {
  1643. data() {
  1644. return {
  1645. formData: {
  1646. idType: "居民身份证",
  1647. name: "",
  1648. idNumber: "",
  1649. expiryDate: ""
  1650. },
  1651. idCardFront: "",
  1652. // 身份证正面本地预览路径
  1653. idCardBack: "",
  1654. // 身份证反面本地预览路径
  1655. idCardFrontOssId: "",
  1656. // 身份证正面 OSS ID
  1657. idCardBackOssId: "",
  1658. // 身份证反面 OSS ID
  1659. showPicker: false,
  1660. pickerValue: [0, 0, 0],
  1661. // YYYY-MM-DD
  1662. years: [],
  1663. months: [],
  1664. days: [],
  1665. tempYear: 0,
  1666. tempMonth: 0,
  1667. tempDay: 0,
  1668. serviceType: [],
  1669. // 接收上一页的服务类型
  1670. isChoosingImage: false
  1671. // 标志位:是否正在选择图片中,防止 onShow 重置数据
  1672. };
  1673. },
  1674. onLoad(options) {
  1675. if (options.services) {
  1676. try {
  1677. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1678. } catch (e) {
  1679. formatAppLog("error", "at pages/recruit/auth_logic.js:33", "Parse services failed", e);
  1680. }
  1681. }
  1682. this.initDateData();
  1683. this.restoreAuthData();
  1684. },
  1685. onShow() {
  1686. if (this.isChoosingImage) {
  1687. this.isChoosingImage = false;
  1688. }
  1689. },
  1690. methods: {
  1691. // --- 日期选择器逻辑 ---
  1692. initDateData() {
  1693. const date = /* @__PURE__ */ new Date();
  1694. const year = date.getFullYear();
  1695. for (let i = year; i <= year + 50; i++) {
  1696. this.years.push(i);
  1697. }
  1698. for (let i = 1; i <= 12; i++) {
  1699. this.months.push(i);
  1700. }
  1701. for (let i = 1; i <= 31; i++) {
  1702. this.days.push(i);
  1703. }
  1704. },
  1705. openPicker() {
  1706. const date = /* @__PURE__ */ new Date();
  1707. const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
  1708. const [y, m, d] = dateStr.split("-").map(Number);
  1709. let yIndex = this.years.indexOf(y);
  1710. let mIndex = this.months.indexOf(m);
  1711. let dIndex = this.days.indexOf(d);
  1712. this.pickerValue = [
  1713. yIndex > -1 ? yIndex : 0,
  1714. mIndex > -1 ? mIndex : 0,
  1715. dIndex > -1 ? dIndex : 0
  1716. ];
  1717. this.tempYear = this.years[this.pickerValue[0]];
  1718. this.tempMonth = this.months[this.pickerValue[1]];
  1719. this.tempDay = this.days[this.pickerValue[2]];
  1720. this.showPicker = true;
  1721. },
  1722. closePicker() {
  1723. this.showPicker = false;
  1724. },
  1725. onPickerChange(e) {
  1726. const val = e.detail.value;
  1727. this.tempYear = this.years[val[0]];
  1728. this.tempMonth = this.months[val[1]];
  1729. this.tempDay = this.days[val[2]];
  1730. },
  1731. confirmPicker() {
  1732. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1733. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1734. this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
  1735. this.closePicker();
  1736. },
  1737. // --- 数据持久化(防止返回上一级丢失) ---
  1738. restoreAuthData() {
  1739. try {
  1740. const saved = uni.getStorageSync("recruit_auth_data");
  1741. if (saved) {
  1742. const d = JSON.parse(saved);
  1743. this.formData.name = d.name || "";
  1744. this.formData.idNumber = d.idNumber || "";
  1745. this.formData.expiryDate = d.expiryDate || "";
  1746. this.idCardFront = d.idCardFront || "";
  1747. this.idCardBack = d.idCardBack || "";
  1748. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1749. this.idCardBackOssId = d.idCardBackOssId || "";
  1750. }
  1751. } catch (e) {
  1752. formatAppLog("error", "at pages/recruit/auth_logic.js:113", "恢复认证数据失败", e);
  1753. }
  1754. },
  1755. saveAuthData() {
  1756. try {
  1757. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1758. name: this.formData.name,
  1759. idNumber: this.formData.idNumber,
  1760. expiryDate: this.formData.expiryDate,
  1761. idCardFront: this.idCardFront,
  1762. idCardBack: this.idCardBack,
  1763. idCardFrontOssId: this.idCardFrontOssId,
  1764. idCardBackOssId: this.idCardBackOssId
  1765. }));
  1766. } catch (e) {
  1767. formatAppLog("error", "at pages/recruit/auth_logic.js:128", "保存认证数据失败", e);
  1768. }
  1769. },
  1770. // --- 重置表单数据 ---
  1771. resetFormData() {
  1772. this.formData.name = "";
  1773. this.formData.idNumber = "";
  1774. this.formData.expiryDate = "";
  1775. this.idCardFront = "";
  1776. this.idCardBack = "";
  1777. this.idCardFrontOssId = "";
  1778. this.idCardBackOssId = "";
  1779. try {
  1780. uni.removeStorageSync("recruit_auth_data");
  1781. } catch (e) {
  1782. formatAppLog("error", "at pages/recruit/auth_logic.js:145", "清除缓存失败", e);
  1783. }
  1784. },
  1785. // --- 图片上传(选择后自动上传到OSS) ---
  1786. chooseImage(side) {
  1787. this.isChoosingImage = true;
  1788. uni.chooseImage({
  1789. count: 1,
  1790. sizeType: ["compressed"],
  1791. sourceType: ["album", "camera"],
  1792. success: async (res) => {
  1793. const tempPath = res.tempFilePaths[0];
  1794. if (side === "front") {
  1795. this.idCardFront = tempPath;
  1796. } else {
  1797. this.idCardBack = tempPath;
  1798. }
  1799. try {
  1800. uni.showLoading({ title: "上传中..." });
  1801. const uploadRes = await uploadFile(tempPath);
  1802. if (side === "front") {
  1803. this.idCardFrontOssId = uploadRes.data.ossId;
  1804. } else {
  1805. this.idCardBackOssId = uploadRes.data.ossId;
  1806. }
  1807. uni.hideLoading();
  1808. this.saveAuthData();
  1809. } catch (err) {
  1810. uni.hideLoading();
  1811. formatAppLog("error", "at pages/recruit/auth_logic.js:176", "上传身份证图片失败:", err);
  1812. }
  1813. }
  1814. });
  1815. },
  1816. // --- 提交 ---
  1817. goToQualifications() {
  1818. this.saveAuthData();
  1819. try {
  1820. const stored = uni.getStorageSync("recruit_form_data");
  1821. if (stored) {
  1822. const data = JSON.parse(stored);
  1823. data.realName = this.formData.name;
  1824. data.idNumber = this.formData.idNumber;
  1825. data.expiryDate = this.formData.expiryDate;
  1826. data.idCardFrontOssId = this.idCardFrontOssId;
  1827. data.idCardBackOssId = this.idCardBackOssId;
  1828. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1829. }
  1830. } catch (e) {
  1831. formatAppLog("error", "at pages/recruit/auth_logic.js:213", "保存认证数据失败", e);
  1832. }
  1833. const services = JSON.stringify(this.serviceType);
  1834. uni.navigateTo({
  1835. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1836. });
  1837. }
  1838. }
  1839. };
  1840. const _sfc_main$A = logic$6;
  1841. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1842. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1843. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1844. vue.createElementVNode("view", { class: "form-card" }, [
  1845. vue.createElementVNode("view", { class: "form-item" }, [
  1846. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1847. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1848. ]),
  1849. vue.createElementVNode("view", { class: "form-item" }, [
  1850. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1851. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1852. vue.withDirectives(vue.createElementVNode(
  1853. "input",
  1854. {
  1855. class: "input-area",
  1856. type: "text",
  1857. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1858. placeholder: "证件姓名",
  1859. "placeholder-class": "input-placeholder"
  1860. },
  1861. null,
  1862. 512
  1863. /* NEED_PATCH */
  1864. ), [
  1865. [vue.vModelText, _ctx.formData.name]
  1866. ])
  1867. ])
  1868. ]),
  1869. vue.createElementVNode("view", { class: "form-item" }, [
  1870. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1871. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1872. vue.withDirectives(vue.createElementVNode(
  1873. "input",
  1874. {
  1875. class: "input-area",
  1876. type: "idcard",
  1877. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1878. placeholder: "身份证号",
  1879. "placeholder-class": "input-placeholder"
  1880. },
  1881. null,
  1882. 512
  1883. /* NEED_PATCH */
  1884. ), [
  1885. [vue.vModelText, _ctx.formData.idNumber]
  1886. ])
  1887. ])
  1888. ]),
  1889. vue.createElementVNode("view", { class: "form-item" }, [
  1890. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1891. vue.createElementVNode("view", {
  1892. class: "gray-input-box",
  1893. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1894. }, [
  1895. vue.createElementVNode(
  1896. "text",
  1897. {
  1898. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1899. },
  1900. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1901. 3
  1902. /* TEXT, CLASS */
  1903. ),
  1904. (vue.openBlock(), vue.createElementBlock("svg", {
  1905. class: "arrow-right",
  1906. viewBox: "0 0 1024 1024",
  1907. version: "1.1",
  1908. xmlns: "http://www.w3.org/2000/svg"
  1909. }, [
  1910. vue.createElementVNode("path", {
  1911. 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",
  1912. fill: "#CCCCCC"
  1913. })
  1914. ]))
  1915. ])
  1916. ])
  1917. ]),
  1918. vue.createElementVNode("view", { class: "upload-card" }, [
  1919. vue.createElementVNode("view", {
  1920. class: "upload-box",
  1921. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  1922. }, [
  1923. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  1924. key: 0,
  1925. src: _ctx.idCardFront,
  1926. class: "preview-img",
  1927. mode: "aspectFill"
  1928. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1929. vue.Fragment,
  1930. { key: 1 },
  1931. [
  1932. (vue.openBlock(), vue.createElementBlock("svg", {
  1933. class: "camera-icon",
  1934. viewBox: "0 0 24 24",
  1935. fill: "none",
  1936. xmlns: "http://www.w3.org/2000/svg"
  1937. }, [
  1938. vue.createElementVNode("path", {
  1939. 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",
  1940. fill: "#E0E0E0"
  1941. }),
  1942. vue.createElementVNode("circle", {
  1943. cx: "12",
  1944. cy: "12",
  1945. r: "3",
  1946. stroke: "#CCCCCC",
  1947. "stroke-width": "2"
  1948. }),
  1949. vue.createElementVNode("path", {
  1950. 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",
  1951. fill: "#CCCCCC"
  1952. })
  1953. ])),
  1954. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1955. ],
  1956. 64
  1957. /* STABLE_FRAGMENT */
  1958. ))
  1959. ]),
  1960. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  1961. ]),
  1962. vue.createElementVNode("view", { class: "upload-card" }, [
  1963. vue.createElementVNode("view", {
  1964. class: "upload-box",
  1965. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  1966. }, [
  1967. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  1968. key: 0,
  1969. src: _ctx.idCardBack,
  1970. class: "preview-img",
  1971. mode: "aspectFill"
  1972. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1973. vue.Fragment,
  1974. { key: 1 },
  1975. [
  1976. (vue.openBlock(), vue.createElementBlock("svg", {
  1977. class: "camera-icon",
  1978. viewBox: "0 0 24 24",
  1979. fill: "none",
  1980. xmlns: "http://www.w3.org/2000/svg"
  1981. }, [
  1982. vue.createElementVNode("path", {
  1983. 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",
  1984. fill: "#CCCCCC"
  1985. })
  1986. ])),
  1987. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1988. ],
  1989. 64
  1990. /* STABLE_FRAGMENT */
  1991. ))
  1992. ]),
  1993. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  1994. ]),
  1995. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1996. vue.createElementVNode("button", {
  1997. class: "next-btn",
  1998. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  1999. }, "下一步,完善资质")
  2000. ]),
  2001. vue.createElementVNode(
  2002. "view",
  2003. {
  2004. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  2005. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2006. },
  2007. [
  2008. vue.createElementVNode("view", {
  2009. class: "picker-content",
  2010. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  2011. }, ["stop"]))
  2012. }, [
  2013. vue.createElementVNode("view", { class: "picker-header" }, [
  2014. vue.createElementVNode("text", {
  2015. class: "picker-btn-cancel",
  2016. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2017. }, "取消"),
  2018. vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
  2019. vue.createElementVNode("text", {
  2020. class: "picker-btn-confirm",
  2021. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  2022. }, "确定")
  2023. ]),
  2024. vue.createElementVNode("picker-view", {
  2025. class: "picker-view",
  2026. "indicator-style": "height: 50px;",
  2027. value: _ctx.pickerValue,
  2028. onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  2029. }, [
  2030. vue.createElementVNode("picker-view-column", null, [
  2031. (vue.openBlock(true), vue.createElementBlock(
  2032. vue.Fragment,
  2033. null,
  2034. vue.renderList(_ctx.years, (item, index) => {
  2035. return vue.openBlock(), vue.createElementBlock(
  2036. "view",
  2037. {
  2038. class: "picker-item",
  2039. key: index
  2040. },
  2041. vue.toDisplayString(item) + "年",
  2042. 1
  2043. /* TEXT */
  2044. );
  2045. }),
  2046. 128
  2047. /* KEYED_FRAGMENT */
  2048. ))
  2049. ]),
  2050. vue.createElementVNode("picker-view-column", null, [
  2051. (vue.openBlock(true), vue.createElementBlock(
  2052. vue.Fragment,
  2053. null,
  2054. vue.renderList(_ctx.months, (item, index) => {
  2055. return vue.openBlock(), vue.createElementBlock(
  2056. "view",
  2057. {
  2058. class: "picker-item",
  2059. key: index
  2060. },
  2061. vue.toDisplayString(item) + "月",
  2062. 1
  2063. /* TEXT */
  2064. );
  2065. }),
  2066. 128
  2067. /* KEYED_FRAGMENT */
  2068. ))
  2069. ]),
  2070. vue.createElementVNode("picker-view-column", null, [
  2071. (vue.openBlock(true), vue.createElementBlock(
  2072. vue.Fragment,
  2073. null,
  2074. vue.renderList(_ctx.days, (item, index) => {
  2075. return vue.openBlock(), vue.createElementBlock(
  2076. "view",
  2077. {
  2078. class: "picker-item",
  2079. key: index
  2080. },
  2081. vue.toDisplayString(item) + "日",
  2082. 1
  2083. /* TEXT */
  2084. );
  2085. }),
  2086. 128
  2087. /* KEYED_FRAGMENT */
  2088. ))
  2089. ])
  2090. ], 40, ["value"])
  2091. ])
  2092. ],
  2093. 2
  2094. /* CLASS */
  2095. )
  2096. ]);
  2097. }
  2098. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2099. const logic$5 = {
  2100. data() {
  2101. return {
  2102. serviceTypes: [],
  2103. // 从上一页传递过来的服务类型列表
  2104. qualifications: {},
  2105. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2106. qualOssIds: {}
  2107. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2108. };
  2109. },
  2110. onLoad(options) {
  2111. if (options.services) {
  2112. try {
  2113. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2114. this.serviceTypes.forEach((item) => {
  2115. this.qualifications[item.name] = this.qualifications[item.name] || [];
  2116. this.qualOssIds[item.name] = this.qualOssIds[item.name] || [];
  2117. });
  2118. } catch (e) {
  2119. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2120. }
  2121. }
  2122. this.restoreQualData();
  2123. },
  2124. methods: {
  2125. saveQualData() {
  2126. try {
  2127. uni.setStorageSync("recruit_qual_data", JSON.stringify({
  2128. qualifications: this.qualifications,
  2129. qualOssIds: this.qualOssIds
  2130. }));
  2131. } catch (e) {
  2132. formatAppLog("error", "at pages/recruit/qualifications_logic.js:35", "保存资质数据失败", e);
  2133. }
  2134. },
  2135. restoreQualData() {
  2136. try {
  2137. const saved = uni.getStorageSync("recruit_qual_data");
  2138. if (saved) {
  2139. const d = JSON.parse(saved);
  2140. this.qualifications = d.qualifications || {};
  2141. this.qualOssIds = d.qualOssIds || {};
  2142. this.$forceUpdate();
  2143. }
  2144. } catch (e) {
  2145. formatAppLog("error", "at pages/recruit/qualifications_logic.js:48", "恢复资质数据失败", e);
  2146. }
  2147. },
  2148. chooseImage(serviceName) {
  2149. uni.chooseImage({
  2150. count: 9,
  2151. sizeType: ["compressed"],
  2152. sourceType: ["album", "camera"],
  2153. success: async (res) => {
  2154. if (!this.qualifications[serviceName]) {
  2155. this.qualifications[serviceName] = [];
  2156. this.qualOssIds[serviceName] = [];
  2157. }
  2158. for (const tempPath of res.tempFilePaths) {
  2159. this.qualifications[serviceName].push(tempPath);
  2160. this.$forceUpdate();
  2161. try {
  2162. const uploadRes = await uploadFile(tempPath);
  2163. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2164. this.saveQualData();
  2165. } catch (err) {
  2166. formatAppLog("error", "at pages/recruit/qualifications_logic.js:70", "上传资质图片失败:", err);
  2167. }
  2168. }
  2169. }
  2170. });
  2171. },
  2172. deleteImage(serviceName, index) {
  2173. this.qualifications[serviceName].splice(index, 1);
  2174. if (this.qualOssIds[serviceName]) {
  2175. this.qualOssIds[serviceName].splice(index, 1);
  2176. }
  2177. this.saveQualData();
  2178. this.$forceUpdate();
  2179. },
  2180. goBackToForm() {
  2181. const pages = getCurrentPages();
  2182. if (pages.length > 2) {
  2183. uni.navigateBack({
  2184. delta: 2
  2185. });
  2186. } else {
  2187. uni.reLaunch({
  2188. url: "/pages/recruit/form"
  2189. });
  2190. }
  2191. },
  2192. async submit() {
  2193. let recruitData = {};
  2194. try {
  2195. const stored = uni.getStorageSync("recruit_form_data");
  2196. if (stored) {
  2197. recruitData = JSON.parse(stored);
  2198. }
  2199. } catch (e) {
  2200. formatAppLog("error", "at pages/recruit/qualifications_logic.js:107", "读取招募表单数据失败", e);
  2201. }
  2202. const allQualOssIds = [];
  2203. Object.values(this.qualOssIds).forEach((ids) => {
  2204. allQualOssIds.push(...ids);
  2205. });
  2206. const auditData = {
  2207. name: recruitData.name || "",
  2208. phone: recruitData.mobile || "",
  2209. password: recruitData.password || "",
  2210. gender: recruitData.gender === 1 ? "0" : "1",
  2211. birthday: recruitData.birthday || "",
  2212. serviceTypes: (recruitData.serviceType || []).join(","),
  2213. // 逗号分隔的服务类型ID
  2214. city: recruitData.areaPath || "",
  2215. stationId: recruitData.stationId || null,
  2216. realName: recruitData.realName || "",
  2217. idCard: recruitData.idNumber || "",
  2218. idValidDate: recruitData.expiryDate || "",
  2219. idCardFront: recruitData.idCardFrontOssId || null,
  2220. idCardBack: recruitData.idCardBackOssId || null,
  2221. qualifications: allQualOssIds.join(",")
  2222. // 逗号分隔的资质图片OSS ID
  2223. };
  2224. uni.showLoading({ title: "提交中..." });
  2225. try {
  2226. await submitAudit(auditData);
  2227. uni.hideLoading();
  2228. const s = encodeURIComponent(recruitData.station || "");
  2229. const n = encodeURIComponent(recruitData.name || "");
  2230. const p = recruitData.mobile || "";
  2231. uni.removeStorageSync("recruit_form_data");
  2232. uni.removeStorageSync("recruit_auth_data");
  2233. uni.removeStorageSync("recruit_qual_data");
  2234. uni.reLaunch({
  2235. url: `/pages/recruit/success?station=${s}&name=${n}&phone=${p}`
  2236. });
  2237. } catch (err) {
  2238. uni.hideLoading();
  2239. formatAppLog("error", "at pages/recruit/qualifications_logic.js:153", "提交申请失败:", err);
  2240. }
  2241. }
  2242. }
  2243. };
  2244. const _sfc_main$z = logic$5;
  2245. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  2246. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2247. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2248. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2249. key: 0,
  2250. class: "empty-state"
  2251. }, [
  2252. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2253. vue.createElementVNode("button", {
  2254. class: "back-btn",
  2255. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2256. }, "返回选择")
  2257. ])) : vue.createCommentVNode("v-if", true),
  2258. (vue.openBlock(true), vue.createElementBlock(
  2259. vue.Fragment,
  2260. null,
  2261. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2262. return vue.openBlock(), vue.createElementBlock("view", {
  2263. class: "qual-card",
  2264. key: item.id
  2265. }, [
  2266. vue.createElementVNode(
  2267. "view",
  2268. { class: "card-title" },
  2269. vue.toDisplayString(item.name) + "服务资质",
  2270. 1
  2271. /* TEXT */
  2272. ),
  2273. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2274. (vue.openBlock(true), vue.createElementBlock(
  2275. vue.Fragment,
  2276. null,
  2277. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2278. return vue.openBlock(), vue.createElementBlock("view", {
  2279. class: "img-item",
  2280. key: imgIndex
  2281. }, [
  2282. vue.createElementVNode("image", {
  2283. src: img,
  2284. class: "preview-img",
  2285. mode: "aspectFill",
  2286. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2287. }, null, 8, ["src", "onClick"]),
  2288. vue.createElementVNode("view", {
  2289. class: "delete-btn",
  2290. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2291. }, "×", 8, ["onClick"])
  2292. ]);
  2293. }),
  2294. 128
  2295. /* KEYED_FRAGMENT */
  2296. )),
  2297. vue.createElementVNode("view", {
  2298. class: "upload-box",
  2299. onClick: ($event) => _ctx.chooseImage(item.name)
  2300. }, [
  2301. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2302. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2303. ], 8, ["onClick"])
  2304. ])
  2305. ]);
  2306. }),
  2307. 128
  2308. /* KEYED_FRAGMENT */
  2309. )),
  2310. vue.createElementVNode("view", { class: "footer-actions" }, [
  2311. vue.createElementVNode("button", {
  2312. class: "submit-btn",
  2313. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2314. }, "立即提交")
  2315. ])
  2316. ]);
  2317. }
  2318. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2319. const logic$4 = {
  2320. data() {
  2321. return {
  2322. station: "",
  2323. name: "",
  2324. phone: ""
  2325. };
  2326. },
  2327. onLoad(options) {
  2328. if (options.station) {
  2329. this.station = decodeURIComponent(options.station);
  2330. }
  2331. if (options.name) {
  2332. this.name = decodeURIComponent(options.name);
  2333. }
  2334. if (options.phone) {
  2335. this.phone = options.phone;
  2336. }
  2337. },
  2338. methods: {
  2339. goHome() {
  2340. uni.reLaunch({
  2341. url: "/pages/login/login"
  2342. });
  2343. }
  2344. }
  2345. };
  2346. const _sfc_main$y = logic$4;
  2347. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2348. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2349. vue.createElementVNode("view", { class: "icon-area" }, [
  2350. (vue.openBlock(), vue.createElementBlock("svg", {
  2351. class: "success-icon",
  2352. viewBox: "0 0 1024 1024",
  2353. version: "1.1",
  2354. xmlns: "http://www.w3.org/2000/svg"
  2355. }, [
  2356. vue.createElementVNode("path", {
  2357. 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",
  2358. fill: "#64D01D"
  2359. }),
  2360. vue.createElementVNode("path", {
  2361. 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",
  2362. fill: "#64D01D"
  2363. })
  2364. ])),
  2365. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2366. ]),
  2367. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2368. vue.createElementVNode("view", { class: "info-card" }, [
  2369. vue.createElementVNode("view", { class: "info-item" }, [
  2370. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2371. vue.createElementVNode(
  2372. "text",
  2373. { class: "value" },
  2374. vue.toDisplayString(_ctx.station),
  2375. 1
  2376. /* TEXT */
  2377. )
  2378. ]),
  2379. vue.createElementVNode("view", { class: "info-item" }, [
  2380. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2381. vue.createElementVNode(
  2382. "text",
  2383. { class: "value" },
  2384. vue.toDisplayString(_ctx.name),
  2385. 1
  2386. /* TEXT */
  2387. )
  2388. ]),
  2389. vue.createElementVNode("view", { class: "info-item" }, [
  2390. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2391. vue.createElementVNode(
  2392. "text",
  2393. { class: "value" },
  2394. vue.toDisplayString(_ctx.phone),
  2395. 1
  2396. /* TEXT */
  2397. )
  2398. ])
  2399. ]),
  2400. vue.createElementVNode("view", {
  2401. class: "footer-btn",
  2402. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2403. }, "我知道了")
  2404. ]);
  2405. }
  2406. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2407. const _sfc_main$x = {
  2408. data() {
  2409. return {
  2410. mobile: "",
  2411. code: "",
  2412. countDown: 0,
  2413. timer: null
  2414. };
  2415. },
  2416. computed: {
  2417. mobileMask() {
  2418. if (!this.mobile)
  2419. return "";
  2420. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2421. }
  2422. },
  2423. onLoad(options) {
  2424. if (options.mobile) {
  2425. this.mobile = options.mobile;
  2426. } else {
  2427. this.mobile = "13412346783";
  2428. }
  2429. },
  2430. methods: {
  2431. getVerifyCode() {
  2432. if (this.countDown > 0)
  2433. return;
  2434. this.countDown = 60;
  2435. this.timer = setInterval(() => {
  2436. this.countDown--;
  2437. if (this.countDown <= 0) {
  2438. clearInterval(this.timer);
  2439. }
  2440. }, 1e3);
  2441. uni.showToast({ title: "验证码已发送", icon: "none" });
  2442. },
  2443. nextStep() {
  2444. if (!this.code) {
  2445. uni.showToast({ title: "请输入验证码", icon: "none" });
  2446. return;
  2447. }
  2448. uni.navigateTo({
  2449. url: "/pages/login/reset-pwd-set"
  2450. });
  2451. }
  2452. }
  2453. };
  2454. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2455. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2456. vue.createElementVNode("view", { class: "content" }, [
  2457. vue.createElementVNode(
  2458. "view",
  2459. { class: "tip-text" },
  2460. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2461. 1
  2462. /* TEXT */
  2463. ),
  2464. vue.createElementVNode("view", { class: "input-group" }, [
  2465. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2466. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2467. vue.withDirectives(vue.createElementVNode(
  2468. "input",
  2469. {
  2470. class: "code-input",
  2471. type: "number",
  2472. maxlength: "6",
  2473. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2474. },
  2475. null,
  2476. 512
  2477. /* NEED_PATCH */
  2478. ), [
  2479. [vue.vModelText, $data.code]
  2480. ]),
  2481. vue.createElementVNode("view", {
  2482. class: "get-code-btn",
  2483. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2484. }, [
  2485. vue.createElementVNode(
  2486. "text",
  2487. { class: "btn-text" },
  2488. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2489. 1
  2490. /* TEXT */
  2491. )
  2492. ])
  2493. ])
  2494. ]),
  2495. vue.createElementVNode("button", {
  2496. class: "next-btn",
  2497. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2498. }, "下一步")
  2499. ])
  2500. ]);
  2501. }
  2502. const PagesLoginResetPwdVerify = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/reset-pwd-verify.vue"]]);
  2503. const _sfc_main$w = {
  2504. data() {
  2505. return {
  2506. pwd1: "",
  2507. pwd2: ""
  2508. };
  2509. },
  2510. methods: {
  2511. confirmReset() {
  2512. if (!this.pwd1 || !this.pwd2) {
  2513. uni.showToast({ title: "请输入密码", icon: "none" });
  2514. return;
  2515. }
  2516. if (this.pwd1 !== this.pwd2) {
  2517. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2518. return;
  2519. }
  2520. uni.showToast({ title: "重置成功", icon: "success" });
  2521. setTimeout(() => {
  2522. uni.navigateBack({
  2523. delta: 2
  2524. // 返回到登录页
  2525. });
  2526. }, 1500);
  2527. }
  2528. }
  2529. };
  2530. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2531. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2532. vue.createElementVNode("view", { class: "content" }, [
  2533. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2534. vue.createElementVNode("view", { class: "input-form" }, [
  2535. vue.createElementVNode("view", { class: "input-row" }, [
  2536. vue.withDirectives(vue.createElementVNode(
  2537. "input",
  2538. {
  2539. class: "pwd-input",
  2540. type: "text",
  2541. password: "",
  2542. placeholder: "限12-20位字母和数字组合",
  2543. "placeholder-style": "color:#ccc",
  2544. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2545. },
  2546. null,
  2547. 512
  2548. /* NEED_PATCH */
  2549. ), [
  2550. [vue.vModelText, $data.pwd1]
  2551. ])
  2552. ]),
  2553. vue.createElementVNode("view", { class: "divider" }),
  2554. vue.createElementVNode("view", { class: "input-row" }, [
  2555. vue.withDirectives(vue.createElementVNode(
  2556. "input",
  2557. {
  2558. class: "pwd-input",
  2559. type: "text",
  2560. password: "",
  2561. placeholder: "限12-20位字母和数字组合",
  2562. "placeholder-style": "color:#ccc",
  2563. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2564. },
  2565. null,
  2566. 512
  2567. /* NEED_PATCH */
  2568. ), [
  2569. [vue.vModelText, $data.pwd2]
  2570. ])
  2571. ]),
  2572. vue.createElementVNode("view", { class: "divider" })
  2573. ]),
  2574. vue.createElementVNode("button", {
  2575. class: "confirm-btn",
  2576. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2577. }, "确定")
  2578. ])
  2579. ]);
  2580. }
  2581. const PagesLoginResetPwdSet = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/reset-pwd-set.vue"]]);
  2582. function cancelOrderApi(data) {
  2583. return request({
  2584. url: "/order/subOrder/cancel",
  2585. method: "PUT",
  2586. data
  2587. });
  2588. }
  2589. function rejectOrderApi(data) {
  2590. return request({
  2591. url: "/order/subOrder/reject",
  2592. method: "PUT",
  2593. data
  2594. });
  2595. }
  2596. function getPendingOrders(params) {
  2597. return request({
  2598. url: "/order/subOrder/listPendingAccept",
  2599. method: "GET",
  2600. data: params
  2601. });
  2602. }
  2603. function acceptOrder(orderId) {
  2604. return request({
  2605. url: "/order/subOrder/accept",
  2606. method: "PUT",
  2607. data: { orderId }
  2608. });
  2609. }
  2610. function getOrderCount() {
  2611. return request({
  2612. url: "/order/subOrder/count",
  2613. method: "GET"
  2614. });
  2615. }
  2616. function getStatisticOrders(params) {
  2617. return request({
  2618. url: "/order/subOrder/listOnStatistic",
  2619. method: "GET",
  2620. data: params
  2621. });
  2622. }
  2623. function getMyOrders(params) {
  2624. return request({
  2625. url: "/order/subOrder/listOnMyOrder",
  2626. method: "GET",
  2627. data: params
  2628. });
  2629. }
  2630. function getOrderInfo(id) {
  2631. return request({
  2632. url: `/order/subOrder/getInfo?id=${id}`,
  2633. method: "GET"
  2634. });
  2635. }
  2636. function clockIn(data) {
  2637. return request({
  2638. url: "/order/subOrder/clockIn",
  2639. method: "PUT",
  2640. data
  2641. });
  2642. }
  2643. function submitNursingSummary(data) {
  2644. return request({
  2645. url: "/order/subOrder/nursingSummary",
  2646. method: "PUT",
  2647. data
  2648. });
  2649. }
  2650. const _sfc_main$v = {
  2651. __name: "index",
  2652. props: {
  2653. currentPath: {
  2654. type: String,
  2655. required: true
  2656. }
  2657. },
  2658. setup(__props, { expose: __expose }) {
  2659. __expose();
  2660. const props = __props;
  2661. const list = vue.ref([
  2662. {
  2663. pagePath: "pages/home/index",
  2664. text: "任务中心",
  2665. iconPath: "/static/tabbar/home.svg",
  2666. selectedIconPath: "/static/tabbar/home-active.svg"
  2667. },
  2668. {
  2669. pagePath: "pages/orders/index",
  2670. text: "我的订单",
  2671. iconPath: "/static/tabbar/order.svg",
  2672. selectedIconPath: "/static/tabbar/order-active.svg"
  2673. },
  2674. {
  2675. pagePath: "pages/mine/index",
  2676. text: "我的",
  2677. iconPath: "/static/tabbar/mine.svg",
  2678. selectedIconPath: "/static/tabbar/mine-active.svg"
  2679. }
  2680. ]);
  2681. const switchTab = (path) => {
  2682. if (props.currentPath === path)
  2683. return;
  2684. uni.switchTab({
  2685. url: "/" + path
  2686. });
  2687. };
  2688. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2689. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2690. return __returned__;
  2691. }
  2692. };
  2693. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2694. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2695. vue.createElementVNode("view", { class: "tabbar-border" }),
  2696. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2697. (vue.openBlock(true), vue.createElementBlock(
  2698. vue.Fragment,
  2699. null,
  2700. vue.renderList($setup.list, (item, index) => {
  2701. return vue.openBlock(), vue.createElementBlock("view", {
  2702. class: "tabbar-item",
  2703. key: index,
  2704. onClick: ($event) => $setup.switchTab(item.pagePath)
  2705. }, [
  2706. vue.createElementVNode("image", {
  2707. class: "tabbar-icon",
  2708. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2709. }, null, 8, ["src"]),
  2710. vue.createElementVNode(
  2711. "view",
  2712. {
  2713. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2714. },
  2715. vue.toDisplayString(item.text),
  2716. 3
  2717. /* TEXT, CLASS */
  2718. )
  2719. ], 8, ["onClick"]);
  2720. }),
  2721. 128
  2722. /* KEYED_FRAGMENT */
  2723. ))
  2724. ])
  2725. ]);
  2726. }
  2727. const customTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-52454e90"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/custom-tabbar/index.vue"]]);
  2728. const logic$3 = {
  2729. components: {
  2730. customTabbar
  2731. },
  2732. data() {
  2733. return {
  2734. taskList: [],
  2735. currentFilter: "default",
  2736. // default, distance, time
  2737. filterCondition: "筛选条件",
  2738. sortDistance: "asc",
  2739. // asc, desc
  2740. sortTime: "asc",
  2741. scrollTop: 0,
  2742. // Track scroll position
  2743. isFilterShow: false,
  2744. tempFilter: {
  2745. service: null,
  2746. distance: "全部",
  2747. amount: "全部"
  2748. },
  2749. activeFilter: {
  2750. service: null,
  2751. distance: "全部",
  2752. amount: "全部"
  2753. },
  2754. workStatus: "resting",
  2755. // resting | busy | disabled
  2756. showConfirmModal: false,
  2757. showPetModal: false,
  2758. currentPetInfo: {},
  2759. showRejectModal: false,
  2760. rejectReason: "",
  2761. currentOrder: null,
  2762. showAcceptConfirmModal: false,
  2763. showNavModal: false,
  2764. navTargetItem: null,
  2765. navTargetPointType: "",
  2766. profile: null,
  2767. profileLoading: false,
  2768. serviceList: [],
  2769. orderStats: {
  2770. total: 0,
  2771. reject: 0,
  2772. completed: 0,
  2773. price: 0
  2774. }
  2775. };
  2776. },
  2777. onPageScroll(e) {
  2778. this.scrollTop = e.scrollTop;
  2779. },
  2780. async onLoad() {
  2781. this.checkWorkStatus();
  2782. await this.loadServiceList();
  2783. this.loadTaskList();
  2784. reportGps(true).catch((e) => formatAppLog("log", "at pages/home/logic.js:64", "Init GPS check skipped", e));
  2785. },
  2786. onShow() {
  2787. uni.hideTabBar();
  2788. this.checkWorkStatus();
  2789. if (isLoggedIn()) {
  2790. this.loadProfile();
  2791. this.loadOrderStats();
  2792. this.loadTaskList();
  2793. this.loadServiceList();
  2794. }
  2795. },
  2796. async onPullDownRefresh() {
  2797. this.checkWorkStatus();
  2798. try {
  2799. await this.loadServiceList();
  2800. const tasks = [
  2801. this.loadTaskList()
  2802. ];
  2803. if (isLoggedIn()) {
  2804. tasks.push(this.loadProfile());
  2805. tasks.push(this.loadOrderStats());
  2806. }
  2807. await Promise.all(tasks);
  2808. } catch (err) {
  2809. formatAppLog("error", "at pages/home/logic.js:94", "刷新异常:", err);
  2810. } finally {
  2811. uni.stopPullDownRefresh();
  2812. uni.showToast({ title: "刷新成功", icon: "success" });
  2813. }
  2814. },
  2815. methods: {
  2816. async loadProfile() {
  2817. if (this.profileLoading)
  2818. return;
  2819. this.profileLoading = true;
  2820. try {
  2821. const res = await getMyProfile();
  2822. const data = res.data || null;
  2823. if (data) {
  2824. if (data.status) {
  2825. this.workStatus = data.status;
  2826. uni.setStorageSync("workStatus", data.status);
  2827. }
  2828. if (data.stationId) {
  2829. try {
  2830. const stationRes = await getAreaStationList();
  2831. const list = stationRes.data || [];
  2832. const currentStation = list.find((i) => i.id === data.stationId);
  2833. if (currentStation) {
  2834. let node = currentStation;
  2835. while (node && node.parentId !== 0) {
  2836. let parent = list.find((i) => i.id === node.parentId);
  2837. if (parent) {
  2838. node = parent;
  2839. } else {
  2840. break;
  2841. }
  2842. }
  2843. data.cityName = node.name;
  2844. }
  2845. } catch (e) {
  2846. formatAppLog("error", "at pages/home/logic.js:136", "溯源城市失败:", e);
  2847. }
  2848. }
  2849. }
  2850. this.profile = data;
  2851. } catch (err) {
  2852. formatAppLog("error", "at pages/home/logic.js:143", "获取个人信息失败:", err);
  2853. } finally {
  2854. this.profileLoading = false;
  2855. }
  2856. },
  2857. async loadServiceList() {
  2858. try {
  2859. const res = await listAllService();
  2860. this.serviceList = res.data || [];
  2861. } catch (err) {
  2862. formatAppLog("error", "at pages/home/logic.js:153", "获取服务类型失败:", err);
  2863. }
  2864. },
  2865. async loadOrderStats() {
  2866. try {
  2867. const res = await getOrderCount();
  2868. this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
  2869. } catch (err) {
  2870. formatAppLog("error", "at pages/home/logic.js:161", "获取订单统计失败:", err);
  2871. }
  2872. },
  2873. checkWorkStatus() {
  2874. const status = uni.getStorageSync("workStatus");
  2875. if (status) {
  2876. this.workStatus = status;
  2877. } else {
  2878. this.workStatus = "resting";
  2879. uni.setStorageSync("workStatus", "resting");
  2880. }
  2881. },
  2882. toggleFilter() {
  2883. if (this.workStatus === "resting")
  2884. return;
  2885. this.isFilterShow = !this.isFilterShow;
  2886. },
  2887. goToWorkStatus() {
  2888. uni.navigateTo({
  2889. url: "/pages/home/work-status"
  2890. });
  2891. },
  2892. async handleManualLocation() {
  2893. try {
  2894. uni.showLoading({ title: "定位获取中...", mask: true });
  2895. await reportGps(true);
  2896. uni.showToast({ title: "位置已更新", icon: "success" });
  2897. } catch (e) {
  2898. formatAppLog("error", "at pages/home/logic.js:189", "Manual location failed", e);
  2899. } finally {
  2900. uni.hideLoading();
  2901. }
  2902. },
  2903. startWork() {
  2904. this.showConfirmModal = true;
  2905. },
  2906. confirmStartWork() {
  2907. this.workStatus = "busy";
  2908. uni.setStorageSync("workStatus", "busy");
  2909. this.loadTaskList();
  2910. this.showConfirmModal = false;
  2911. uni.showToast({ title: "已开始接单", icon: "success" });
  2912. },
  2913. closeConfirmModal() {
  2914. this.showConfirmModal = false;
  2915. },
  2916. showPetProfile(item) {
  2917. this.currentPetInfo = item;
  2918. this.showPetModal = true;
  2919. },
  2920. closePetProfile() {
  2921. this.showPetModal = false;
  2922. },
  2923. openRejectModal(item) {
  2924. this.currentOrder = item;
  2925. this.rejectReason = "";
  2926. this.showRejectModal = true;
  2927. },
  2928. closeRejectModal() {
  2929. this.showRejectModal = false;
  2930. this.currentOrder = null;
  2931. },
  2932. async confirmReject() {
  2933. var _a;
  2934. if (!this.rejectReason.trim()) {
  2935. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2936. return;
  2937. }
  2938. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2939. return;
  2940. try {
  2941. uni.showLoading({ title: "提交中...", mask: true });
  2942. await rejectOrderApi({
  2943. orderId: this.currentOrder.id,
  2944. rejectReason: this.rejectReason
  2945. });
  2946. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2947. this.showRejectModal = false;
  2948. this.currentOrder = null;
  2949. this.loadTaskList();
  2950. this.loadOrderStats();
  2951. } catch (err) {
  2952. formatAppLog("error", "at pages/home/logic.js:241", "拒绝接单失败:", err);
  2953. uni.showToast({ title: "操作失败", icon: "none" });
  2954. } finally {
  2955. uni.hideLoading();
  2956. }
  2957. },
  2958. openAcceptModal(item) {
  2959. this.currentOrder = item;
  2960. this.showAcceptConfirmModal = true;
  2961. },
  2962. closeAcceptModal() {
  2963. this.showAcceptConfirmModal = false;
  2964. this.currentOrder = null;
  2965. },
  2966. async confirmAccept() {
  2967. var _a;
  2968. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2969. return;
  2970. try {
  2971. await acceptOrder(this.currentOrder.id);
  2972. uni.showToast({ title: "接单成功", icon: "success" });
  2973. this.showAcceptConfirmModal = false;
  2974. this.currentOrder = null;
  2975. this.loadTaskList();
  2976. this.loadProfile();
  2977. this.loadOrderStats();
  2978. } catch (err) {
  2979. formatAppLog("error", "at pages/home/logic.js:266", "接单失败:", err);
  2980. uni.showToast({ title: "接单失败", icon: "none" });
  2981. }
  2982. },
  2983. openNavigation(item, pointType) {
  2984. this.navTargetItem = item;
  2985. this.navTargetPointType = pointType;
  2986. this.showNavModal = true;
  2987. },
  2988. closeNavModal() {
  2989. this.showNavModal = false;
  2990. },
  2991. chooseMap(mapType) {
  2992. let item = this.navTargetItem;
  2993. let pointType = this.navTargetPointType;
  2994. let name = pointType === "start" ? item.fromAddress || "起点" : item.toAddress || "终点";
  2995. let address = pointType === "start" ? item.fromAddress || "起点地址" : item.toAddress || "终点地址";
  2996. let latitude = pointType === "start" ? Number(item.fromLat) : Number(item.toLat);
  2997. let longitude = pointType === "start" ? Number(item.fromLng) : Number(item.toLng);
  2998. this.showNavModal = false;
  2999. const navigateTo = (lat, lng, addrName, addrDesc) => {
  3000. uni.openLocation({
  3001. latitude: lat,
  3002. longitude: lng,
  3003. name: addrName,
  3004. address: addrDesc || "无法获取详细地址",
  3005. success: function() {
  3006. formatAppLog("log", "at pages/home/logic.js:297", "打开导航成功: " + mapType);
  3007. },
  3008. fail: function(err) {
  3009. formatAppLog("error", "at pages/home/logic.js:300", "打开导航失败:", err);
  3010. uni.showToast({ title: "打开地图失败", icon: "none" });
  3011. }
  3012. });
  3013. };
  3014. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  3015. navigateTo(latitude, longitude, name, address);
  3016. } else {
  3017. uni.showLoading({ title: "获取当前位置...", mask: true });
  3018. uni.getLocation({
  3019. type: "gcj02",
  3020. success: (res) => {
  3021. uni.hideLoading();
  3022. navigateTo(res.latitude, res.longitude, name, address);
  3023. },
  3024. fail: (err) => {
  3025. uni.hideLoading();
  3026. formatAppLog("error", "at pages/home/logic.js:321", "获取地理位置失败:", err);
  3027. uni.showToast({ title: "无法获取当前位置信息", icon: "none" });
  3028. }
  3029. });
  3030. }
  3031. },
  3032. selectService(type) {
  3033. this.tempFilter.service = type;
  3034. },
  3035. selectDistance(type) {
  3036. this.tempFilter.distance = type;
  3037. },
  3038. selectAmount(type) {
  3039. this.tempFilter.amount = type;
  3040. },
  3041. resetFilter() {
  3042. this.tempFilter = {
  3043. service: null,
  3044. distance: "全部",
  3045. amount: "全部"
  3046. };
  3047. },
  3048. confirmFilter() {
  3049. this.activeFilter = { ...this.tempFilter };
  3050. this.isFilterShow = false;
  3051. this.loadTaskList();
  3052. },
  3053. closeFilter() {
  3054. this.isFilterShow = false;
  3055. },
  3056. goToDetail(item) {
  3057. formatAppLog("log", "at pages/home/logic.js:352", "Go to detail", item);
  3058. },
  3059. async loadTaskList() {
  3060. try {
  3061. const params = {
  3062. service: this.activeFilter.service,
  3063. minPrice: this.getMinPrice(),
  3064. maxPrice: this.getMaxPrice(),
  3065. pageNum: 1,
  3066. pageSize: 20
  3067. };
  3068. const res = await getPendingOrders(params);
  3069. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  3070. } catch (err) {
  3071. formatAppLog("error", "at pages/home/logic.js:366", "获取订单列表失败:", err);
  3072. uni.showToast({ title: "加载失败", icon: "none" });
  3073. this.taskList = [];
  3074. }
  3075. },
  3076. getMinPrice() {
  3077. const amount = this.activeFilter.amount;
  3078. if (amount === "100以下")
  3079. return 0;
  3080. if (amount === "100-200")
  3081. return 1e4;
  3082. if (amount === "200-500")
  3083. return 2e4;
  3084. if (amount === "500以上")
  3085. return 5e4;
  3086. return void 0;
  3087. },
  3088. getMaxPrice() {
  3089. const amount = this.activeFilter.amount;
  3090. if (amount === "100以下")
  3091. return 1e4;
  3092. if (amount === "100-200")
  3093. return 2e4;
  3094. if (amount === "200-500")
  3095. return 5e4;
  3096. return void 0;
  3097. },
  3098. transformOrder(item) {
  3099. const service = this.serviceList.find((s) => s.id === item.service);
  3100. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3101. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3102. const mode = (service == null ? void 0 : service.mode) || 0;
  3103. const isRoundTrip = mode === 1;
  3104. return {
  3105. id: item.id,
  3106. type: isRoundTrip ? 1 : item.service,
  3107. typeText: serviceText,
  3108. typeIcon: serviceIcon,
  3109. price: (item.price / 100).toFixed(2),
  3110. timeLabel: "服务时间",
  3111. time: item.serviceTime,
  3112. petAvatar: item.petAvatar || "/static/dog.png",
  3113. petAvatarUrl: item.petAvatarUrl || "",
  3114. petName: item.petName,
  3115. petBreed: item.breed,
  3116. petGender: "M",
  3117. petAge: "",
  3118. petWeight: "",
  3119. petPersonality: "",
  3120. petHobby: "",
  3121. petRemark: "",
  3122. petTags: [],
  3123. petLogs: [],
  3124. startLocation: item.fromAddress || "暂无起点",
  3125. startAddress: item.fromAddress || "",
  3126. fromAddress: item.fromAddress || "",
  3127. fromLat: item.fromLat,
  3128. fromLng: item.fromLng,
  3129. startDistance: "0km",
  3130. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  3131. endAddress: item.toAddress || "",
  3132. toAddress: item.toAddress || "",
  3133. toLat: item.toLat,
  3134. toLng: item.toLng,
  3135. endDistance: "0km",
  3136. serviceContent: "",
  3137. remark: item.remark || ""
  3138. };
  3139. },
  3140. setFilter(type) {
  3141. this.currentFilter = type;
  3142. if (type === "distance") {
  3143. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  3144. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  3145. } else if (type === "time") {
  3146. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  3147. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  3148. }
  3149. },
  3150. showFilterDropdown() {
  3151. this.toggleFilter();
  3152. }
  3153. }
  3154. };
  3155. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  3156. const _sfc_main$u = {
  3157. ...logic$3
  3158. };
  3159. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  3160. var _a, _b, _c;
  3161. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  3162. return vue.openBlock(), vue.createElementBlock(
  3163. vue.Fragment,
  3164. null,
  3165. [
  3166. vue.createElementVNode("view", { class: "container" }, [
  3167. vue.createElementVNode(
  3168. "view",
  3169. {
  3170. class: "custom-nav-bar",
  3171. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3172. },
  3173. [
  3174. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3175. ],
  3176. 4
  3177. /* STYLE */
  3178. ),
  3179. vue.createElementVNode("view", { class: "nav-bg" }, [
  3180. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3181. vue.createElementVNode("view", { class: "bg-circle-right" })
  3182. ]),
  3183. vue.createElementVNode("view", { class: "header-section" }, [
  3184. vue.createElementVNode("view", { class: "user-info" }, [
  3185. vue.createElementVNode("image", {
  3186. class: "avatar",
  3187. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3188. mode: "aspectFill"
  3189. }, null, 8, ["src"]),
  3190. vue.createElementVNode("view", { class: "info-content" }, [
  3191. vue.createElementVNode("view", { class: "top-row" }, [
  3192. vue.createElementVNode(
  3193. "text",
  3194. { class: "name" },
  3195. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3196. 1
  3197. /* TEXT */
  3198. ),
  3199. vue.createElementVNode(
  3200. "view",
  3201. {
  3202. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus !== "busy" }]),
  3203. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3204. },
  3205. [
  3206. vue.createElementVNode(
  3207. "view",
  3208. {
  3209. class: vue.normalizeClass(["status-dot-bg", { "busy": _ctx.workStatus === "busy", "disabled": _ctx.workStatus === "disabled" }])
  3210. },
  3211. [
  3212. _ctx.workStatus === "busy" ? (vue.openBlock(), vue.createElementBlock("text", {
  3213. key: 0,
  3214. class: "check-mark"
  3215. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3216. key: 1,
  3217. class: "check-mark",
  3218. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3219. }, "✕"))
  3220. ],
  3221. 2
  3222. /* CLASS */
  3223. ),
  3224. vue.createElementVNode(
  3225. "text",
  3226. { class: "status-text" },
  3227. vue.toDisplayString(_ctx.workStatus === "busy" ? "接单中" : _ctx.workStatus === "resting" ? "正在休息" : "已禁用"),
  3228. 1
  3229. /* TEXT */
  3230. ),
  3231. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3232. ],
  3233. 2
  3234. /* CLASS */
  3235. )
  3236. ]),
  3237. vue.createElementVNode("view", {
  3238. class: "bottom-row",
  3239. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleManualLocation && _ctx.handleManualLocation(...args))
  3240. }, [
  3241. vue.createElementVNode(
  3242. "text",
  3243. { class: "city-label" },
  3244. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3245. 1
  3246. /* TEXT */
  3247. ),
  3248. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3249. ])
  3250. ])
  3251. ]),
  3252. vue.createElementVNode("view", { class: "stats-card" }, [
  3253. vue.createElementVNode("view", { class: "stat-item" }, [
  3254. vue.createElementVNode(
  3255. "text",
  3256. { class: "num" },
  3257. vue.toDisplayString(_ctx.orderStats.total),
  3258. 1
  3259. /* TEXT */
  3260. ),
  3261. vue.createElementVNode("text", { class: "label" }, "全部订单")
  3262. ]),
  3263. vue.createElementVNode("view", { class: "divider" }),
  3264. vue.createElementVNode("view", { class: "stat-item" }, [
  3265. vue.createElementVNode(
  3266. "text",
  3267. { class: "num" },
  3268. vue.toDisplayString(_ctx.orderStats.reject),
  3269. 1
  3270. /* TEXT */
  3271. ),
  3272. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3273. ]),
  3274. vue.createElementVNode("view", { class: "divider" }),
  3275. vue.createElementVNode("view", { class: "stat-item" }, [
  3276. vue.createElementVNode(
  3277. "text",
  3278. { class: "num" },
  3279. vue.toDisplayString(_ctx.orderStats.completed),
  3280. 1
  3281. /* TEXT */
  3282. ),
  3283. vue.createElementVNode("text", { class: "label" }, "完成订单")
  3284. ]),
  3285. vue.createElementVNode("view", { class: "divider" }),
  3286. vue.createElementVNode("view", { class: "stat-item" }, [
  3287. vue.createElementVNode(
  3288. "text",
  3289. { class: "num" },
  3290. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  3291. 1
  3292. /* TEXT */
  3293. ),
  3294. vue.createElementVNode("text", { class: "label" }, "服务总得")
  3295. ])
  3296. ])
  3297. ]),
  3298. vue.createElementVNode("view", { class: "task-header" }, [
  3299. vue.createElementVNode(
  3300. "view",
  3301. {
  3302. class: "header-inner",
  3303. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3304. },
  3305. [
  3306. vue.createElementVNode("view", { class: "left-title" }, [
  3307. vue.createElementVNode("view", { class: "orange-bar" }),
  3308. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3309. vue.createElementVNode(
  3310. "text",
  3311. { class: "count" },
  3312. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3313. 1
  3314. /* TEXT */
  3315. )
  3316. ]),
  3317. vue.createElementVNode("view", { class: "filter-options" }, [
  3318. vue.createElementVNode("view", {
  3319. class: "dropdown",
  3320. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3321. }, [
  3322. vue.createElementVNode("text", null, "筛选条件"),
  3323. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3324. ])
  3325. ])
  3326. ],
  3327. 4
  3328. /* STYLE */
  3329. ),
  3330. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3331. key: 0,
  3332. class: "filter-mask",
  3333. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3334. })) : vue.createCommentVNode("v-if", true),
  3335. vue.createElementVNode(
  3336. "view",
  3337. {
  3338. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3339. },
  3340. [
  3341. vue.createElementVNode("view", { class: "filter-section" }, [
  3342. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3343. vue.createElementVNode("view", { class: "options-grid" }, [
  3344. vue.createElementVNode(
  3345. "view",
  3346. {
  3347. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3348. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectService(null))
  3349. },
  3350. "全部",
  3351. 2
  3352. /* CLASS */
  3353. ),
  3354. (vue.openBlock(true), vue.createElementBlock(
  3355. vue.Fragment,
  3356. null,
  3357. vue.renderList(_ctx.serviceList, (item) => {
  3358. return vue.openBlock(), vue.createElementBlock("view", {
  3359. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3360. key: item.id,
  3361. onClick: ($event) => _ctx.selectService(item.id)
  3362. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3363. }),
  3364. 128
  3365. /* KEYED_FRAGMENT */
  3366. ))
  3367. ])
  3368. ]),
  3369. vue.createElementVNode("view", { class: "filter-section" }, [
  3370. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3371. vue.createElementVNode("view", { class: "options-grid" }, [
  3372. vue.createElementVNode(
  3373. "view",
  3374. {
  3375. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3376. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("全部"))
  3377. },
  3378. "全部",
  3379. 2
  3380. /* CLASS */
  3381. ),
  3382. vue.createElementVNode(
  3383. "view",
  3384. {
  3385. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3386. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100以下"))
  3387. },
  3388. "100以下",
  3389. 2
  3390. /* CLASS */
  3391. ),
  3392. vue.createElementVNode(
  3393. "view",
  3394. {
  3395. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3396. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("100-200"))
  3397. },
  3398. "100-200",
  3399. 2
  3400. /* CLASS */
  3401. ),
  3402. vue.createElementVNode(
  3403. "view",
  3404. {
  3405. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3406. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("200-500"))
  3407. },
  3408. "200-500",
  3409. 2
  3410. /* CLASS */
  3411. ),
  3412. vue.createElementVNode(
  3413. "view",
  3414. {
  3415. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3416. onClick: _cache[9] || (_cache[9] = ($event) => _ctx.selectAmount("500以上"))
  3417. },
  3418. "500以上",
  3419. 2
  3420. /* CLASS */
  3421. )
  3422. ])
  3423. ]),
  3424. vue.createElementVNode("view", { class: "filter-actions" }, [
  3425. vue.createElementVNode("button", {
  3426. class: "action-btn reset",
  3427. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3428. }, "重置"),
  3429. vue.createElementVNode("button", {
  3430. class: "action-btn confirm",
  3431. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3432. }, "确认")
  3433. ])
  3434. ],
  3435. 2
  3436. /* CLASS */
  3437. )
  3438. ]),
  3439. vue.createElementVNode("view", { class: "task-list-container" }, [
  3440. vue.createElementVNode("view", { class: "task-list" }, [
  3441. (vue.openBlock(true), vue.createElementBlock(
  3442. vue.Fragment,
  3443. null,
  3444. vue.renderList(_ctx.taskList, (item) => {
  3445. return vue.openBlock(), vue.createElementBlock("view", {
  3446. class: "task-card",
  3447. key: item.id,
  3448. onClick: ($event) => _ctx.goToDetail(item)
  3449. }, [
  3450. vue.createElementVNode("view", { class: "card-header" }, [
  3451. vue.createElementVNode("view", { class: "type-badge" }, [
  3452. vue.createElementVNode("image", {
  3453. class: "type-icon",
  3454. src: item.typeIcon
  3455. }, null, 8, ["src"]),
  3456. vue.createElementVNode(
  3457. "text",
  3458. { class: "type-text" },
  3459. vue.toDisplayString(item.typeText),
  3460. 1
  3461. /* TEXT */
  3462. )
  3463. ]),
  3464. vue.createElementVNode(
  3465. "text",
  3466. { class: "price" },
  3467. "¥" + vue.toDisplayString(item.price),
  3468. 1
  3469. /* TEXT */
  3470. )
  3471. ]),
  3472. vue.createElementVNode("view", { class: "card-body" }, [
  3473. vue.createElementVNode("view", { class: "time-row" }, [
  3474. vue.createElementVNode(
  3475. "text",
  3476. { class: "label" },
  3477. vue.toDisplayString(item.timeLabel) + ":",
  3478. 1
  3479. /* TEXT */
  3480. ),
  3481. vue.createElementVNode(
  3482. "text",
  3483. { class: "value" },
  3484. vue.toDisplayString(item.time),
  3485. 1
  3486. /* TEXT */
  3487. )
  3488. ]),
  3489. vue.createElementVNode("view", { class: "pet-card" }, [
  3490. vue.createElementVNode("image", {
  3491. class: "pet-avatar",
  3492. src: item.petAvatarUrl || item.petAvatar,
  3493. mode: "aspectFill"
  3494. }, null, 8, ["src"]),
  3495. vue.createElementVNode("view", { class: "pet-info" }, [
  3496. vue.createElementVNode(
  3497. "text",
  3498. { class: "pet-name" },
  3499. vue.toDisplayString(item.petName),
  3500. 1
  3501. /* TEXT */
  3502. ),
  3503. vue.createElementVNode(
  3504. "text",
  3505. { class: "pet-breed" },
  3506. "品种: " + vue.toDisplayString(item.petBreed),
  3507. 1
  3508. /* TEXT */
  3509. )
  3510. ])
  3511. ]),
  3512. vue.createElementVNode("view", { class: "route-info" }, [
  3513. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3514. vue.Fragment,
  3515. { key: 0 },
  3516. [
  3517. vue.createElementVNode("view", {
  3518. class: "route-item",
  3519. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3520. }, [
  3521. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  3522. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3523. vue.createElementVNode("view", { class: "address-box" }, [
  3524. vue.createElementVNode(
  3525. "text",
  3526. { class: "addr-title" },
  3527. vue.toDisplayString(item.startLocation),
  3528. 1
  3529. /* TEXT */
  3530. ),
  3531. vue.createElementVNode(
  3532. "text",
  3533. { class: "addr-desc" },
  3534. vue.toDisplayString(item.startAddress),
  3535. 1
  3536. /* TEXT */
  3537. )
  3538. ]),
  3539. vue.createElementVNode("image", {
  3540. class: "nav-arrow",
  3541. src: _imports_3$2,
  3542. style: { "flex-shrink": "0", "align-self": "center" }
  3543. })
  3544. ], 8, ["onClick"]),
  3545. vue.createElementVNode("view", {
  3546. class: "route-item",
  3547. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3548. }, [
  3549. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  3550. vue.createElementVNode("view", { class: "address-box" }, [
  3551. vue.createElementVNode(
  3552. "text",
  3553. { class: "addr-title" },
  3554. vue.toDisplayString(item.endLocation),
  3555. 1
  3556. /* TEXT */
  3557. ),
  3558. vue.createElementVNode(
  3559. "text",
  3560. { class: "addr-desc" },
  3561. vue.toDisplayString(item.endAddress),
  3562. 1
  3563. /* TEXT */
  3564. )
  3565. ]),
  3566. vue.createElementVNode("image", {
  3567. class: "nav-arrow",
  3568. src: _imports_3$2,
  3569. style: { "flex-shrink": "0", "align-self": "center" }
  3570. })
  3571. ], 8, ["onClick"])
  3572. ],
  3573. 64
  3574. /* STABLE_FRAGMENT */
  3575. )) : (vue.openBlock(), vue.createElementBlock(
  3576. vue.Fragment,
  3577. { key: 1 },
  3578. [
  3579. vue.createElementVNode("view", {
  3580. class: "route-item",
  3581. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3582. }, [
  3583. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3584. vue.createElementVNode("view", { class: "address-box" }, [
  3585. vue.createElementVNode(
  3586. "text",
  3587. { class: "addr-title" },
  3588. vue.toDisplayString(item.endLocation),
  3589. 1
  3590. /* TEXT */
  3591. ),
  3592. vue.createElementVNode(
  3593. "text",
  3594. { class: "addr-desc" },
  3595. vue.toDisplayString(item.endAddress),
  3596. 1
  3597. /* TEXT */
  3598. )
  3599. ]),
  3600. vue.createElementVNode("image", {
  3601. class: "nav-arrow",
  3602. src: _imports_3$2,
  3603. style: { "flex-shrink": "0", "align-self": "center" }
  3604. })
  3605. ], 8, ["onClick"]),
  3606. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3607. key: 0,
  3608. class: "service-content"
  3609. }, [
  3610. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3611. vue.createElementVNode(
  3612. "text",
  3613. null,
  3614. vue.toDisplayString(item.serviceContent),
  3615. 1
  3616. /* TEXT */
  3617. )
  3618. ])) : vue.createCommentVNode("v-if", true)
  3619. ],
  3620. 64
  3621. /* STABLE_FRAGMENT */
  3622. ))
  3623. ]),
  3624. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3625. key: 0,
  3626. class: "remark-box"
  3627. }, [
  3628. vue.createElementVNode(
  3629. "text",
  3630. null,
  3631. "备注:" + vue.toDisplayString(item.remark),
  3632. 1
  3633. /* TEXT */
  3634. )
  3635. ])) : vue.createCommentVNode("v-if", true)
  3636. ]),
  3637. vue.createElementVNode("view", { class: "action-btns" }, [
  3638. vue.createElementVNode("button", {
  3639. class: "btn reject",
  3640. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3641. }, "拒绝", 8, ["onClick"]),
  3642. vue.createElementVNode("button", {
  3643. class: "btn accept",
  3644. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3645. }, "接单", 8, ["onClick"])
  3646. ])
  3647. ], 8, ["onClick"]);
  3648. }),
  3649. 128
  3650. /* KEYED_FRAGMENT */
  3651. )),
  3652. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3653. ])
  3654. ]),
  3655. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3656. key: 0,
  3657. class: "modal-mask"
  3658. }, [
  3659. vue.createElementVNode("view", { class: "custom-modal" }, [
  3660. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3661. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3662. vue.createElementVNode("view", { class: "modal-btns" }, [
  3663. vue.createElementVNode("button", {
  3664. class: "modal-btn cancel",
  3665. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3666. }, "取消"),
  3667. vue.createElementVNode("button", {
  3668. class: "modal-btn confirm",
  3669. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3670. }, "确定")
  3671. ])
  3672. ])
  3673. ])) : vue.createCommentVNode("v-if", true),
  3674. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3675. key: 1,
  3676. class: "pet-modal-mask",
  3677. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3678. }, [
  3679. vue.createElementVNode("view", {
  3680. class: "pet-modal-content",
  3681. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  3682. }, ["stop"]))
  3683. }, [
  3684. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3685. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3686. vue.createElementVNode("view", {
  3687. class: "close-icon-btn",
  3688. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3689. }, "×")
  3690. ]),
  3691. vue.createElementVNode("scroll-view", {
  3692. "scroll-y": "",
  3693. class: "pet-modal-scroll"
  3694. }, [
  3695. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3696. vue.createElementVNode("image", {
  3697. class: "pm-avatar",
  3698. src: _ctx.currentPetInfo.petAvatar,
  3699. mode: "aspectFill"
  3700. }, null, 8, ["src"]),
  3701. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3702. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3703. vue.createElementVNode(
  3704. "text",
  3705. { class: "pm-name" },
  3706. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3707. 1
  3708. /* TEXT */
  3709. ),
  3710. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3711. key: 0,
  3712. class: "pm-gender"
  3713. }, [
  3714. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3715. vue.createElementVNode("text", null, "公")
  3716. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3717. key: 1,
  3718. class: "pm-gender female"
  3719. }, [
  3720. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3721. vue.createElementVNode("text", null, "母")
  3722. ])) : vue.createCommentVNode("v-if", true)
  3723. ]),
  3724. vue.createElementVNode(
  3725. "text",
  3726. { class: "pm-breed" },
  3727. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3728. 1
  3729. /* TEXT */
  3730. )
  3731. ])
  3732. ]),
  3733. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3734. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3735. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3736. vue.createElementVNode(
  3737. "text",
  3738. { class: "pm-val" },
  3739. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3740. 1
  3741. /* TEXT */
  3742. )
  3743. ]),
  3744. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3745. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3746. vue.createElementVNode(
  3747. "text",
  3748. { class: "pm-val" },
  3749. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3750. 1
  3751. /* TEXT */
  3752. )
  3753. ]),
  3754. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3755. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3756. vue.createElementVNode(
  3757. "text",
  3758. { class: "pm-val" },
  3759. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3760. 1
  3761. /* TEXT */
  3762. )
  3763. ]),
  3764. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3765. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3766. vue.createElementVNode(
  3767. "text",
  3768. { class: "pm-val" },
  3769. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3770. 1
  3771. /* TEXT */
  3772. )
  3773. ]),
  3774. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3775. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3776. vue.createElementVNode(
  3777. "text",
  3778. { class: "pm-val" },
  3779. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3780. 1
  3781. /* TEXT */
  3782. )
  3783. ])
  3784. ]),
  3785. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3786. key: 0,
  3787. class: "pm-tags"
  3788. }, [
  3789. (vue.openBlock(true), vue.createElementBlock(
  3790. vue.Fragment,
  3791. null,
  3792. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3793. return vue.openBlock(), vue.createElementBlock(
  3794. "view",
  3795. {
  3796. class: "pm-tag",
  3797. key: index
  3798. },
  3799. vue.toDisplayString(tag),
  3800. 1
  3801. /* TEXT */
  3802. );
  3803. }),
  3804. 128
  3805. /* KEYED_FRAGMENT */
  3806. ))
  3807. ])) : vue.createCommentVNode("v-if", true),
  3808. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3809. vue.createElementVNode("view", { class: "orange-bar" }),
  3810. vue.createElementVNode("text", null, "备注日志")
  3811. ]),
  3812. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3813. (vue.openBlock(true), vue.createElementBlock(
  3814. vue.Fragment,
  3815. null,
  3816. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3817. return vue.openBlock(), vue.createElementBlock("view", {
  3818. class: "pm-log-item",
  3819. key: lIndex
  3820. }, [
  3821. vue.createElementVNode(
  3822. "text",
  3823. { class: "pm-log-date" },
  3824. vue.toDisplayString(log.date),
  3825. 1
  3826. /* TEXT */
  3827. ),
  3828. vue.createElementVNode(
  3829. "text",
  3830. { class: "pm-log-text" },
  3831. vue.toDisplayString(log.content),
  3832. 1
  3833. /* TEXT */
  3834. ),
  3835. vue.createElementVNode(
  3836. "text",
  3837. { class: "pm-log-recorder" },
  3838. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3839. 1
  3840. /* TEXT */
  3841. )
  3842. ]);
  3843. }),
  3844. 128
  3845. /* KEYED_FRAGMENT */
  3846. ))
  3847. ]),
  3848. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3849. vue.createElementVNode("button", {
  3850. class: "pm-bottom-close",
  3851. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3852. }, "关闭"),
  3853. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3854. ])
  3855. ])
  3856. ])) : vue.createCommentVNode("v-if", true)
  3857. ]),
  3858. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3859. key: 0,
  3860. class: "modal-mask"
  3861. }, [
  3862. vue.createElementVNode("view", { class: "custom-modal" }, [
  3863. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3864. vue.withDirectives(vue.createElementVNode(
  3865. "textarea",
  3866. {
  3867. class: "reject-textarea",
  3868. "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => _ctx.rejectReason = $event),
  3869. placeholder: "请输入拒绝理由(必填)",
  3870. maxlength: "100"
  3871. },
  3872. null,
  3873. 512
  3874. /* NEED_PATCH */
  3875. ), [
  3876. [vue.vModelText, _ctx.rejectReason]
  3877. ]),
  3878. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3879. vue.createElementVNode("button", {
  3880. class: "modal-btn cancel",
  3881. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3882. }, "取消"),
  3883. vue.createElementVNode("button", {
  3884. class: "modal-btn confirm",
  3885. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3886. }, "提交")
  3887. ])
  3888. ])
  3889. ])) : vue.createCommentVNode("v-if", true),
  3890. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3891. key: 1,
  3892. class: "modal-mask"
  3893. }, [
  3894. vue.createElementVNode("view", { class: "custom-modal" }, [
  3895. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3896. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3897. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3898. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3899. ]),
  3900. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3901. vue.createElementVNode("button", {
  3902. class: "modal-btn cancel",
  3903. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3904. }, "再想想"),
  3905. vue.createElementVNode("button", {
  3906. class: "modal-btn confirm",
  3907. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3908. }, "确认接单")
  3909. ])
  3910. ])
  3911. ])) : vue.createCommentVNode("v-if", true),
  3912. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3913. key: 2,
  3914. class: "nav-modal-mask",
  3915. onClick: _cache[28] || (_cache[28] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3916. }, [
  3917. vue.createElementVNode("view", {
  3918. class: "nav-action-sheet",
  3919. onClick: _cache[27] || (_cache[27] = vue.withModifiers(() => {
  3920. }, ["stop"]))
  3921. }, [
  3922. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3923. vue.createElementVNode("view", {
  3924. class: "nav-sheet-item",
  3925. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("高德"))
  3926. }, "高德地图"),
  3927. vue.createElementVNode("view", {
  3928. class: "nav-sheet-item",
  3929. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("腾讯"))
  3930. }, "腾讯地图"),
  3931. vue.createElementVNode("view", {
  3932. class: "nav-sheet-item",
  3933. onClick: _cache[25] || (_cache[25] = ($event) => _ctx.chooseMap("百度"))
  3934. }, "百度地图"),
  3935. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3936. vue.createElementVNode("view", {
  3937. class: "nav-sheet-item cancel",
  3938. onClick: _cache[26] || (_cache[26] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3939. }, "取消")
  3940. ])
  3941. ])) : vue.createCommentVNode("v-if", true),
  3942. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3943. ],
  3944. 64
  3945. /* STABLE_FRAGMENT */
  3946. );
  3947. }
  3948. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3949. const _sfc_main$t = {
  3950. data() {
  3951. return {
  3952. status: "resting",
  3953. // resting | busy | disabled
  3954. loading: false
  3955. };
  3956. },
  3957. onShow() {
  3958. const savedStatus = uni.getStorageSync("workStatus");
  3959. if (savedStatus) {
  3960. this.status = savedStatus;
  3961. }
  3962. this.fetchLatestProfile();
  3963. },
  3964. methods: {
  3965. async fetchLatestProfile() {
  3966. try {
  3967. const res = await getMyProfile();
  3968. if (res.data && res.data.status) {
  3969. this.status = res.data.status;
  3970. uni.setStorageSync("workStatus", this.status);
  3971. }
  3972. } catch (err) {
  3973. formatAppLog("error", "at pages/home/work-status.vue:64", "获取状态失败:", err);
  3974. }
  3975. },
  3976. async toggleStatus() {
  3977. if (this.loading)
  3978. return;
  3979. const targetStatus = this.status === "busy" ? "resting" : "busy";
  3980. const actionText = targetStatus === "busy" ? "恢复接单" : "停止接单";
  3981. try {
  3982. uni.showLoading({ title: "处理中...", mask: true });
  3983. this.loading = true;
  3984. await updateStatus(targetStatus);
  3985. await this.fetchLatestProfile();
  3986. uni.hideLoading();
  3987. uni.showToast({ title: actionText + "成功", icon: "success" });
  3988. } catch (err) {
  3989. uni.hideLoading();
  3990. formatAppLog("error", "at pages/home/work-status.vue:88", "切换状态失败:", err);
  3991. uni.showToast({ title: "操作失败,请重试", icon: "none" });
  3992. } finally {
  3993. this.loading = false;
  3994. }
  3995. }
  3996. }
  3997. };
  3998. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  3999. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  4000. vue.createElementVNode("view", { class: "signboard-container" }, [
  4001. vue.createElementVNode("view", { class: "rope" }),
  4002. vue.createElementVNode("view", { class: "nail" }),
  4003. vue.createElementVNode(
  4004. "view",
  4005. {
  4006. class: vue.normalizeClass(["board", { "resting": $data.status !== "busy" }])
  4007. },
  4008. [
  4009. vue.createElementVNode("view", { class: "screw top-left" }),
  4010. vue.createElementVNode("view", { class: "screw top-right" }),
  4011. vue.createElementVNode("view", { class: "screw bottom-left" }),
  4012. vue.createElementVNode("view", { class: "screw bottom-right" }),
  4013. vue.createElementVNode("view", { class: "board-inner" }, [
  4014. vue.createElementVNode(
  4015. "text",
  4016. { class: "status-text" },
  4017. vue.toDisplayString($data.status === "busy" ? "接单中" : "休息中"),
  4018. 1
  4019. /* TEXT */
  4020. )
  4021. ])
  4022. ],
  4023. 2
  4024. /* CLASS */
  4025. )
  4026. ]),
  4027. vue.createElementVNode("view", { class: "status-desc" }, [
  4028. vue.createElementVNode(
  4029. "text",
  4030. null,
  4031. vue.toDisplayString($data.status === "busy" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  4032. 1
  4033. /* TEXT */
  4034. )
  4035. ]),
  4036. vue.createElementVNode("view", { class: "action-area" }, [
  4037. vue.createElementVNode(
  4038. "button",
  4039. {
  4040. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "busy", "start": $data.status !== "busy" }]),
  4041. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  4042. },
  4043. vue.toDisplayString($data.status === "busy" ? "停止接单" : "开始接单"),
  4044. 3
  4045. /* TEXT, CLASS */
  4046. ),
  4047. vue.createElementVNode("view", { class: "tips" }, [
  4048. $data.status === "busy" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  4049. ])
  4050. ])
  4051. ]);
  4052. }
  4053. const PagesHomeWorkStatus = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/work-status.vue"]]);
  4054. const logic$2 = {
  4055. components: {
  4056. customTabbar
  4057. },
  4058. data() {
  4059. return {
  4060. currentTab: 0,
  4061. tabs: ["待接送/服务", "配送/服务中", "已完成", "已取消"],
  4062. typeFilterOptions: ["全部类型"],
  4063. currentTypeFilterIdx: 0,
  4064. activeDropdown: 0,
  4065. hasTimeFilter: false,
  4066. currentMonth: "2026年2月",
  4067. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  4068. calendarDays: [],
  4069. selectedDateRange: [],
  4070. allOrderList: [],
  4071. serviceList: [],
  4072. searchContent: "",
  4073. startServiceTime: "",
  4074. endServiceTime: "",
  4075. showPetModal: false,
  4076. currentPetInfo: {},
  4077. showNavModal: false,
  4078. navTargetItem: null,
  4079. navTargetPointType: "",
  4080. activeCallItem: null,
  4081. showRemarkInput: false,
  4082. remarkText: ""
  4083. };
  4084. },
  4085. created() {
  4086. this.initCalendar();
  4087. },
  4088. async onLoad() {
  4089. await this.loadServiceList();
  4090. await this.loadOrders();
  4091. reportGps(true).catch((e) => formatAppLog("log", "at pages/orders/logic.js:44", "Init GPS check skipped", e));
  4092. },
  4093. onShow() {
  4094. uni.hideTabBar();
  4095. this.loadOrders();
  4096. },
  4097. async onPullDownRefresh() {
  4098. try {
  4099. await this.loadServiceList();
  4100. await this.loadOrders();
  4101. } finally {
  4102. uni.stopPullDownRefresh();
  4103. }
  4104. },
  4105. watch: {
  4106. currentTab() {
  4107. this.loadOrders();
  4108. },
  4109. currentTypeFilterIdx() {
  4110. this.loadOrders();
  4111. },
  4112. searchContent() {
  4113. this.loadOrders();
  4114. }
  4115. },
  4116. computed: {
  4117. orderList() {
  4118. return this.allOrderList;
  4119. }
  4120. },
  4121. methods: {
  4122. async loadServiceList() {
  4123. try {
  4124. const res = await listAllService();
  4125. this.serviceList = res.data || [];
  4126. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  4127. } catch (err) {
  4128. formatAppLog("error", "at pages/orders/logic.js:84", "获取服务类型失败:", err);
  4129. }
  4130. },
  4131. async loadOrders() {
  4132. var _a;
  4133. try {
  4134. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  4135. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  4136. const params = {
  4137. status: statusMap[this.currentTab],
  4138. content: this.searchContent || void 0,
  4139. service: serviceId,
  4140. startServiceTime: this.startServiceTime || void 0,
  4141. endServiceTime: this.endServiceTime || void 0
  4142. };
  4143. formatAppLog("log", "at pages/orders/logic.js:98", "订单列表请求参数:", params);
  4144. const res = await getMyOrders(params);
  4145. formatAppLog("log", "at pages/orders/logic.js:100", "订单列表响应:", res);
  4146. const orders = res.rows || [];
  4147. formatAppLog("log", "at pages/orders/logic.js:102", "订单数量:", orders.length);
  4148. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  4149. } catch (err) {
  4150. formatAppLog("error", "at pages/orders/logic.js:105", "获取订单列表失败:", err);
  4151. this.allOrderList = [];
  4152. }
  4153. },
  4154. transformOrder(order, tabIndex) {
  4155. const service = this.serviceList.find((s) => s.id === order.service);
  4156. const serviceText = (service == null ? void 0 : service.name) || "未知";
  4157. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  4158. const mode = (service == null ? void 0 : service.mode) || 0;
  4159. const isRoundTrip = mode === 1;
  4160. let statusText = "接单";
  4161. if (tabIndex === 0) {
  4162. statusText = "接单";
  4163. } else if (tabIndex === 1) {
  4164. statusText = isRoundTrip ? "出发" : "开始";
  4165. } else if (tabIndex === 2) {
  4166. statusText = "已完成";
  4167. } else if (tabIndex === 3) {
  4168. statusText = "已拒绝";
  4169. }
  4170. return {
  4171. id: order.id,
  4172. status: order.status,
  4173. // 保存原始 status 用于判断权限
  4174. type: isRoundTrip ? 1 : 2,
  4175. typeText: serviceText,
  4176. typeIcon: serviceIcon,
  4177. statusText,
  4178. price: (order.price / 100).toFixed(2),
  4179. timeLabel: "服务时间",
  4180. time: order.serviceTime || "",
  4181. petAvatar: order.petAvatar || "/static/dog.png",
  4182. petAvatarUrl: order.petAvatarUrl || "",
  4183. petName: order.petName || "",
  4184. petBreed: order.breed || "",
  4185. startLocation: order.fromAddress || "暂无起点",
  4186. startAddress: order.fromAddress || "",
  4187. fromAddress: order.fromAddress || "",
  4188. fromLat: order.fromLat,
  4189. fromLng: order.fromLng,
  4190. startDistance: "0km",
  4191. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  4192. endAddress: order.toAddress || "",
  4193. toAddress: order.toAddress || "",
  4194. toLat: order.toLat,
  4195. toLng: order.toLng,
  4196. customerPhone: order.customerPhone || "",
  4197. endDistance: "0km",
  4198. serviceContent: order.remark || "",
  4199. remark: order.remark || ""
  4200. };
  4201. },
  4202. getDisplayStatus(item) {
  4203. if (item.statusText === "已完成")
  4204. return "已完成";
  4205. if (item.statusText === "已拒绝")
  4206. return "已拒绝";
  4207. if (item.statusText === "接单") {
  4208. return item.type === 1 ? "待接送" : "待服务";
  4209. }
  4210. return item.type === 1 ? "配送中" : "服务中";
  4211. },
  4212. getStatusClass(item) {
  4213. let display = this.getDisplayStatus(item);
  4214. if (display === "已完成")
  4215. return "finish";
  4216. if (display === "已拒绝")
  4217. return "reject";
  4218. if (display === "配送中" || display === "服务中")
  4219. return "processing";
  4220. return "highlight";
  4221. },
  4222. goToDetail(item) {
  4223. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4224. },
  4225. showPetProfile(item) {
  4226. this.currentPetInfo = {
  4227. ...item,
  4228. petGender: "M",
  4229. petAge: "2岁",
  4230. petWeight: "15kg",
  4231. petPersonality: "活泼亲人,精力旺盛",
  4232. petHobby: "喜欢追飞盘,爱吃肉干",
  4233. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4234. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4235. petLogs: [
  4236. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4237. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4238. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4239. ]
  4240. };
  4241. this.showPetModal = true;
  4242. },
  4243. closePetProfile() {
  4244. this.showPetModal = false;
  4245. },
  4246. openNavigation(item, pointType) {
  4247. this.navTargetItem = item;
  4248. this.navTargetPointType = pointType;
  4249. this.showNavModal = true;
  4250. },
  4251. closeNavModal() {
  4252. this.showNavModal = false;
  4253. },
  4254. chooseMap(mapType) {
  4255. let item = this.navTargetItem;
  4256. let pointType = this.navTargetPointType;
  4257. let name = pointType === "start" ? item.fromAddress || "起点" : item.toAddress || "终点";
  4258. let address = pointType === "start" ? item.fromAddress || "起点地址" : item.toAddress || "终点地址";
  4259. let latitude = pointType === "start" ? Number(item.fromLat) : Number(item.toLat);
  4260. let longitude = pointType === "start" ? Number(item.fromLng) : Number(item.toLng);
  4261. this.showNavModal = false;
  4262. const navigateTo = (lat, lng, addrName, addrDesc) => {
  4263. uni.openLocation({
  4264. latitude: lat,
  4265. longitude: lng,
  4266. name: addrName,
  4267. address: addrDesc || "无法获取详细地址",
  4268. success: function() {
  4269. formatAppLog("log", "at pages/orders/logic.js:224", "打开导航成功: " + mapType);
  4270. },
  4271. fail: function(err) {
  4272. formatAppLog("error", "at pages/orders/logic.js:227", "打开导航失败:", err);
  4273. uni.showToast({ title: "打开地图失败", icon: "none" });
  4274. }
  4275. });
  4276. };
  4277. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  4278. navigateTo(latitude, longitude, name, address);
  4279. } else {
  4280. uni.showLoading({ title: "获取当前位置...", mask: true });
  4281. reportGps(true).then((res) => {
  4282. uni.hideLoading();
  4283. navigateTo(res.latitude, res.longitude, name, address);
  4284. }).catch((err) => {
  4285. uni.hideLoading();
  4286. formatAppLog("error", "at pages/orders/logic.js:245", "获取地理位置失败:", err);
  4287. });
  4288. }
  4289. },
  4290. toggleCallMenu(item) {
  4291. if (this.activeCallItem === item) {
  4292. this.activeCallItem = null;
  4293. } else {
  4294. this.activeCallItem = item;
  4295. }
  4296. },
  4297. closeCallMenu() {
  4298. this.activeCallItem = null;
  4299. },
  4300. doCall(type, item) {
  4301. let phoneNum = "";
  4302. const targetItem = item || this.activeCallItem;
  4303. if (type === "merchant") {
  4304. phoneNum = "18900008451";
  4305. } else if (type === "customer") {
  4306. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4307. }
  4308. if (phoneNum) {
  4309. uni.showModal({
  4310. title: "拨号提示",
  4311. content: `是否呼叫号码: ${phoneNum}?`,
  4312. confirmText: "呼叫",
  4313. success: (res) => {
  4314. if (res.confirm) {
  4315. uni.makePhoneCall({
  4316. phoneNumber: phoneNum,
  4317. fail: (err) => {
  4318. formatAppLog("error", "at pages/orders/logic.js:278", "拨号失败:", err);
  4319. uni.showToast({ title: "无法唤起拨号盘", icon: "none" });
  4320. }
  4321. });
  4322. }
  4323. }
  4324. });
  4325. }
  4326. this.activeCallItem = null;
  4327. },
  4328. reportAbnormal(item) {
  4329. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4330. },
  4331. toggleDropdown(idx) {
  4332. if (this.activeDropdown === idx) {
  4333. this.activeDropdown = 0;
  4334. } else {
  4335. this.activeDropdown = idx;
  4336. }
  4337. },
  4338. closeDropdown() {
  4339. this.activeDropdown = 0;
  4340. },
  4341. selectType(index) {
  4342. this.currentTypeFilterIdx = index;
  4343. this.closeDropdown();
  4344. },
  4345. initCalendar() {
  4346. let days = [];
  4347. for (let i = 1; i <= 28; i++) {
  4348. days.push(i);
  4349. }
  4350. this.calendarDays = days;
  4351. this.selectedDateRange = [2, 4];
  4352. },
  4353. prevMonth() {
  4354. uni.showToast({ title: "上个月", icon: "none" });
  4355. },
  4356. nextMonth() {
  4357. uni.showToast({ title: "下个月", icon: "none" });
  4358. },
  4359. selectDateItem(day) {
  4360. if (this.selectedDateRange.length === 2) {
  4361. this.selectedDateRange = [day];
  4362. } else if (this.selectedDateRange.length === 1) {
  4363. let start = this.selectedDateRange[0];
  4364. if (day > start) {
  4365. this.selectedDateRange = [start, day];
  4366. } else if (day < start) {
  4367. this.selectedDateRange = [day, start];
  4368. } else {
  4369. this.selectedDateRange = [];
  4370. }
  4371. } else {
  4372. this.selectedDateRange = [day];
  4373. }
  4374. },
  4375. getDateClass(day) {
  4376. if (this.selectedDateRange.length === 0)
  4377. return "";
  4378. if (this.selectedDateRange.length === 1) {
  4379. return day === this.selectedDateRange[0] ? "is-start" : "";
  4380. }
  4381. let start = this.selectedDateRange[0];
  4382. let end = this.selectedDateRange[1];
  4383. if (day === start)
  4384. return "is-start";
  4385. if (day === end)
  4386. return "is-end";
  4387. if (day > start && day < end)
  4388. return "is-between";
  4389. return "";
  4390. },
  4391. resetTimeFilter() {
  4392. this.hasTimeFilter = false;
  4393. this.selectedDateRange = [];
  4394. this.startServiceTime = "";
  4395. this.endServiceTime = "";
  4396. this.closeDropdown();
  4397. this.loadOrders();
  4398. },
  4399. confirmTimeFilter() {
  4400. if (this.selectedDateRange.length === 0) {
  4401. uni.showToast({ title: "请先选择日期", icon: "none" });
  4402. return;
  4403. }
  4404. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4405. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4406. const pad = (n) => String(n).padStart(2, "0");
  4407. if (this.selectedDateRange.length === 2) {
  4408. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4409. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4410. } else {
  4411. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4412. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4413. }
  4414. this.hasTimeFilter = true;
  4415. this.closeDropdown();
  4416. this.loadOrders();
  4417. },
  4418. getMainActionText(item) {
  4419. return "查看详情";
  4420. },
  4421. mainAction(item) {
  4422. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4423. },
  4424. openRemarkInput() {
  4425. this.remarkText = "";
  4426. this.showRemarkInput = true;
  4427. },
  4428. closeRemarkInput() {
  4429. this.showRemarkInput = false;
  4430. this.remarkText = "";
  4431. },
  4432. submitRemark() {
  4433. const text = this.remarkText.trim();
  4434. if (!text) {
  4435. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4436. return;
  4437. }
  4438. const now = /* @__PURE__ */ new Date();
  4439. 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")}`;
  4440. if (!this.currentPetInfo.petLogs) {
  4441. this.$set(this.currentPetInfo, "petLogs", []);
  4442. }
  4443. this.currentPetInfo.petLogs.unshift({
  4444. date: dateStr,
  4445. content: text,
  4446. recorder: "我"
  4447. });
  4448. uni.showToast({ title: "备注已添加", icon: "success" });
  4449. this.closeRemarkInput();
  4450. },
  4451. /**
  4452. * 取消订单处理逻辑
  4453. * @param {Object} item - 订单项
  4454. */
  4455. handleCancelOrder(item) {
  4456. uni.showModal({
  4457. title: "提示",
  4458. content: "确认是否取消这个订单?",
  4459. success: async (res) => {
  4460. if (res.confirm) {
  4461. try {
  4462. uni.showLoading({ title: "取消中...", mask: true });
  4463. await cancelOrderApi({ orderId: item.id });
  4464. uni.showToast({ title: "订单已取消", icon: "success" });
  4465. setTimeout(() => {
  4466. this.loadOrders();
  4467. }, 1500);
  4468. } catch (err) {
  4469. formatAppLog("error", "at pages/orders/logic.js:423", "取消订单失败:", err);
  4470. uni.showToast({ title: "取消失败", icon: "none" });
  4471. } finally {
  4472. uni.hideLoading();
  4473. }
  4474. }
  4475. }
  4476. });
  4477. }
  4478. }
  4479. };
  4480. const _sfc_main$s = {
  4481. ...logic$2
  4482. };
  4483. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  4484. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4485. return vue.openBlock(), vue.createElementBlock(
  4486. vue.Fragment,
  4487. null,
  4488. [
  4489. vue.createElementVNode("view", { class: "container" }, [
  4490. vue.createElementVNode("view", { class: "sticky-header" }, [
  4491. vue.createElementVNode("view", { class: "status-tabs" }, [
  4492. (vue.openBlock(true), vue.createElementBlock(
  4493. vue.Fragment,
  4494. null,
  4495. vue.renderList(_ctx.tabs, (tab, index) => {
  4496. return vue.openBlock(), vue.createElementBlock("view", {
  4497. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4498. key: index,
  4499. onClick: ($event) => _ctx.currentTab = index
  4500. }, [
  4501. vue.createElementVNode(
  4502. "text",
  4503. null,
  4504. vue.toDisplayString(tab),
  4505. 1
  4506. /* TEXT */
  4507. ),
  4508. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4509. key: 0,
  4510. class: "indicator"
  4511. })) : vue.createCommentVNode("v-if", true)
  4512. ], 10, ["onClick"]);
  4513. }),
  4514. 128
  4515. /* KEYED_FRAGMENT */
  4516. ))
  4517. ]),
  4518. vue.createElementVNode("view", { class: "search-bar" }, [
  4519. vue.createElementVNode("view", { class: "search-input-box" }, [
  4520. vue.withDirectives(vue.createElementVNode(
  4521. "input",
  4522. {
  4523. class: "search-input",
  4524. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4525. placeholder: "搜索地址/电话/姓名",
  4526. "placeholder-class": "ph-style"
  4527. },
  4528. null,
  4529. 512
  4530. /* NEED_PATCH */
  4531. ), [
  4532. [vue.vModelText, _ctx.searchContent]
  4533. ])
  4534. ])
  4535. ]),
  4536. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4537. vue.createElementVNode("view", { class: "filter-bar" }, [
  4538. vue.createElementVNode(
  4539. "view",
  4540. {
  4541. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4542. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4543. },
  4544. [
  4545. vue.createElementVNode(
  4546. "text",
  4547. {
  4548. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4549. },
  4550. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4551. 3
  4552. /* TEXT, CLASS */
  4553. ),
  4554. vue.createElementVNode(
  4555. "view",
  4556. {
  4557. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4558. },
  4559. null,
  4560. 2
  4561. /* CLASS */
  4562. )
  4563. ],
  4564. 2
  4565. /* CLASS */
  4566. ),
  4567. vue.createElementVNode(
  4568. "view",
  4569. {
  4570. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4571. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4572. },
  4573. [
  4574. vue.createElementVNode(
  4575. "text",
  4576. {
  4577. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4578. },
  4579. "服务时间",
  4580. 2
  4581. /* CLASS */
  4582. ),
  4583. vue.createElementVNode(
  4584. "view",
  4585. {
  4586. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4587. },
  4588. null,
  4589. 2
  4590. /* CLASS */
  4591. )
  4592. ],
  4593. 2
  4594. /* CLASS */
  4595. )
  4596. ]),
  4597. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4598. key: 0,
  4599. class: "dropdown-mask",
  4600. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4601. })) : vue.createCommentVNode("v-if", true),
  4602. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4603. key: 1,
  4604. class: "dropdown-panel"
  4605. }, [
  4606. (vue.openBlock(true), vue.createElementBlock(
  4607. vue.Fragment,
  4608. null,
  4609. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4610. return vue.openBlock(), vue.createElementBlock("view", {
  4611. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4612. key: index,
  4613. onClick: ($event) => _ctx.selectType(index)
  4614. }, [
  4615. vue.createElementVNode(
  4616. "text",
  4617. null,
  4618. vue.toDisplayString(item),
  4619. 1
  4620. /* TEXT */
  4621. )
  4622. ], 10, ["onClick"]);
  4623. }),
  4624. 128
  4625. /* KEYED_FRAGMENT */
  4626. ))
  4627. ])) : vue.createCommentVNode("v-if", true),
  4628. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4629. key: 2,
  4630. class: "dropdown-panel calendar-panel"
  4631. }, [
  4632. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4633. vue.createElementVNode("view", { class: "cal-header" }, [
  4634. vue.createElementVNode("text", {
  4635. class: "cal-nav-btn",
  4636. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4637. }, "‹"),
  4638. vue.createElementVNode(
  4639. "text",
  4640. { class: "cal-title" },
  4641. vue.toDisplayString(_ctx.currentMonth),
  4642. 1
  4643. /* TEXT */
  4644. ),
  4645. vue.createElementVNode("text", {
  4646. class: "cal-nav-btn",
  4647. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4648. }, "›")
  4649. ]),
  4650. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4651. (vue.openBlock(true), vue.createElementBlock(
  4652. vue.Fragment,
  4653. null,
  4654. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4655. return vue.openBlock(), vue.createElementBlock(
  4656. "text",
  4657. {
  4658. key: idx,
  4659. class: "wk-item"
  4660. },
  4661. vue.toDisplayString(wk),
  4662. 1
  4663. /* TEXT */
  4664. );
  4665. }),
  4666. 128
  4667. /* KEYED_FRAGMENT */
  4668. ))
  4669. ]),
  4670. vue.createElementVNode("view", { class: "cal-body" }, [
  4671. (vue.openBlock(true), vue.createElementBlock(
  4672. vue.Fragment,
  4673. null,
  4674. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4675. return vue.openBlock(), vue.createElementBlock("view", {
  4676. key: idx,
  4677. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4678. onClick: ($event) => _ctx.selectDateItem(day)
  4679. }, [
  4680. vue.createElementVNode(
  4681. "view",
  4682. { class: "cal-day-text" },
  4683. vue.toDisplayString(day),
  4684. 1
  4685. /* TEXT */
  4686. )
  4687. ], 10, ["onClick"]);
  4688. }),
  4689. 128
  4690. /* KEYED_FRAGMENT */
  4691. ))
  4692. ])
  4693. ]),
  4694. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4695. vue.createElementVNode("button", {
  4696. class: "cal-btn reset",
  4697. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4698. }, "重置"),
  4699. vue.createElementVNode("button", {
  4700. class: "cal-btn confirm",
  4701. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4702. }, "确定")
  4703. ])
  4704. ])) : vue.createCommentVNode("v-if", true)
  4705. ])
  4706. ]),
  4707. vue.createElementVNode("view", { class: "order-list" }, [
  4708. (vue.openBlock(true), vue.createElementBlock(
  4709. vue.Fragment,
  4710. null,
  4711. vue.renderList(_ctx.orderList, (item, index) => {
  4712. return vue.openBlock(), vue.createElementBlock("view", {
  4713. class: "order-card",
  4714. key: index,
  4715. onClick: ($event) => _ctx.goToDetail(item)
  4716. }, [
  4717. vue.createElementVNode("view", { class: "card-header" }, [
  4718. vue.createElementVNode("view", { class: "type-badge" }, [
  4719. vue.createElementVNode("image", {
  4720. class: "type-icon",
  4721. src: item.typeIcon
  4722. }, null, 8, ["src"]),
  4723. vue.createElementVNode(
  4724. "text",
  4725. { class: "type-text" },
  4726. vue.toDisplayString(item.typeText),
  4727. 1
  4728. /* TEXT */
  4729. )
  4730. ]),
  4731. vue.createElementVNode(
  4732. "text",
  4733. {
  4734. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4735. },
  4736. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4737. 3
  4738. /* TEXT, CLASS */
  4739. )
  4740. ]),
  4741. vue.createElementVNode("view", { class: "card-body" }, [
  4742. vue.createElementVNode("view", { class: "time-row" }, [
  4743. vue.createElementVNode("view", { class: "time-col" }, [
  4744. vue.createElementVNode(
  4745. "text",
  4746. { class: "label" },
  4747. vue.toDisplayString(item.timeLabel) + ":",
  4748. 1
  4749. /* TEXT */
  4750. ),
  4751. vue.createElementVNode(
  4752. "text",
  4753. { class: "value" },
  4754. vue.toDisplayString(item.time),
  4755. 1
  4756. /* TEXT */
  4757. )
  4758. ]),
  4759. vue.createElementVNode(
  4760. "text",
  4761. { class: "price" },
  4762. "¥" + vue.toDisplayString(item.price),
  4763. 1
  4764. /* TEXT */
  4765. )
  4766. ]),
  4767. vue.createElementVNode("view", { class: "pet-card" }, [
  4768. vue.createElementVNode("image", {
  4769. class: "pet-avatar",
  4770. src: item.petAvatarUrl || item.petAvatar,
  4771. mode: "aspectFill"
  4772. }, null, 8, ["src"]),
  4773. vue.createElementVNode("view", { class: "pet-info" }, [
  4774. vue.createElementVNode(
  4775. "text",
  4776. { class: "pet-name" },
  4777. vue.toDisplayString(item.petName),
  4778. 1
  4779. /* TEXT */
  4780. ),
  4781. vue.createElementVNode(
  4782. "text",
  4783. { class: "pet-breed" },
  4784. "品种: " + vue.toDisplayString(item.petBreed),
  4785. 1
  4786. /* TEXT */
  4787. )
  4788. ])
  4789. ]),
  4790. vue.createElementVNode("view", { class: "route-info" }, [
  4791. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4792. vue.Fragment,
  4793. { key: 0 },
  4794. [
  4795. vue.createElementVNode("view", {
  4796. class: "route-item",
  4797. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4798. }, [
  4799. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  4800. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4801. vue.createElementVNode("view", { class: "address-box" }, [
  4802. vue.createElementVNode(
  4803. "text",
  4804. { class: "addr-title" },
  4805. vue.toDisplayString(item.startLocation),
  4806. 1
  4807. /* TEXT */
  4808. ),
  4809. vue.createElementVNode(
  4810. "text",
  4811. { class: "addr-desc" },
  4812. vue.toDisplayString(item.startAddress),
  4813. 1
  4814. /* TEXT */
  4815. )
  4816. ]),
  4817. vue.createElementVNode("image", {
  4818. class: "nav-arrow",
  4819. src: _imports_3$2,
  4820. style: { "flex-shrink": "0", "align-self": "center" }
  4821. })
  4822. ], 8, ["onClick"]),
  4823. vue.createElementVNode("view", {
  4824. class: "route-item",
  4825. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4826. }, [
  4827. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  4828. vue.createElementVNode("view", { class: "address-box" }, [
  4829. vue.createElementVNode(
  4830. "text",
  4831. { class: "addr-title" },
  4832. vue.toDisplayString(item.endLocation),
  4833. 1
  4834. /* TEXT */
  4835. ),
  4836. vue.createElementVNode(
  4837. "text",
  4838. { class: "addr-desc" },
  4839. vue.toDisplayString(item.endAddress),
  4840. 1
  4841. /* TEXT */
  4842. )
  4843. ]),
  4844. vue.createElementVNode("image", {
  4845. class: "nav-arrow",
  4846. src: _imports_3$2,
  4847. style: { "flex-shrink": "0", "align-self": "center" }
  4848. })
  4849. ], 8, ["onClick"])
  4850. ],
  4851. 64
  4852. /* STABLE_FRAGMENT */
  4853. )) : (vue.openBlock(), vue.createElementBlock(
  4854. vue.Fragment,
  4855. { key: 1 },
  4856. [
  4857. vue.createElementVNode("view", {
  4858. class: "route-item",
  4859. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4860. }, [
  4861. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4862. vue.createElementVNode("view", { class: "address-box" }, [
  4863. vue.createElementVNode(
  4864. "text",
  4865. { class: "addr-title" },
  4866. vue.toDisplayString(item.endLocation),
  4867. 1
  4868. /* TEXT */
  4869. ),
  4870. vue.createElementVNode(
  4871. "text",
  4872. { class: "addr-desc" },
  4873. vue.toDisplayString(item.endAddress),
  4874. 1
  4875. /* TEXT */
  4876. )
  4877. ]),
  4878. vue.createElementVNode("image", {
  4879. class: "nav-arrow",
  4880. src: _imports_3$2,
  4881. style: { "flex-shrink": "0", "align-self": "center" }
  4882. })
  4883. ], 8, ["onClick"]),
  4884. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4885. key: 0,
  4886. class: "service-content"
  4887. }, [
  4888. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4889. vue.createElementVNode(
  4890. "text",
  4891. null,
  4892. vue.toDisplayString(item.serviceContent),
  4893. 1
  4894. /* TEXT */
  4895. )
  4896. ])) : vue.createCommentVNode("v-if", true)
  4897. ],
  4898. 64
  4899. /* STABLE_FRAGMENT */
  4900. ))
  4901. ]),
  4902. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4903. key: 0,
  4904. class: "remark-box"
  4905. }, [
  4906. vue.createElementVNode(
  4907. "text",
  4908. null,
  4909. "备注:" + vue.toDisplayString(item.remark),
  4910. 1
  4911. /* TEXT */
  4912. )
  4913. ])) : vue.createCommentVNode("v-if", true)
  4914. ]),
  4915. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4916. key: 0,
  4917. class: "action-btns"
  4918. }, [
  4919. vue.createElementVNode("view", { class: "action-left" }, [
  4920. vue.createElementVNode("button", {
  4921. class: "btn normal",
  4922. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4923. }, "拨号", 8, ["onClick"])
  4924. ]),
  4925. vue.createElementVNode("view", { class: "action-right" }, [
  4926. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4927. key: 0,
  4928. class: "btn normal danger",
  4929. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4930. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4931. vue.createElementVNode("button", {
  4932. class: "btn normal",
  4933. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4934. }, "异常上报", 8, ["onClick"]),
  4935. vue.createElementVNode("button", {
  4936. class: "btn primary",
  4937. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4938. }, "打卡", 8, ["onClick"])
  4939. ])
  4940. ])) : vue.createCommentVNode("v-if", true)
  4941. ], 8, ["onClick"]);
  4942. }),
  4943. 128
  4944. /* KEYED_FRAGMENT */
  4945. )),
  4946. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4947. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4948. ]),
  4949. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4950. key: 0,
  4951. class: "call-mask",
  4952. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4953. })) : vue.createCommentVNode("v-if", true)
  4954. ]),
  4955. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4956. key: 0,
  4957. class: "pet-modal-mask",
  4958. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4959. }, [
  4960. vue.createElementVNode("view", {
  4961. class: "pet-modal-content",
  4962. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4963. }, ["stop"]))
  4964. }, [
  4965. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4966. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4967. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4968. vue.createElementVNode("view", {
  4969. class: "pm-remark-btn",
  4970. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4971. }, "备注"),
  4972. vue.createElementVNode("view", {
  4973. class: "close-icon-btn",
  4974. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4975. }, "×")
  4976. ])
  4977. ]),
  4978. vue.createElementVNode("scroll-view", {
  4979. "scroll-y": "",
  4980. class: "pet-modal-scroll"
  4981. }, [
  4982. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4983. vue.createElementVNode("image", {
  4984. class: "pm-avatar",
  4985. src: _ctx.currentPetInfo.petAvatar,
  4986. mode: "aspectFill"
  4987. }, null, 8, ["src"]),
  4988. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4989. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4990. vue.createElementVNode(
  4991. "text",
  4992. { class: "pm-name" },
  4993. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4994. 1
  4995. /* TEXT */
  4996. ),
  4997. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4998. key: 0,
  4999. class: "pm-gender"
  5000. }, [
  5001. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  5002. vue.createElementVNode("text", null, "公")
  5003. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  5004. key: 1,
  5005. class: "pm-gender female"
  5006. }, [
  5007. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  5008. vue.createElementVNode("text", null, "母")
  5009. ])) : vue.createCommentVNode("v-if", true)
  5010. ]),
  5011. vue.createElementVNode(
  5012. "text",
  5013. { class: "pm-breed" },
  5014. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  5015. 1
  5016. /* TEXT */
  5017. )
  5018. ])
  5019. ]),
  5020. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  5021. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  5022. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  5023. vue.createElementVNode(
  5024. "text",
  5025. { class: "pm-val" },
  5026. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  5027. 1
  5028. /* TEXT */
  5029. )
  5030. ]),
  5031. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  5032. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  5033. vue.createElementVNode(
  5034. "text",
  5035. { class: "pm-val" },
  5036. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  5037. 1
  5038. /* TEXT */
  5039. )
  5040. ]),
  5041. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5042. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  5043. vue.createElementVNode(
  5044. "text",
  5045. { class: "pm-val" },
  5046. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  5047. 1
  5048. /* TEXT */
  5049. )
  5050. ]),
  5051. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5052. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  5053. vue.createElementVNode(
  5054. "text",
  5055. { class: "pm-val" },
  5056. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  5057. 1
  5058. /* TEXT */
  5059. )
  5060. ]),
  5061. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5062. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  5063. vue.createElementVNode(
  5064. "text",
  5065. { class: "pm-val" },
  5066. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  5067. 1
  5068. /* TEXT */
  5069. )
  5070. ])
  5071. ]),
  5072. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  5073. key: 0,
  5074. class: "pm-tags"
  5075. }, [
  5076. (vue.openBlock(true), vue.createElementBlock(
  5077. vue.Fragment,
  5078. null,
  5079. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  5080. return vue.openBlock(), vue.createElementBlock(
  5081. "view",
  5082. {
  5083. class: "pm-tag",
  5084. key: index
  5085. },
  5086. vue.toDisplayString(tag),
  5087. 1
  5088. /* TEXT */
  5089. );
  5090. }),
  5091. 128
  5092. /* KEYED_FRAGMENT */
  5093. ))
  5094. ])) : vue.createCommentVNode("v-if", true),
  5095. vue.createElementVNode("view", { class: "pm-section-title" }, [
  5096. vue.createElementVNode("view", { class: "orange-bar" }),
  5097. vue.createElementVNode("text", null, "备注日志")
  5098. ]),
  5099. vue.createElementVNode("view", { class: "pm-log-list" }, [
  5100. (vue.openBlock(true), vue.createElementBlock(
  5101. vue.Fragment,
  5102. null,
  5103. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  5104. return vue.openBlock(), vue.createElementBlock("view", {
  5105. class: "pm-log-item",
  5106. key: lIndex
  5107. }, [
  5108. vue.createElementVNode(
  5109. "text",
  5110. { class: "pm-log-date" },
  5111. vue.toDisplayString(log.date),
  5112. 1
  5113. /* TEXT */
  5114. ),
  5115. vue.createElementVNode(
  5116. "text",
  5117. { class: "pm-log-text" },
  5118. vue.toDisplayString(log.content),
  5119. 1
  5120. /* TEXT */
  5121. ),
  5122. vue.createElementVNode(
  5123. "text",
  5124. { class: "pm-log-recorder" },
  5125. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  5126. 1
  5127. /* TEXT */
  5128. )
  5129. ]);
  5130. }),
  5131. 128
  5132. /* KEYED_FRAGMENT */
  5133. ))
  5134. ]),
  5135. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  5136. ])
  5137. ])
  5138. ])) : vue.createCommentVNode("v-if", true),
  5139. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  5140. key: 1,
  5141. class: "remark-mask",
  5142. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5143. }, [
  5144. vue.createElementVNode("view", {
  5145. class: "remark-sheet",
  5146. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  5147. }, ["stop"]))
  5148. }, [
  5149. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  5150. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  5151. vue.createElementVNode("view", {
  5152. class: "close-icon-btn",
  5153. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5154. }, "×")
  5155. ]),
  5156. vue.withDirectives(vue.createElementVNode(
  5157. "textarea",
  5158. {
  5159. class: "remark-textarea",
  5160. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  5161. placeholder: "请输入备注内容...",
  5162. maxlength: "500",
  5163. "auto-height": ""
  5164. },
  5165. null,
  5166. 512
  5167. /* NEED_PATCH */
  5168. ), [
  5169. [vue.vModelText, _ctx.remarkText]
  5170. ]),
  5171. vue.createElementVNode("view", {
  5172. class: "remark-submit-btn",
  5173. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  5174. }, "提交备注")
  5175. ])
  5176. ])) : vue.createCommentVNode("v-if", true),
  5177. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  5178. key: 2,
  5179. class: "nav-modal-mask",
  5180. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5181. }, [
  5182. vue.createElementVNode("view", {
  5183. class: "nav-action-sheet",
  5184. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  5185. }, ["stop"]))
  5186. }, [
  5187. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  5188. vue.createElementVNode("view", {
  5189. class: "nav-sheet-item",
  5190. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  5191. }, "高德地图"),
  5192. vue.createElementVNode("view", {
  5193. class: "nav-sheet-item",
  5194. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  5195. }, "腾讯地图"),
  5196. vue.createElementVNode("view", {
  5197. class: "nav-sheet-item",
  5198. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  5199. }, "百度地图"),
  5200. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  5201. vue.createElementVNode("view", {
  5202. class: "nav-sheet-item cancel",
  5203. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5204. }, "取消")
  5205. ])
  5206. ])) : vue.createCommentVNode("v-if", true),
  5207. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  5208. ],
  5209. 64
  5210. /* STABLE_FRAGMENT */
  5211. );
  5212. }
  5213. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  5214. function getOrderStats() {
  5215. return request({
  5216. url: "/order/subOrderLog/count",
  5217. method: "GET"
  5218. });
  5219. }
  5220. function getOrderLogs(orderId) {
  5221. return request({
  5222. url: `/order/subOrderLog/list?orderId=${orderId}`,
  5223. method: "GET"
  5224. });
  5225. }
  5226. function uploadAnamaly(data) {
  5227. return request({
  5228. url: "/fulfiller/anamaly/upload",
  5229. method: "POST",
  5230. data
  5231. });
  5232. }
  5233. function getAnomalyList(orderId) {
  5234. return request({
  5235. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  5236. method: "GET"
  5237. });
  5238. }
  5239. function getDictDataByType(dictType) {
  5240. return request({
  5241. url: `/system/dict/data/type/${dictType}`,
  5242. method: "GET"
  5243. });
  5244. }
  5245. function getPetDetail(id) {
  5246. return request({
  5247. url: `/archieves/pet/${id}`,
  5248. method: "GET"
  5249. });
  5250. }
  5251. function submitPetRemark(data) {
  5252. return request({
  5253. url: "/archieves/pet/remark",
  5254. method: "POST",
  5255. data
  5256. });
  5257. }
  5258. function listChangeLog(params) {
  5259. return request({
  5260. url: "/archieves/changeLog/listAll",
  5261. method: "GET",
  5262. data: params
  5263. });
  5264. }
  5265. const logic$1 = {
  5266. data() {
  5267. return {
  5268. orderId: null,
  5269. pageLoading: true,
  5270. // 页面数据加载中
  5271. orderType: 1,
  5272. orderStatus: 2,
  5273. serviceId: null,
  5274. // 当前订单的服务类型ID
  5275. serviceMode: null,
  5276. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  5277. petId: null,
  5278. // 当前订单关联的宠物ID
  5279. petDetail: null,
  5280. // 宠物档案详情
  5281. // 从后端 clockInRemark 解析出的打卡步骤列表
  5282. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5283. clockInSteps: [],
  5284. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5285. currentClockIn: null,
  5286. currentStep: 0,
  5287. orderDetail: {
  5288. type: 1,
  5289. price: "0.00",
  5290. timeLabel: "服务时间",
  5291. time: "",
  5292. petAvatar: "/static/dog.png",
  5293. petName: "",
  5294. petBreed: "",
  5295. serviceTag: "",
  5296. startLocation: "",
  5297. startAddress: "",
  5298. endAddress: "",
  5299. customerPhone: "",
  5300. serviceContent: "",
  5301. remark: "",
  5302. orderNo: "",
  5303. createTime: "",
  5304. serviceName: "",
  5305. // 服务类型名称
  5306. progressLogs: [],
  5307. nursingSummary: ""
  5308. // 宠护小结
  5309. },
  5310. serviceList: [],
  5311. showPetModal: false,
  5312. currentPetInfo: {},
  5313. showNavModal: false,
  5314. navTargetPointType: "",
  5315. showUploadModal: false,
  5316. modalMediaList: [],
  5317. modalRemark: "",
  5318. showSumModal: false,
  5319. sumContent: "",
  5320. sumDate: "",
  5321. sumSigner: "未知",
  5322. showPetRemarkInput: false,
  5323. petRemarkText: "",
  5324. showAnomalyModal: false,
  5325. anomalyList: [],
  5326. anomalyTypeDict: [],
  5327. // 媒体预览相关
  5328. videoPlayerShow: false,
  5329. videoPlayerUrl: ""
  5330. };
  5331. },
  5332. computed: {
  5333. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5334. steps() {
  5335. if (this.clockInSteps.length > 0) {
  5336. return this.clockInSteps.map((s) => s.title);
  5337. }
  5338. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5339. },
  5340. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5341. progressSteps() {
  5342. return ["已接单", ...this.steps, "订单完成"];
  5343. },
  5344. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5345. progressIndex() {
  5346. return this.currentStep + 1;
  5347. },
  5348. displayStatusText() {
  5349. if (this.currentStep >= this.steps.length)
  5350. return "已完成";
  5351. if (this.currentStep > 0) {
  5352. return this.orderType === 1 ? "配送中" : "服务中";
  5353. }
  5354. return this.orderType === 1 ? "待接送" : "待服务";
  5355. },
  5356. currentStatusText() {
  5357. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5358. },
  5359. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5360. currentTaskTitle() {
  5361. if (this.currentStep >= this.steps.length)
  5362. return "订单已完成";
  5363. if (this.currentClockIn) {
  5364. return this.currentClockIn.title;
  5365. }
  5366. return this.steps[this.currentStep] || "打卡";
  5367. },
  5368. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5369. currentTaskDesc() {
  5370. if (this.currentStep >= this.steps.length)
  5371. return "感谢您的服务,请注意休息";
  5372. if (this.currentClockIn && this.currentClockIn.remark) {
  5373. return this.currentClockIn.remark;
  5374. }
  5375. return "请按要求提交照片或视频及备注";
  5376. }
  5377. },
  5378. async onLoad(options) {
  5379. if (options.id) {
  5380. this.orderId = options.id;
  5381. }
  5382. this.pageLoading = true;
  5383. reportGps(true).catch((e) => formatAppLog("log", "at pages/orders/detail-logic.js:140", "Init GPS check skipped", e));
  5384. try {
  5385. await this.loadAnomalyTypeDict();
  5386. await this.loadServiceList();
  5387. await this.loadOrderDetail();
  5388. } finally {
  5389. this.pageLoading = false;
  5390. }
  5391. },
  5392. methods: {
  5393. async loadServiceList() {
  5394. try {
  5395. const res = await listAllService();
  5396. this.serviceList = res.data || [];
  5397. } catch (err) {
  5398. formatAppLog("error", "at pages/orders/detail-logic.js:159", "获取服务类型失败:", err);
  5399. }
  5400. },
  5401. /**
  5402. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5403. */
  5404. /**
  5405. * 基于已加载的 serviceList 进行前端匹配,解析 clockInRemark 为打卡步骤
  5406. */
  5407. loadServiceDetail(serviceId) {
  5408. formatAppLog("log", "at pages/orders/detail-logic.js:169", "前端匹配服务详情, ID:", serviceId);
  5409. const serviceInfo = (this.serviceList || []).find((s) => s.id === serviceId);
  5410. formatAppLog("log", "at pages/orders/detail-logic.js:171", "匹配到的服务信息:", serviceInfo);
  5411. if (serviceInfo) {
  5412. this.serviceMode = serviceInfo.mode;
  5413. this.orderDetail.serviceName = serviceInfo.name;
  5414. formatAppLog("log", "at pages/orders/detail-logic.js:175", "当前服务模式(mode):", this.serviceMode);
  5415. if (serviceInfo.clockInRemark) {
  5416. try {
  5417. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5418. if (Array.isArray(parsed) && parsed.length > 0) {
  5419. this.clockInSteps = parsed;
  5420. formatAppLog("log", "at pages/orders/detail-logic.js:181", "解析打卡步骤:", this.clockInSteps);
  5421. }
  5422. } catch (parseErr) {
  5423. formatAppLog("error", "at pages/orders/detail-logic.js:184", "解析 clockInRemark 失败:", parseErr);
  5424. }
  5425. }
  5426. }
  5427. },
  5428. async loadOrderDetail() {
  5429. if (!this.orderId) {
  5430. formatAppLog("log", "at pages/orders/detail-logic.js:191", "订单ID缺失");
  5431. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5432. return;
  5433. }
  5434. try {
  5435. formatAppLog("log", "at pages/orders/detail-logic.js:196", "请求订单详情,ID:", this.orderId);
  5436. const res = await getOrderInfo(this.orderId);
  5437. formatAppLog("log", "at pages/orders/detail-logic.js:198", "订单详情响应:", res);
  5438. const order = res.data;
  5439. if (!order) {
  5440. formatAppLog("log", "at pages/orders/detail-logic.js:201", "订单数据为空");
  5441. uni.showToast({ title: "订单不存在", icon: "none" });
  5442. return;
  5443. }
  5444. formatAppLog("log", "at pages/orders/detail-logic.js:205", "订单数据:", order);
  5445. this.serviceId = order.service;
  5446. this.petId = order.usrPet || null;
  5447. this.transformOrderData(order);
  5448. formatAppLog("log", "at pages/orders/detail-logic.js:209", "解析出的 serviceId:", this.serviceId);
  5449. if (this.serviceId) {
  5450. this.loadServiceDetail(this.serviceId);
  5451. } else {
  5452. formatAppLog("warn", "at pages/orders/detail-logic.js:215", "订单中未找到 service 字段,无法加载服务步骤");
  5453. }
  5454. if (this.petId) {
  5455. await this.loadPetDetail(this.petId);
  5456. }
  5457. await this.loadOrderLogs();
  5458. } catch (err) {
  5459. formatAppLog("error", "at pages/orders/detail-logic.js:226", "获取订单详情失败:", err);
  5460. uni.showToast({ title: "加载失败", icon: "none" });
  5461. }
  5462. },
  5463. async loadOrderLogs() {
  5464. try {
  5465. const res = await getOrderLogs(this.orderId);
  5466. const logs = res.data || [];
  5467. formatAppLog("log", "at pages/orders/detail-logic.js:234", "订单日志:", logs);
  5468. const progressLogs = logs.filter((log) => log.logType === 1);
  5469. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5470. status: log.title || "",
  5471. time: log.createTime || "",
  5472. medias: log.photoUrls || [],
  5473. remark: log.content || ""
  5474. }));
  5475. 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());
  5476. if (validLogs.length > 0) {
  5477. const latestLog = validLogs[0];
  5478. const latestStep = latestLog.step;
  5479. formatAppLog("log", "at pages/orders/detail-logic.js:253", "最新打卡日志 step:", latestStep);
  5480. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5481. if (stepIndex >= 0) {
  5482. this.currentStep = stepIndex + 1;
  5483. } else {
  5484. this.currentStep = Number(latestStep);
  5485. }
  5486. } else {
  5487. this.currentStep = 0;
  5488. }
  5489. this.updateCurrentClockIn();
  5490. formatAppLog("log", "at pages/orders/detail-logic.js:269", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5491. } catch (err) {
  5492. formatAppLog("error", "at pages/orders/detail-logic.js:271", "获取订单日志失败:", err);
  5493. }
  5494. },
  5495. /**
  5496. * 根据 currentStep 更新当前打卡信息
  5497. */
  5498. updateCurrentClockIn() {
  5499. if (this.currentStep < this.clockInSteps.length) {
  5500. this.currentClockIn = this.clockInSteps[this.currentStep];
  5501. } else {
  5502. this.currentClockIn = null;
  5503. }
  5504. },
  5505. transformOrderData(order) {
  5506. const mode = order.mode || 0;
  5507. const isRoundTrip = mode === 1;
  5508. this.orderType = isRoundTrip ? 1 : 2;
  5509. this.orderStatus = order.status || 2;
  5510. this.orderDetail = {
  5511. type: this.orderType,
  5512. price: (order.price / 100).toFixed(2),
  5513. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5514. time: order.serviceTime || "",
  5515. petAvatar: "/static/dog.png",
  5516. petName: order.petName || order.contact || "",
  5517. petBreed: order.breed || "",
  5518. serviceTag: order.groupPurchasePackageName || "",
  5519. startLocation: order.fromAddress || "暂无起点",
  5520. startAddress: order.fromAddress || "",
  5521. fromAddress: order.fromAddress || "",
  5522. fromLat: order.fromLat,
  5523. fromLng: order.fromLng,
  5524. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5525. endAddress: order.toAddress || "",
  5526. toAddress: order.toAddress || "",
  5527. toLat: order.toLat,
  5528. toLng: order.toLng,
  5529. customerPhone: order.contactPhoneNumber || "",
  5530. ownerName: order.contact || "",
  5531. // 宠主姓名(默认使用客户姓名)
  5532. serviceContent: "",
  5533. remark: "",
  5534. orderNo: order.code || "T" + order.id,
  5535. createTime: order.serviceTime || "",
  5536. nursingSummary: order.nursingSummary || "",
  5537. fulfillerName: order.fulfillerName || "",
  5538. // 履约者/护宠师姓名
  5539. progressLogs: [
  5540. { status: "您已接单", time: order.serviceTime || "" }
  5541. ]
  5542. };
  5543. if (this.orderDetail.fulfillerName) {
  5544. this.sumSigner = this.orderDetail.fulfillerName;
  5545. }
  5546. },
  5547. /**
  5548. * 根据宠物ID获取宠物档案详情
  5549. */
  5550. async loadPetDetail(petId) {
  5551. try {
  5552. const res = await getPetDetail(petId);
  5553. const pet = res.data;
  5554. if (pet) {
  5555. this.petDetail = pet;
  5556. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5557. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5558. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5559. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5560. formatAppLog("log", "at pages/orders/detail-logic.js:342", "宠物档案:", pet);
  5561. }
  5562. } catch (err) {
  5563. formatAppLog("error", "at pages/orders/detail-logic.js:345", "获取宠物档案失败:", err);
  5564. }
  5565. },
  5566. /**
  5567. * 加载异常记录列表
  5568. */
  5569. async loadAnomalyList() {
  5570. if (!this.orderId)
  5571. return;
  5572. try {
  5573. const res = await getAnomalyList(this.orderId);
  5574. const list = res.data || [];
  5575. this.anomalyList = list.map((item) => {
  5576. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5577. return {
  5578. ...item,
  5579. typeLabel: dict ? dict.label : item.type,
  5580. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5581. photoUrls: item.photoUrls || []
  5582. };
  5583. });
  5584. } catch (err) {
  5585. formatAppLog("error", "at pages/orders/detail-logic.js:368", "获取异常列表失败:", err);
  5586. }
  5587. },
  5588. async loadAnomalyTypeDict() {
  5589. try {
  5590. const res = await getDictDataByType("flf_anamaly_type");
  5591. this.anomalyTypeDict = res.data.map((item) => ({
  5592. label: item.dictLabel,
  5593. value: item.dictValue
  5594. }));
  5595. } catch (err) {
  5596. formatAppLog("error", "at pages/orders/detail-logic.js:379", "获取异常字典失败:", err);
  5597. }
  5598. },
  5599. openAnomalyModal() {
  5600. this.showAnomalyModal = true;
  5601. this.loadAnomalyList();
  5602. },
  5603. closeAnomalyModal() {
  5604. this.showAnomalyModal = false;
  5605. },
  5606. getAnomalyStatusLabel(status) {
  5607. const map = {
  5608. 0: "待审核",
  5609. 1: "已通过",
  5610. 2: "已驳回"
  5611. };
  5612. return map[status] || "未知";
  5613. },
  5614. updateStepByStatus() {
  5615. if (this.orderStatus === 2) {
  5616. this.currentStep = 0;
  5617. } else if (this.orderStatus === 3) {
  5618. this.currentStep = 1;
  5619. } else if (this.orderStatus === 4) {
  5620. this.currentStep = this.steps.length - 1;
  5621. } else {
  5622. this.currentStep = 0;
  5623. }
  5624. },
  5625. showPetProfile() {
  5626. const pet = this.petDetail;
  5627. if (pet) {
  5628. this.currentPetInfo = {
  5629. petAvatar: pet.avatarUrl || "/static/dog.png",
  5630. petName: pet.name || "",
  5631. petBreed: pet.breed || "",
  5632. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5633. petAge: pet.age ? pet.age + "岁" : "未知",
  5634. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5635. petPersonality: pet.personality || pet.cutePersonality || "无",
  5636. petHobby: "",
  5637. petRemark: pet.remark || "无",
  5638. petTags: (pet.tags || []).map((t) => t.name),
  5639. petLogs: [],
  5640. // 额外信息
  5641. petSize: pet.size || "",
  5642. petIsSterilized: pet.isSterilized,
  5643. petHealthStatus: pet.healthStatus || "",
  5644. petAllergies: pet.allergies || "",
  5645. petMedicalHistory: pet.medicalHistory || "",
  5646. petVaccineStatus: pet.vaccineStatus || "",
  5647. ownerName: pet.ownerName || "",
  5648. ownerPhone: pet.ownerPhone || ""
  5649. };
  5650. this.loadPetChangeLogs(pet.id);
  5651. } else {
  5652. this.currentPetInfo = {
  5653. ...this.orderDetail,
  5654. petGender: "",
  5655. petAge: "未知",
  5656. petWeight: "未知",
  5657. petPersonality: "无",
  5658. petHobby: "",
  5659. petRemark: "无",
  5660. petTags: [],
  5661. petLogs: []
  5662. };
  5663. }
  5664. this.showPetModal = true;
  5665. },
  5666. async loadPetChangeLogs(petId) {
  5667. if (!petId)
  5668. return;
  5669. try {
  5670. const res = await listChangeLog({
  5671. targetId: petId,
  5672. targetType: "pet"
  5673. });
  5674. const logs = res.data || [];
  5675. this.currentPetInfo.petLogs = logs.map((item) => ({
  5676. date: item.createTime || "",
  5677. content: item.content || "",
  5678. recorder: item.operatorName || "未知"
  5679. }));
  5680. } catch (err) {
  5681. formatAppLog("error", "at pages/orders/detail-logic.js:466", "获取宠物备注列表失败:", err);
  5682. }
  5683. },
  5684. closePetProfile() {
  5685. this.showPetModal = false;
  5686. },
  5687. openPetRemarkInput() {
  5688. this.petRemarkText = "";
  5689. this.showPetRemarkInput = true;
  5690. },
  5691. closePetRemarkInput() {
  5692. this.showPetRemarkInput = false;
  5693. },
  5694. async submitPetRemark() {
  5695. if (!this.petRemarkText.trim()) {
  5696. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5697. return;
  5698. }
  5699. if (!this.petId) {
  5700. uni.showToast({ title: "宠物信息缺失", icon: "none" });
  5701. return;
  5702. }
  5703. uni.showLoading({ title: "提交中...", mask: true });
  5704. try {
  5705. await submitPetRemark({
  5706. petId: this.petId,
  5707. content: this.petRemarkText
  5708. });
  5709. uni.hideLoading();
  5710. uni.showToast({ title: "备注已添加", icon: "success" });
  5711. this.closePetRemarkInput();
  5712. this.loadPetChangeLogs(this.petId);
  5713. } catch (err) {
  5714. uni.hideLoading();
  5715. formatAppLog("error", "at pages/orders/detail-logic.js:504", "提交宠物备注失败:", err);
  5716. }
  5717. },
  5718. goToAnomaly() {
  5719. uni.navigateTo({
  5720. url: "/pages/orders/anomaly?orderId=" + (this.orderId || "")
  5721. });
  5722. },
  5723. /**
  5724. * 拨打电话 (带授权引导)
  5725. */
  5726. callPhone() {
  5727. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5728. if (!phoneNum) {
  5729. uni.showToast({ title: "手机号不存在", icon: "none" });
  5730. return;
  5731. }
  5732. uni.showModal({
  5733. title: "拨号提示",
  5734. content: `系统将为您拨打手机号: ${phoneNum},请授予拨号权限以正常通话。`,
  5735. confirmText: "呼叫",
  5736. cancelText: "取消",
  5737. success: (res) => {
  5738. if (res.confirm) {
  5739. uni.makePhoneCall({
  5740. phoneNumber: phoneNum,
  5741. fail: (err) => {
  5742. formatAppLog("error", "at pages/orders/detail-logic.js:533", "拨号失败:", err);
  5743. uni.showToast({ title: "无法唤起拨号盘,请检查权限设置", icon: "none" });
  5744. }
  5745. });
  5746. }
  5747. }
  5748. });
  5749. },
  5750. openNavigation(type) {
  5751. this.navTargetPointType = type;
  5752. this.showNavModal = true;
  5753. },
  5754. closeNavModal() {
  5755. this.showNavModal = false;
  5756. },
  5757. chooseMap(mapType) {
  5758. let pointType = this.navTargetPointType;
  5759. let name = pointType === "start" ? this.orderDetail.fromAddress || "起点" : this.orderDetail.toAddress || "终点";
  5760. let address = pointType === "start" ? this.orderDetail.fromAddress || "起点地址" : this.orderDetail.toAddress || "终点地址";
  5761. let latitude = pointType === "start" ? Number(this.orderDetail.fromLat) : Number(this.orderDetail.toLat);
  5762. let longitude = pointType === "start" ? Number(this.orderDetail.fromLng) : Number(this.orderDetail.toLng);
  5763. this.showNavModal = false;
  5764. const navigateTo = (lat, lng, addrName, addrDesc) => {
  5765. uni.openLocation({
  5766. latitude: lat,
  5767. longitude: lng,
  5768. name: addrName,
  5769. address: addrDesc || "无法获取详细地址",
  5770. success: function() {
  5771. formatAppLog("log", "at pages/orders/detail-logic.js:567", "打开导航成功: " + mapType);
  5772. },
  5773. fail: function(err) {
  5774. formatAppLog("error", "at pages/orders/detail-logic.js:570", "打开导航失败:", err);
  5775. uni.showToast({ title: "打开地图失败", icon: "none" });
  5776. }
  5777. });
  5778. };
  5779. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  5780. navigateTo(latitude, longitude, name, address);
  5781. } else {
  5782. uni.showLoading({ title: "获取当前位置...", mask: true });
  5783. reportGps(true).then((res) => {
  5784. uni.hideLoading();
  5785. navigateTo(res.latitude, res.longitude, name, address);
  5786. }).catch((err) => {
  5787. uni.hideLoading();
  5788. formatAppLog("error", "at pages/orders/detail-logic.js:588", "获取地理位置失败:", err);
  5789. });
  5790. }
  5791. },
  5792. openUploadModal() {
  5793. this.modalMediaList = [];
  5794. this.modalRemark = "";
  5795. this.showUploadModal = true;
  5796. },
  5797. closeUploadModal() {
  5798. this.showUploadModal = false;
  5799. },
  5800. handleConfirmUpload() {
  5801. formatAppLog("log", "at pages/orders/detail-logic.js:602", "handleConfirmUpload被调用");
  5802. this.confirmUploadModal();
  5803. },
  5804. async chooseModalMedia() {
  5805. formatAppLog("log", "at pages/orders/detail-logic.js:606", "chooseModalMedia被调用");
  5806. uni.chooseMedia({
  5807. count: 5 - this.modalMediaList.length,
  5808. mediaType: ["image", "video"],
  5809. sourceType: ["album", "camera"],
  5810. success: async (res) => {
  5811. formatAppLog("log", "at pages/orders/detail-logic.js:613", "选择媒体文件成功:", res.tempFiles);
  5812. uni.showLoading({ title: "上传中...", mask: true });
  5813. try {
  5814. for (const file of res.tempFiles) {
  5815. const filePath = file.tempFilePath;
  5816. const fileType = file.fileType;
  5817. formatAppLog("log", "at pages/orders/detail-logic.js:619", "开始上传文件:", filePath, "类型:", fileType);
  5818. const uploadRes = await uploadFile(filePath);
  5819. formatAppLog("log", "at pages/orders/detail-logic.js:622", "服务器响应:", uploadRes);
  5820. if (uploadRes.code === 200) {
  5821. this.modalMediaList.push({
  5822. url: uploadRes.data.url,
  5823. ossId: uploadRes.data.ossId,
  5824. localPath: filePath,
  5825. mediaType: fileType,
  5826. thumb: file.thumbTempFilePath
  5827. // 视频缩略图(如果有)
  5828. });
  5829. formatAppLog("log", "at pages/orders/detail-logic.js:632", "媒体文件添加成功");
  5830. }
  5831. }
  5832. uni.hideLoading();
  5833. uni.showToast({ title: "上传成功", icon: "success" });
  5834. } catch (err) {
  5835. uni.hideLoading();
  5836. formatAppLog("error", "at pages/orders/detail-logic.js:639", "上传失败详情:", err);
  5837. uni.showToast({ title: "上传失败", icon: "none" });
  5838. }
  5839. },
  5840. fail: (err) => {
  5841. formatAppLog("error", "at pages/orders/detail-logic.js:644", "选择媒体文件失败:", err);
  5842. }
  5843. });
  5844. },
  5845. removeModalMedia(index) {
  5846. this.modalMediaList.splice(index, 1);
  5847. },
  5848. getCurrentTime() {
  5849. const now = /* @__PURE__ */ new Date();
  5850. const y = now.getFullYear();
  5851. const m = String(now.getMonth() + 1).padStart(2, "0");
  5852. const d = String(now.getDate()).padStart(2, "0");
  5853. const h = String(now.getHours()).padStart(2, "0");
  5854. const min = String(now.getMinutes()).padStart(2, "0");
  5855. return `${y}/${m}/${d} ${h}:${min}`;
  5856. },
  5857. async confirmUploadModal() {
  5858. formatAppLog("log", "at pages/orders/detail-logic.js:662", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5859. if (this.modalMediaList.length === 0) {
  5860. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5861. return;
  5862. }
  5863. try {
  5864. uni.showLoading({ title: "提交中..." });
  5865. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5866. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5867. formatAppLog("log", "at pages/orders/detail-logic.js:673", "准备打卡,ossIds:", ossIds);
  5868. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5869. const clockInData = {
  5870. orderId: this.orderId,
  5871. photos: ossIds,
  5872. content: this.modalRemark || "",
  5873. step: clockInType,
  5874. title: this.currentTaskTitle,
  5875. startFlag: Number(clockInType) === 1,
  5876. endFlag: Number(this.currentStep) === this.steps.length - 1
  5877. };
  5878. formatAppLog("log", "at pages/orders/detail-logic.js:688", "打卡数据:", clockInData);
  5879. await clockIn(clockInData);
  5880. uni.hideLoading();
  5881. this.closeUploadModal();
  5882. uni.showToast({ title: "打卡成功", icon: "success" });
  5883. await this.loadOrderDetail();
  5884. } catch (err) {
  5885. uni.hideLoading();
  5886. formatAppLog("error", "at pages/orders/detail-logic.js:698", "打卡失败:", err);
  5887. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5888. }
  5889. },
  5890. copyOrderNo() {
  5891. uni.setClipboardData({
  5892. data: this.orderDetail.orderNo,
  5893. success: () => {
  5894. uni.showToast({ title: "复制成功", icon: "none" });
  5895. }
  5896. });
  5897. },
  5898. openSumModal() {
  5899. let displayDate = "";
  5900. if (this.orderDetail.time) {
  5901. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5902. } else {
  5903. const now = /* @__PURE__ */ new Date();
  5904. const y = now.getFullYear();
  5905. const m = String(now.getMonth() + 1).padStart(2, "0");
  5906. const d = String(now.getDate()).padStart(2, "0");
  5907. displayDate = `${y}/${m}/${d}`;
  5908. }
  5909. this.sumDate = displayDate;
  5910. if (this.orderDetail.nursingSummary) {
  5911. this.sumContent = this.orderDetail.nursingSummary;
  5912. } else if (!this.sumContent) {
  5913. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5914. }
  5915. this.showSumModal = true;
  5916. },
  5917. closeSumModal() {
  5918. this.showSumModal = false;
  5919. },
  5920. async submitSumModal() {
  5921. if (!this.sumContent.trim()) {
  5922. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5923. return;
  5924. }
  5925. uni.showLoading({ title: "提交中...", mask: true });
  5926. try {
  5927. const res = await submitNursingSummary({
  5928. orderId: this.orderId,
  5929. content: this.sumContent
  5930. });
  5931. uni.hideLoading();
  5932. if (res.code === 200) {
  5933. uni.showToast({ title: "小结已提交", icon: "success" });
  5934. this.closeSumModal();
  5935. await this.loadOrderDetail();
  5936. } else {
  5937. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5938. }
  5939. } catch (err) {
  5940. uni.hideLoading();
  5941. formatAppLog("error", "at pages/orders/detail-logic.js:766", "提交宠护小结失败:", err);
  5942. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5943. }
  5944. },
  5945. /**
  5946. * 检查是否为视频
  5947. */
  5948. isVideo(url) {
  5949. if (!url)
  5950. return false;
  5951. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5952. const lowerUrl = url.toLowerCase();
  5953. return videoExts.some((ext) => lowerUrl.includes(ext));
  5954. },
  5955. /**
  5956. * 获取视频封面图 (第一帧)
  5957. * 兼容阿里云、腾讯云等主流 OSS
  5958. */
  5959. getVideoPoster(url) {
  5960. if (!this.isVideo(url))
  5961. return url;
  5962. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5963. return url;
  5964. }
  5965. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5966. const tencent = `?ci-process=snapshot&time=1`;
  5967. if (url.includes("myqcloud.com")) {
  5968. return url + tencent;
  5969. }
  5970. return url + aliyun;
  5971. },
  5972. /**
  5973. * 统一预览媒体
  5974. */
  5975. previewMedia(medias, currentIdx) {
  5976. const url = medias[currentIdx];
  5977. if (this.isVideo(url)) {
  5978. this.videoPlayerUrl = url;
  5979. this.videoPlayerShow = true;
  5980. } else {
  5981. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5982. const currentImgUrl = url;
  5983. const newIdx = imageUrls.indexOf(currentImgUrl);
  5984. uni.previewImage({
  5985. current: newIdx >= 0 ? newIdx : 0,
  5986. urls: imageUrls
  5987. });
  5988. }
  5989. },
  5990. closeVideoPlayer() {
  5991. this.videoPlayerShow = false;
  5992. this.videoPlayerUrl = "";
  5993. }
  5994. }
  5995. };
  5996. const _imports_12 = "/static/icons/phone_orange.svg";
  5997. const _imports_1$7 = "/static/icons/clock.svg";
  5998. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5999. const _imports_4$1 = "/static/icons/file.svg";
  6000. const _imports_1$6 = "/static/icons/camera_grey.svg";
  6001. const _imports_6$1 = "/static/icons/order_no.svg";
  6002. const _imports_7 = "/static/icons/play_circle.svg";
  6003. const _imports_8$1 = "/static/empty-rest.png";
  6004. const _sfc_main$r = {
  6005. ...logic$1
  6006. };
  6007. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  6008. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  6009. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  6010. key: 0,
  6011. class: "loading-container"
  6012. }, [
  6013. vue.createElementVNode("view", { class: "skeleton-header" }, [
  6014. vue.createElementVNode("view", {
  6015. class: "skeleton-line skeleton-ani",
  6016. style: { "width": "30%", "height": "36rpx" }
  6017. }),
  6018. vue.createElementVNode("view", {
  6019. class: "skeleton-line skeleton-ani",
  6020. style: { "width": "20%", "height": "36rpx" }
  6021. })
  6022. ]),
  6023. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  6024. (vue.openBlock(), vue.createElementBlock(
  6025. vue.Fragment,
  6026. null,
  6027. vue.renderList(4, (i) => {
  6028. return vue.createElementVNode("view", {
  6029. class: "skeleton-circle skeleton-ani",
  6030. key: i
  6031. });
  6032. }),
  6033. 64
  6034. /* STABLE_FRAGMENT */
  6035. ))
  6036. ]),
  6037. (vue.openBlock(), vue.createElementBlock(
  6038. vue.Fragment,
  6039. null,
  6040. vue.renderList(3, (j) => {
  6041. return vue.createElementVNode("view", {
  6042. class: "skeleton-card",
  6043. key: "c" + j
  6044. }, [
  6045. vue.createElementVNode("view", {
  6046. class: "skeleton-line skeleton-ani",
  6047. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  6048. }),
  6049. vue.createElementVNode("view", {
  6050. class: "skeleton-line skeleton-ani",
  6051. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  6052. }),
  6053. vue.createElementVNode("view", {
  6054. class: "skeleton-line skeleton-ani",
  6055. style: { "width": "75%", "height": "24rpx" }
  6056. })
  6057. ]);
  6058. }),
  6059. 64
  6060. /* STABLE_FRAGMENT */
  6061. ))
  6062. ])) : (vue.openBlock(), vue.createElementBlock(
  6063. vue.Fragment,
  6064. { key: 1 },
  6065. [
  6066. vue.createElementVNode("view", { class: "detail-header" }, [
  6067. vue.createElementVNode("view", { class: "status-row" }, [
  6068. vue.createElementVNode(
  6069. "text",
  6070. { class: "status-title" },
  6071. vue.toDisplayString(_ctx.displayStatusText),
  6072. 1
  6073. /* TEXT */
  6074. ),
  6075. vue.createElementVNode(
  6076. "text",
  6077. { class: "status-price" },
  6078. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  6079. 1
  6080. /* TEXT */
  6081. )
  6082. ]),
  6083. vue.createElementVNode("view", { class: "progress-bar" }, [
  6084. (vue.openBlock(true), vue.createElementBlock(
  6085. vue.Fragment,
  6086. null,
  6087. vue.renderList(_ctx.progressSteps, (step, index) => {
  6088. return vue.openBlock(), vue.createElementBlock(
  6089. "view",
  6090. {
  6091. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  6092. key: index
  6093. },
  6094. [
  6095. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  6096. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  6097. "view",
  6098. {
  6099. key: 0,
  6100. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  6101. },
  6102. null,
  6103. 2
  6104. /* CLASS */
  6105. )) : vue.createCommentVNode("v-if", true),
  6106. vue.createElementVNode(
  6107. "view",
  6108. { class: "step-circle" },
  6109. vue.toDisplayString(index + 1),
  6110. 1
  6111. /* TEXT */
  6112. )
  6113. ]),
  6114. vue.createElementVNode(
  6115. "text",
  6116. { class: "step-text" },
  6117. vue.toDisplayString(step),
  6118. 1
  6119. /* TEXT */
  6120. )
  6121. ],
  6122. 2
  6123. /* CLASS */
  6124. );
  6125. }),
  6126. 128
  6127. /* KEYED_FRAGMENT */
  6128. ))
  6129. ])
  6130. ]),
  6131. vue.createElementVNode("scroll-view", {
  6132. "scroll-y": "",
  6133. class: "detail-content"
  6134. }, [
  6135. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  6136. vue.createElementVNode("image", {
  6137. class: "pb-avatar",
  6138. src: _ctx.orderDetail.petAvatar,
  6139. mode: "aspectFill"
  6140. }, null, 8, ["src"]),
  6141. vue.createElementVNode("view", { class: "pb-info" }, [
  6142. vue.createElementVNode("view", { class: "pb-name-row" }, [
  6143. vue.createElementVNode(
  6144. "text",
  6145. { class: "pb-name" },
  6146. vue.toDisplayString(_ctx.orderDetail.petName),
  6147. 1
  6148. /* TEXT */
  6149. )
  6150. ]),
  6151. vue.createElementVNode("view", { class: "pb-tags" }, [
  6152. vue.createElementVNode(
  6153. "text",
  6154. { class: "pb-tag" },
  6155. vue.toDisplayString(_ctx.orderDetail.serviceName),
  6156. 1
  6157. /* TEXT */
  6158. )
  6159. ])
  6160. ]),
  6161. vue.createElementVNode("view", { class: "pb-actions" }, [
  6162. vue.createElementVNode("view", {
  6163. class: "pb-btn profile-btn",
  6164. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  6165. }, "宠物档案"),
  6166. vue.createElementVNode("view", {
  6167. class: "pb-btn phone-btn",
  6168. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  6169. }, [
  6170. vue.createElementVNode("image", {
  6171. class: "phone-icon",
  6172. src: _imports_12
  6173. })
  6174. ])
  6175. ])
  6176. ]),
  6177. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  6178. vue.createElementVNode("view", { class: "si-row time-row" }, [
  6179. vue.createElementVNode("image", {
  6180. class: "si-icon outline",
  6181. src: _imports_1$7
  6182. }),
  6183. vue.createElementVNode("view", { class: "si-content" }, [
  6184. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  6185. vue.createElementVNode(
  6186. "text",
  6187. { class: "si-val" },
  6188. vue.toDisplayString(_ctx.orderDetail.time),
  6189. 1
  6190. /* TEXT */
  6191. )
  6192. ]),
  6193. vue.createElementVNode("view", {
  6194. class: "si-action record-btn",
  6195. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  6196. }, [
  6197. vue.createElementVNode("text", null, "异常记录"),
  6198. vue.createElementVNode("image", {
  6199. class: "record-arrow",
  6200. src: _imports_0$2
  6201. })
  6202. ])
  6203. ]),
  6204. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  6205. vue.Fragment,
  6206. { key: 0 },
  6207. [
  6208. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  6209. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  6210. vue.createElementVNode("view", { class: "route-line-vertical" }),
  6211. vue.createElementVNode("view", { class: "si-content" }, [
  6212. vue.createElementVNode(
  6213. "text",
  6214. { class: "si-addr-title" },
  6215. vue.toDisplayString(_ctx.orderDetail.startLocation),
  6216. 1
  6217. /* TEXT */
  6218. ),
  6219. vue.createElementVNode(
  6220. "text",
  6221. { class: "si-addr-desc" },
  6222. vue.toDisplayString(_ctx.orderDetail.startAddress),
  6223. 1
  6224. /* TEXT */
  6225. )
  6226. ]),
  6227. vue.createElementVNode("view", {
  6228. class: "nav-btn-circle",
  6229. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  6230. }, [
  6231. vue.createElementVNode("image", {
  6232. class: "nav-arrow",
  6233. src: _imports_3$2
  6234. })
  6235. ])
  6236. ]),
  6237. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  6238. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  6239. vue.createElementVNode("view", { class: "si-content" }, [
  6240. vue.createElementVNode(
  6241. "text",
  6242. { class: "si-addr-title" },
  6243. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6244. 1
  6245. /* TEXT */
  6246. ),
  6247. vue.createElementVNode(
  6248. "text",
  6249. { class: "si-addr-desc" },
  6250. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6251. 1
  6252. /* TEXT */
  6253. )
  6254. ]),
  6255. vue.createElementVNode("view", {
  6256. class: "nav-btn-circle",
  6257. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  6258. }, [
  6259. vue.createElementVNode("image", {
  6260. class: "nav-arrow",
  6261. src: _imports_3$2
  6262. })
  6263. ])
  6264. ])
  6265. ],
  6266. 64
  6267. /* STABLE_FRAGMENT */
  6268. )) : (vue.openBlock(), vue.createElementBlock("view", {
  6269. key: 1,
  6270. class: "si-row addr-row end-addr"
  6271. }, [
  6272. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  6273. vue.createElementVNode("view", { class: "si-content" }, [
  6274. vue.createElementVNode(
  6275. "text",
  6276. { class: "si-addr-title" },
  6277. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6278. 1
  6279. /* TEXT */
  6280. ),
  6281. vue.createElementVNode(
  6282. "text",
  6283. { class: "si-addr-desc" },
  6284. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6285. 1
  6286. /* TEXT */
  6287. )
  6288. ]),
  6289. vue.createElementVNode("view", {
  6290. class: "nav-btn-circle",
  6291. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  6292. }, [
  6293. vue.createElementVNode("image", {
  6294. class: "nav-arrow",
  6295. src: _imports_3$2
  6296. })
  6297. ])
  6298. ])),
  6299. vue.createElementVNode("view", { class: "si-row" }, [
  6300. vue.createElementVNode("image", {
  6301. class: "si-icon outline custom-icon-file",
  6302. src: _imports_4$1
  6303. }),
  6304. vue.createElementVNode("view", { class: "si-content" }, [
  6305. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  6306. vue.createElementVNode(
  6307. "text",
  6308. { class: "si-val" },
  6309. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  6310. 1
  6311. /* TEXT */
  6312. )
  6313. ])
  6314. ])
  6315. ]),
  6316. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  6317. key: 0,
  6318. class: "white-card task-card"
  6319. }, [
  6320. vue.createElementVNode(
  6321. "text",
  6322. { class: "tc-title" },
  6323. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  6324. 1
  6325. /* TEXT */
  6326. ),
  6327. vue.createElementVNode(
  6328. "text",
  6329. { class: "tc-desc" },
  6330. vue.toDisplayString(_ctx.currentTaskDesc),
  6331. 1
  6332. /* TEXT */
  6333. ),
  6334. vue.createElementVNode("view", {
  6335. class: "full-media-add",
  6336. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6337. }, [
  6338. vue.createElementVNode("image", {
  6339. class: "upload-icon-large",
  6340. src: _imports_1$6
  6341. }),
  6342. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6343. ])
  6344. ])) : vue.createCommentVNode("v-if", true),
  6345. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6346. vue.createElementVNode("view", { class: "bi-row" }, [
  6347. vue.createElementVNode("image", {
  6348. class: "si-icon outline",
  6349. src: _imports_6$1
  6350. }),
  6351. vue.createElementVNode("view", { class: "bi-content" }, [
  6352. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6353. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6354. vue.createElementVNode(
  6355. "text",
  6356. { class: "bi-val" },
  6357. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6358. 1
  6359. /* TEXT */
  6360. ),
  6361. vue.createElementVNode("text", {
  6362. class: "bi-copy",
  6363. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6364. }, "复制")
  6365. ])
  6366. ])
  6367. ]),
  6368. vue.createElementVNode("view", { class: "bi-row" }, [
  6369. vue.createElementVNode("image", {
  6370. class: "si-icon outline",
  6371. src: _imports_1$7
  6372. }),
  6373. vue.createElementVNode("view", { class: "bi-content" }, [
  6374. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6375. vue.createElementVNode(
  6376. "text",
  6377. { class: "bi-val" },
  6378. vue.toDisplayString(_ctx.orderDetail.createTime),
  6379. 1
  6380. /* TEXT */
  6381. )
  6382. ])
  6383. ])
  6384. ]),
  6385. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6386. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6387. vue.createElementVNode("view", { class: "orange-bar" }),
  6388. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6389. ]),
  6390. vue.createElementVNode("view", { class: "tl-list" }, [
  6391. (vue.openBlock(true), vue.createElementBlock(
  6392. vue.Fragment,
  6393. null,
  6394. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6395. return vue.openBlock(), vue.createElementBlock("view", {
  6396. class: "tl-item",
  6397. key: idx
  6398. }, [
  6399. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6400. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6401. ]),
  6402. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6403. vue.createElementVNode("view", { class: "tl-header" }, [
  6404. vue.createElementVNode(
  6405. "text",
  6406. { class: "tl-status" },
  6407. vue.toDisplayString(log.status),
  6408. 1
  6409. /* TEXT */
  6410. ),
  6411. vue.createElementVNode(
  6412. "text",
  6413. { class: "tl-time" },
  6414. vue.toDisplayString(log.time),
  6415. 1
  6416. /* TEXT */
  6417. )
  6418. ]),
  6419. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6420. key: 0,
  6421. class: "tl-medias"
  6422. }, [
  6423. (vue.openBlock(true), vue.createElementBlock(
  6424. vue.Fragment,
  6425. null,
  6426. vue.renderList(log.medias, (media, midx) => {
  6427. return vue.openBlock(), vue.createElementBlock("view", {
  6428. class: "tl-media-item",
  6429. key: midx,
  6430. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6431. }, [
  6432. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6433. key: 0,
  6434. class: "tl-img",
  6435. src: media,
  6436. mode: "aspectFill"
  6437. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6438. key: 1,
  6439. class: "tl-video-placeholder"
  6440. }, [
  6441. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6442. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6443. ]))
  6444. ], 8, ["onClick"]);
  6445. }),
  6446. 128
  6447. /* KEYED_FRAGMENT */
  6448. ))
  6449. ])) : vue.createCommentVNode("v-if", true),
  6450. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6451. key: 1,
  6452. class: "tl-remark"
  6453. }, [
  6454. vue.createElementVNode(
  6455. "text",
  6456. null,
  6457. vue.toDisplayString(log.remark),
  6458. 1
  6459. /* TEXT */
  6460. )
  6461. ])) : vue.createCommentVNode("v-if", true)
  6462. ])
  6463. ]);
  6464. }),
  6465. 128
  6466. /* KEYED_FRAGMENT */
  6467. ))
  6468. ])
  6469. ]),
  6470. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6471. ]),
  6472. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6473. vue.createElementVNode("view", { class: "action-left" }, [
  6474. vue.createElementVNode("button", {
  6475. class: "action-btn outline grey-outline",
  6476. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6477. }, "异常上报"),
  6478. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6479. key: 0,
  6480. class: "action-btn outline orange-outline",
  6481. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6482. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6483. ]),
  6484. vue.createElementVNode("view", { class: "action-right" }, [
  6485. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6486. "button",
  6487. {
  6488. key: 0,
  6489. class: "action-btn primary",
  6490. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6491. },
  6492. vue.toDisplayString(_ctx.currentTaskTitle),
  6493. 1
  6494. /* TEXT */
  6495. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6496. key: 1,
  6497. class: "action-btn primary grey-bg"
  6498. }, "已完成"))
  6499. ])
  6500. ]),
  6501. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6502. key: 0,
  6503. class: "pet-modal-mask",
  6504. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6505. }, [
  6506. vue.createElementVNode("view", {
  6507. class: "pet-modal-content",
  6508. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6509. }, ["stop"]))
  6510. }, [
  6511. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6512. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6513. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6514. vue.createElementVNode("view", {
  6515. class: "pm-remark-btn",
  6516. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6517. }, "备注"),
  6518. vue.createElementVNode("view", {
  6519. class: "close-icon-btn",
  6520. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6521. }, "×")
  6522. ]),
  6523. vue.createElementVNode("scroll-view", {
  6524. "scroll-y": "",
  6525. class: "pet-modal-scroll"
  6526. }, [
  6527. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6528. vue.createElementVNode("image", {
  6529. class: "pm-avatar",
  6530. src: _ctx.currentPetInfo.petAvatar,
  6531. mode: "aspectFill"
  6532. }, null, 8, ["src"]),
  6533. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6534. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6535. vue.createElementVNode(
  6536. "text",
  6537. { class: "pm-name" },
  6538. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6539. 1
  6540. /* TEXT */
  6541. ),
  6542. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6543. key: 0,
  6544. class: "pm-gender"
  6545. }, [
  6546. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6547. vue.createElementVNode("text", null, "公")
  6548. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6549. key: 1,
  6550. class: "pm-gender female"
  6551. }, [
  6552. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6553. vue.createElementVNode("text", null, "母")
  6554. ])) : vue.createCommentVNode("v-if", true)
  6555. ]),
  6556. vue.createElementVNode(
  6557. "text",
  6558. { class: "pm-breed" },
  6559. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6560. 1
  6561. /* TEXT */
  6562. )
  6563. ])
  6564. ]),
  6565. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6566. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6567. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6568. vue.createElementVNode(
  6569. "text",
  6570. { class: "pm-val" },
  6571. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6572. 1
  6573. /* TEXT */
  6574. )
  6575. ]),
  6576. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6577. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6578. vue.createElementVNode(
  6579. "text",
  6580. { class: "pm-val" },
  6581. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6582. 1
  6583. /* TEXT */
  6584. )
  6585. ]),
  6586. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6587. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6588. vue.createElementVNode(
  6589. "text",
  6590. { class: "pm-val" },
  6591. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6592. 1
  6593. /* TEXT */
  6594. )
  6595. ]),
  6596. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6597. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6598. vue.createElementVNode(
  6599. "text",
  6600. { class: "pm-val" },
  6601. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6602. 1
  6603. /* TEXT */
  6604. )
  6605. ]),
  6606. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6607. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6608. vue.createElementVNode(
  6609. "text",
  6610. { class: "pm-val" },
  6611. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6612. 1
  6613. /* TEXT */
  6614. )
  6615. ])
  6616. ]),
  6617. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6618. key: 0,
  6619. class: "pm-tags-row"
  6620. }, [
  6621. (vue.openBlock(true), vue.createElementBlock(
  6622. vue.Fragment,
  6623. null,
  6624. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6625. return vue.openBlock(), vue.createElementBlock("view", {
  6626. class: "pm-tag-chip",
  6627. key: ti
  6628. }, [
  6629. vue.createElementVNode(
  6630. "text",
  6631. { class: "pm-tag-chip-text" },
  6632. vue.toDisplayString(tag),
  6633. 1
  6634. /* TEXT */
  6635. )
  6636. ]);
  6637. }),
  6638. 128
  6639. /* KEYED_FRAGMENT */
  6640. ))
  6641. ])) : vue.createCommentVNode("v-if", true),
  6642. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6643. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6644. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6645. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6646. ]),
  6647. (vue.openBlock(true), vue.createElementBlock(
  6648. vue.Fragment,
  6649. null,
  6650. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6651. return vue.openBlock(), vue.createElementBlock("view", {
  6652. class: "pm-log-item",
  6653. key: lIndex
  6654. }, [
  6655. vue.createElementVNode(
  6656. "text",
  6657. { class: "pm-log-date" },
  6658. vue.toDisplayString(log.date),
  6659. 1
  6660. /* TEXT */
  6661. ),
  6662. vue.createElementVNode(
  6663. "text",
  6664. { class: "pm-log-text" },
  6665. vue.toDisplayString(log.content),
  6666. 1
  6667. /* TEXT */
  6668. ),
  6669. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6670. "text",
  6671. {
  6672. key: 0,
  6673. class: "pm-log-recorder"
  6674. },
  6675. "记录人:" + vue.toDisplayString(log.recorder),
  6676. 1
  6677. /* TEXT */
  6678. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6679. key: 1,
  6680. class: "pm-log-recorder system"
  6681. }, "系统记录"))
  6682. ]);
  6683. }),
  6684. 128
  6685. /* KEYED_FRAGMENT */
  6686. ))
  6687. ]),
  6688. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6689. ])
  6690. ])
  6691. ])) : vue.createCommentVNode("v-if", true),
  6692. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6693. key: 1,
  6694. class: "upload-modal-mask",
  6695. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6696. }, [
  6697. vue.createElementVNode("view", {
  6698. class: "upload-modal-content",
  6699. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6700. }, ["stop"]))
  6701. }, [
  6702. vue.createElementVNode("view", { class: "um-header" }, [
  6703. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6704. ]),
  6705. vue.createElementVNode("view", { class: "um-body" }, [
  6706. vue.withDirectives(vue.createElementVNode(
  6707. "textarea",
  6708. {
  6709. class: "um-textarea",
  6710. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6711. "auto-height": "",
  6712. placeholder: "请输入宠物备注内容...",
  6713. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6714. },
  6715. null,
  6716. 512
  6717. /* NEED_PATCH */
  6718. ), [
  6719. [vue.vModelText, _ctx.petRemarkText]
  6720. ])
  6721. ]),
  6722. vue.createElementVNode("view", { class: "um-footer" }, [
  6723. vue.createElementVNode("button", {
  6724. class: "um-submit-btn active",
  6725. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6726. }, "确认提交")
  6727. ])
  6728. ])
  6729. ])) : vue.createCommentVNode("v-if", true),
  6730. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6731. key: 2,
  6732. class: "nav-modal-mask",
  6733. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6734. }, [
  6735. vue.createElementVNode("view", {
  6736. class: "nav-action-sheet",
  6737. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6738. }, ["stop"]))
  6739. }, [
  6740. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6741. vue.createElementVNode("view", {
  6742. class: "nav-sheet-item",
  6743. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6744. }, "高德地图"),
  6745. vue.createElementVNode("view", {
  6746. class: "nav-sheet-item",
  6747. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6748. }, "腾讯地图"),
  6749. vue.createElementVNode("view", {
  6750. class: "nav-sheet-item",
  6751. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6752. }, "百度地图"),
  6753. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6754. vue.createElementVNode("view", {
  6755. class: "nav-sheet-item cancel",
  6756. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6757. }, "取消")
  6758. ])
  6759. ])) : vue.createCommentVNode("v-if", true),
  6760. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6761. key: 3,
  6762. class: "upload-modal-mask",
  6763. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6764. }, [
  6765. vue.createElementVNode("view", {
  6766. class: "upload-modal-content",
  6767. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6768. }, ["stop"]))
  6769. }, [
  6770. vue.createElementVNode("view", { class: "um-header" }, [
  6771. vue.createElementVNode(
  6772. "text",
  6773. { class: "um-title" },
  6774. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6775. 1
  6776. /* TEXT */
  6777. ),
  6778. vue.createElementVNode(
  6779. "text",
  6780. { class: "um-remark-hint" },
  6781. vue.toDisplayString(_ctx.currentTaskDesc),
  6782. 1
  6783. /* TEXT */
  6784. )
  6785. ]),
  6786. vue.createElementVNode("view", { class: "um-body" }, [
  6787. vue.createElementVNode("view", { class: "um-grid" }, [
  6788. (vue.openBlock(true), vue.createElementBlock(
  6789. vue.Fragment,
  6790. null,
  6791. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6792. return vue.openBlock(), vue.createElementBlock("view", {
  6793. class: "um-item",
  6794. key: idx
  6795. }, [
  6796. vue.createElementVNode("image", {
  6797. class: "um-preview",
  6798. src: img.thumb || img.url || img.localPath || img,
  6799. mode: "aspectFill"
  6800. }, null, 8, ["src"]),
  6801. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6802. key: 0,
  6803. class: "um-video-badge"
  6804. }, [
  6805. vue.createElementVNode("image", {
  6806. class: "play-icon-small",
  6807. src: _imports_7
  6808. })
  6809. ])) : vue.createCommentVNode("v-if", true),
  6810. vue.createElementVNode("view", {
  6811. class: "um-del",
  6812. onClick: ($event) => _ctx.removeModalMedia(idx)
  6813. }, "×", 8, ["onClick"])
  6814. ]);
  6815. }),
  6816. 128
  6817. /* KEYED_FRAGMENT */
  6818. )),
  6819. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6820. key: 0,
  6821. class: "um-add",
  6822. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6823. }, [
  6824. vue.createElementVNode("image", {
  6825. class: "um-add-icon",
  6826. src: _imports_1$6
  6827. }),
  6828. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6829. ])) : vue.createCommentVNode("v-if", true)
  6830. ]),
  6831. vue.withDirectives(vue.createElementVNode(
  6832. "textarea",
  6833. {
  6834. class: "um-textarea",
  6835. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6836. placeholder: "在此输入备注信息...",
  6837. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6838. },
  6839. null,
  6840. 512
  6841. /* NEED_PATCH */
  6842. ), [
  6843. [vue.vModelText, _ctx.modalRemark]
  6844. ])
  6845. ]),
  6846. vue.createElementVNode("view", { class: "um-footer" }, [
  6847. vue.createElementVNode(
  6848. "view",
  6849. {
  6850. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6851. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6852. },
  6853. " 确认提交",
  6854. 2
  6855. /* CLASS */
  6856. )
  6857. ])
  6858. ])
  6859. ])) : vue.createCommentVNode("v-if", true),
  6860. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6861. key: 4,
  6862. class: "sum-modal-mask",
  6863. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6864. }, [
  6865. vue.createElementVNode("view", {
  6866. class: "sum-modal-card",
  6867. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6868. }, ["stop"]))
  6869. }, [
  6870. vue.createElementVNode("scroll-view", {
  6871. "scroll-y": "",
  6872. class: "sum-modal-scroll"
  6873. }, [
  6874. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6875. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6876. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6877. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6878. vue.createElementVNode(
  6879. "text",
  6880. { class: "sum-meta-val" },
  6881. vue.toDisplayString(_ctx.sumDate),
  6882. 1
  6883. /* TEXT */
  6884. )
  6885. ]),
  6886. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6887. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6888. vue.createElementVNode(
  6889. "text",
  6890. { class: "sum-meta-val" },
  6891. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6892. 1
  6893. /* TEXT */
  6894. )
  6895. ]),
  6896. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6897. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6898. vue.createElementVNode(
  6899. "text",
  6900. { class: "sum-meta-val" },
  6901. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6902. 1
  6903. /* TEXT */
  6904. )
  6905. ]),
  6906. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6907. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6908. vue.createElementVNode("image", {
  6909. class: "sum-pet-avatar",
  6910. src: _ctx.orderDetail.petAvatar,
  6911. mode: "aspectFill"
  6912. }, null, 8, ["src"]),
  6913. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6914. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6915. vue.createElementVNode(
  6916. "text",
  6917. { class: "sum-pet-name" },
  6918. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6919. 1
  6920. /* TEXT */
  6921. ),
  6922. vue.createElementVNode(
  6923. "text",
  6924. { class: "sum-pet-breed" },
  6925. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6926. 1
  6927. /* TEXT */
  6928. )
  6929. ]),
  6930. vue.createElementVNode(
  6931. "text",
  6932. { class: "sum-pet-remark" },
  6933. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6934. 1
  6935. /* TEXT */
  6936. )
  6937. ])
  6938. ]),
  6939. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6940. vue.withDirectives(vue.createElementVNode(
  6941. "textarea",
  6942. {
  6943. class: "sum-textarea",
  6944. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6945. "auto-height": "",
  6946. placeholder: "请填写服务内容...",
  6947. "placeholder-style": "color:#ccc"
  6948. },
  6949. null,
  6950. 512
  6951. /* NEED_PATCH */
  6952. ), [
  6953. [vue.vModelText, _ctx.sumContent]
  6954. ]),
  6955. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6956. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6957. vue.createElementVNode(
  6958. "text",
  6959. { class: "sum-sign-val" },
  6960. vue.toDisplayString(_ctx.sumSigner),
  6961. 1
  6962. /* TEXT */
  6963. )
  6964. ]),
  6965. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6966. ])
  6967. ]),
  6968. vue.createElementVNode("view", { class: "sum-footer" }, [
  6969. vue.createElementVNode("button", {
  6970. class: "sum-submit-btn",
  6971. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6972. }, "提交小结")
  6973. ])
  6974. ])
  6975. ])) : vue.createCommentVNode("v-if", true),
  6976. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6977. key: 5,
  6978. class: "modal-mask",
  6979. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6980. }, [
  6981. vue.createElementVNode("view", {
  6982. class: "anomaly-modal-content",
  6983. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6984. }, ["stop"]))
  6985. }, [
  6986. vue.createElementVNode("view", { class: "am-header" }, [
  6987. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6988. vue.createElementVNode("view", {
  6989. class: "close-icon-btn",
  6990. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6991. }, "×")
  6992. ]),
  6993. vue.createElementVNode("scroll-view", {
  6994. "scroll-y": "",
  6995. class: "am-scroll-list"
  6996. }, [
  6997. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6998. key: 0,
  6999. class: "empty-list"
  7000. }, [
  7001. vue.createElementVNode("image", {
  7002. class: "empty-icon",
  7003. src: _imports_8$1,
  7004. mode: "aspectFit"
  7005. }),
  7006. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  7007. ])) : vue.createCommentVNode("v-if", true),
  7008. (vue.openBlock(true), vue.createElementBlock(
  7009. vue.Fragment,
  7010. null,
  7011. vue.renderList(_ctx.anomalyList, (item, index) => {
  7012. return vue.openBlock(), vue.createElementBlock("view", {
  7013. class: "am-item",
  7014. key: index
  7015. }, [
  7016. vue.createElementVNode("view", { class: "am-item-header" }, [
  7017. vue.createElementVNode(
  7018. "text",
  7019. { class: "am-item-type" },
  7020. vue.toDisplayString(item.typeLabel),
  7021. 1
  7022. /* TEXT */
  7023. ),
  7024. vue.createElementVNode(
  7025. "text",
  7026. {
  7027. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  7028. },
  7029. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  7030. 3
  7031. /* TEXT, CLASS */
  7032. )
  7033. ]),
  7034. vue.createElementVNode(
  7035. "text",
  7036. { class: "am-item-content" },
  7037. vue.toDisplayString(item.content),
  7038. 1
  7039. /* TEXT */
  7040. ),
  7041. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7042. key: 0,
  7043. class: "am-item-photos"
  7044. }, [
  7045. (vue.openBlock(true), vue.createElementBlock(
  7046. vue.Fragment,
  7047. null,
  7048. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  7049. return vue.openBlock(), vue.createElementBlock("view", {
  7050. class: "am-photo-item",
  7051. key: pIdx,
  7052. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  7053. }, [
  7054. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  7055. key: 0,
  7056. class: "am-photo",
  7057. src: photoUrl,
  7058. mode: "aspectFill"
  7059. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  7060. key: 1,
  7061. class: "tl-video-placeholder miniaturized"
  7062. }, [
  7063. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  7064. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  7065. ]))
  7066. ], 8, ["onClick"]);
  7067. }),
  7068. 128
  7069. /* KEYED_FRAGMENT */
  7070. ))
  7071. ])) : vue.createCommentVNode("v-if", true),
  7072. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7073. key: 1,
  7074. class: "am-audit-box"
  7075. }, [
  7076. vue.createElementVNode("view", { class: "am-audit-header" }, [
  7077. vue.createElementVNode(
  7078. "text",
  7079. { class: "am-audit-label" },
  7080. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  7081. 1
  7082. /* TEXT */
  7083. ),
  7084. vue.createElementVNode(
  7085. "text",
  7086. { class: "am-audit-time" },
  7087. vue.toDisplayString(item.auditTime),
  7088. 1
  7089. /* TEXT */
  7090. )
  7091. ]),
  7092. vue.createElementVNode(
  7093. "text",
  7094. { class: "am-audit-remark" },
  7095. vue.toDisplayString(item.auditRemark || "无"),
  7096. 1
  7097. /* TEXT */
  7098. )
  7099. ])) : vue.createCommentVNode("v-if", true)
  7100. ]);
  7101. }),
  7102. 128
  7103. /* KEYED_FRAGMENT */
  7104. ))
  7105. ])
  7106. ])
  7107. ])) : vue.createCommentVNode("v-if", true),
  7108. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  7109. key: 6,
  7110. class: "video-player-mask",
  7111. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  7112. }, [
  7113. vue.createElementVNode("view", {
  7114. class: "video-player-content",
  7115. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  7116. }, ["stop"]))
  7117. }, [
  7118. vue.createElementVNode("video", {
  7119. class: "v-player",
  7120. src: _ctx.videoPlayerUrl,
  7121. autoplay: "",
  7122. controls: ""
  7123. }, null, 8, ["src"]),
  7124. vue.createElementVNode("view", {
  7125. class: "v-close",
  7126. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  7127. }, "×")
  7128. ])
  7129. ])) : vue.createCommentVNode("v-if", true)
  7130. ],
  7131. 64
  7132. /* STABLE_FRAGMENT */
  7133. ))
  7134. ]);
  7135. }
  7136. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  7137. const _sfc_main$q = {
  7138. data() {
  7139. return {
  7140. orderId: "",
  7141. // 已选异常类型(dictValue)
  7142. selectedTypeValue: "",
  7143. // 已选异常类型标签(dictLabel,用于显示)
  7144. selectedTypeLabel: "",
  7145. // 异常描述
  7146. anomalyDesc: "",
  7147. // 照片列表(含 url 和 ossId)
  7148. photoList: [],
  7149. // 是否显示类型选择器
  7150. showTypeSheet: false,
  7151. // 异常类型字典列表(从后端获取)
  7152. anomalyTypes: []
  7153. };
  7154. },
  7155. onLoad(options) {
  7156. if (options.orderId) {
  7157. this.orderId = options.orderId;
  7158. }
  7159. this.loadAnomalyTypes();
  7160. },
  7161. computed: {
  7162. // 当前选中的类型显示文本
  7163. selectedType() {
  7164. return this.selectedTypeLabel || "";
  7165. }
  7166. },
  7167. methods: {
  7168. /**
  7169. * 加载异常类型字典数据
  7170. */
  7171. async loadAnomalyTypes() {
  7172. try {
  7173. const res = await getDictDataByType("flf_anamaly_type");
  7174. if (res.data && Array.isArray(res.data)) {
  7175. this.anomalyTypes = res.data.map((item) => ({
  7176. label: item.dictLabel,
  7177. value: item.dictValue,
  7178. dictCode: item.dictCode
  7179. }));
  7180. formatAppLog("log", "at pages/orders/anomaly.vue:137", "异常类型字典:", this.anomalyTypes);
  7181. }
  7182. } catch (err) {
  7183. formatAppLog("error", "at pages/orders/anomaly.vue:140", "获取异常类型字典失败:", err);
  7184. }
  7185. },
  7186. // 打开类型选择器
  7187. openTypeSheet() {
  7188. this.showTypeSheet = true;
  7189. },
  7190. // 关闭类型选择器
  7191. closeTypeSheet() {
  7192. this.showTypeSheet = false;
  7193. },
  7194. // 选择异常类型
  7195. selectType(type) {
  7196. this.selectedTypeValue = type.value;
  7197. this.selectedTypeLabel = type.label;
  7198. this.closeTypeSheet();
  7199. },
  7200. // 选择照片并上传
  7201. choosePhoto() {
  7202. uni.chooseImage({
  7203. count: 5 - this.photoList.length,
  7204. sizeType: ["compressed"],
  7205. sourceType: ["album", "camera"],
  7206. success: async (res) => {
  7207. uni.showLoading({ title: "上传中..." });
  7208. try {
  7209. for (const filePath of res.tempFilePaths) {
  7210. const uploadRes = await uploadFile(filePath);
  7211. if (uploadRes.code === 200) {
  7212. this.photoList.push({
  7213. url: uploadRes.data.url,
  7214. ossId: uploadRes.data.ossId,
  7215. localPath: filePath
  7216. });
  7217. }
  7218. }
  7219. uni.hideLoading();
  7220. } catch (err) {
  7221. uni.hideLoading();
  7222. formatAppLog("error", "at pages/orders/anomaly.vue:179", "上传失败:", err);
  7223. uni.showToast({ title: "上传失败", icon: "none" });
  7224. }
  7225. }
  7226. });
  7227. },
  7228. // 删除照片
  7229. removePhoto(idx) {
  7230. this.photoList.splice(idx, 1);
  7231. },
  7232. // 提交上报
  7233. async submitAnomaly() {
  7234. if (!this.selectedTypeValue) {
  7235. uni.showToast({ title: "请选择异常类型", icon: "none" });
  7236. return;
  7237. }
  7238. if (this.photoList.length === 0) {
  7239. uni.showToast({ title: "请上传现场照片", icon: "none" });
  7240. return;
  7241. }
  7242. const data = {
  7243. orderId: this.orderId,
  7244. type: this.selectedTypeValue,
  7245. content: this.anomalyDesc,
  7246. photos: this.photoList.map((p) => p.ossId)
  7247. };
  7248. try {
  7249. uni.showLoading({ title: "提交中..." });
  7250. await uploadAnamaly(data);
  7251. uni.hideLoading();
  7252. uni.showToast({ title: "上报成功", icon: "success" });
  7253. setTimeout(() => {
  7254. uni.navigateBack();
  7255. }, 1500);
  7256. } catch (err) {
  7257. uni.hideLoading();
  7258. formatAppLog("error", "at pages/orders/anomaly.vue:215", "异常上报失败:", err);
  7259. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  7260. }
  7261. }
  7262. }
  7263. };
  7264. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  7265. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  7266. vue.createElementVNode("scroll-view", {
  7267. "scroll-y": "",
  7268. class: "anomaly-scroll"
  7269. }, [
  7270. vue.createElementVNode("view", { class: "ano-card" }, [
  7271. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7272. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7273. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  7274. ]),
  7275. vue.createElementVNode("view", {
  7276. class: "ano-type-row",
  7277. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  7278. }, [
  7279. vue.createElementVNode(
  7280. "text",
  7281. {
  7282. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  7283. },
  7284. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  7285. 3
  7286. /* TEXT, CLASS */
  7287. ),
  7288. vue.createElementVNode("image", {
  7289. class: "ano-right-arrow",
  7290. src: _imports_0$2
  7291. })
  7292. ])
  7293. ]),
  7294. vue.createElementVNode("view", { class: "ano-card" }, [
  7295. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7296. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7297. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  7298. ]),
  7299. vue.withDirectives(vue.createElementVNode(
  7300. "textarea",
  7301. {
  7302. class: "ano-textarea",
  7303. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  7304. placeholder: "请详细描述现场异常情况...",
  7305. "placeholder-style": "color:#ccc; font-size:28rpx;",
  7306. maxlength: "500"
  7307. },
  7308. null,
  7309. 512
  7310. /* NEED_PATCH */
  7311. ), [
  7312. [vue.vModelText, $data.anomalyDesc]
  7313. ])
  7314. ]),
  7315. vue.createElementVNode("view", { class: "ano-card" }, [
  7316. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7317. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7318. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  7319. ]),
  7320. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  7321. (vue.openBlock(true), vue.createElementBlock(
  7322. vue.Fragment,
  7323. null,
  7324. vue.renderList($data.photoList, (img, idx) => {
  7325. return vue.openBlock(), vue.createElementBlock("view", {
  7326. class: "ano-photo-item",
  7327. key: idx
  7328. }, [
  7329. vue.createElementVNode("image", {
  7330. class: "ano-photo-preview",
  7331. src: img.url || img.localPath || img,
  7332. mode: "aspectFill"
  7333. }, null, 8, ["src"]),
  7334. vue.createElementVNode("view", {
  7335. class: "ano-photo-del",
  7336. onClick: ($event) => $options.removePhoto(idx)
  7337. }, "×", 8, ["onClick"])
  7338. ]);
  7339. }),
  7340. 128
  7341. /* KEYED_FRAGMENT */
  7342. )),
  7343. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7344. key: 0,
  7345. class: "ano-photo-add",
  7346. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7347. }, [
  7348. vue.createElementVNode("image", {
  7349. class: "ano-add-icon",
  7350. src: _imports_1$6
  7351. }),
  7352. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7353. ])) : vue.createCommentVNode("v-if", true)
  7354. ])
  7355. ]),
  7356. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7357. ]),
  7358. vue.createElementVNode("view", { class: "ano-footer" }, [
  7359. vue.createElementVNode("button", {
  7360. class: "ano-submit-btn",
  7361. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7362. }, "提交上报")
  7363. ]),
  7364. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7365. key: 0,
  7366. class: "ano-sheet-mask",
  7367. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7368. }, [
  7369. vue.createElementVNode("view", {
  7370. class: "ano-sheet",
  7371. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7372. }, ["stop"]))
  7373. }, [
  7374. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7375. vue.createElementVNode("scroll-view", {
  7376. "scroll-y": "",
  7377. class: "ano-sheet-list"
  7378. }, [
  7379. (vue.openBlock(true), vue.createElementBlock(
  7380. vue.Fragment,
  7381. null,
  7382. vue.renderList($data.anomalyTypes, (type, idx) => {
  7383. return vue.openBlock(), vue.createElementBlock("view", {
  7384. class: "ano-sheet-item",
  7385. key: idx,
  7386. onClick: ($event) => $options.selectType(type)
  7387. }, [
  7388. vue.createElementVNode(
  7389. "text",
  7390. {
  7391. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7392. },
  7393. vue.toDisplayString(type.label),
  7394. 3
  7395. /* TEXT, CLASS */
  7396. ),
  7397. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7398. key: 0,
  7399. class: "ano-check-icon",
  7400. src: _imports_0$2
  7401. })) : vue.createCommentVNode("v-if", true)
  7402. ], 8, ["onClick"]);
  7403. }),
  7404. 128
  7405. /* KEYED_FRAGMENT */
  7406. ))
  7407. ]),
  7408. vue.createElementVNode("view", {
  7409. class: "ano-sheet-cancel",
  7410. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7411. }, "取消")
  7412. ])
  7413. ])) : vue.createCommentVNode("v-if", true)
  7414. ]);
  7415. }
  7416. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7417. const _sfc_main$p = {
  7418. data() {
  7419. return {
  7420. tabs: ["全部", "已完成", "已拒绝"],
  7421. activeTab: 0,
  7422. stats: {
  7423. total: 0,
  7424. reject: 0,
  7425. reward: 0,
  7426. punish: 0
  7427. },
  7428. orders: [],
  7429. serviceList: [],
  7430. pageNum: 1,
  7431. pageSize: 10,
  7432. total: 0,
  7433. loading: false
  7434. };
  7435. },
  7436. computed: {
  7437. filteredOrders() {
  7438. return this.orders;
  7439. }
  7440. },
  7441. async onLoad() {
  7442. await this.loadServiceList();
  7443. this.fetchStats();
  7444. this.fetchOrders(true);
  7445. },
  7446. methods: {
  7447. async loadServiceList() {
  7448. try {
  7449. const res = await listAllService();
  7450. this.serviceList = res.data || [];
  7451. } catch (err) {
  7452. formatAppLog("error", "at pages/mine/order-stats.vue:161", "获取服务类型失败:", err);
  7453. }
  7454. },
  7455. async fetchStats() {
  7456. try {
  7457. const res = await getOrderStats();
  7458. if (res.code === 200 && res.data) {
  7459. this.stats = {
  7460. ...this.stats,
  7461. ...res.data
  7462. };
  7463. }
  7464. } catch (err) {
  7465. formatAppLog("error", "at pages/mine/order-stats.vue:174", "获取统计值失败:", err);
  7466. }
  7467. },
  7468. async fetchOrders(reset = false) {
  7469. if (reset) {
  7470. this.pageNum = 1;
  7471. this.orders = [];
  7472. }
  7473. if (this.loading)
  7474. return;
  7475. if (!reset && this.orders.length >= this.total && this.total !== 0)
  7476. return;
  7477. this.loading = true;
  7478. try {
  7479. const statusMap = { 0: void 0, 1: 4, 2: 5 };
  7480. const params = {
  7481. status: statusMap[this.activeTab],
  7482. pageNum: this.pageNum,
  7483. pageSize: this.pageSize
  7484. };
  7485. const res = await getStatisticOrders(params);
  7486. if (res.code === 200) {
  7487. this.total = res.total || 0;
  7488. const rows = res.rows || [];
  7489. const mapped = rows.map((item) => this.transformOrder(item));
  7490. this.orders = this.orders.concat(mapped);
  7491. this.pageNum++;
  7492. }
  7493. } catch (err) {
  7494. formatAppLog("error", "at pages/mine/order-stats.vue:202", "获取订单列表失败:", err);
  7495. } finally {
  7496. this.loading = false;
  7497. }
  7498. },
  7499. transformOrder(order) {
  7500. const service = this.serviceList.find((s) => s.id === order.service);
  7501. const mode = (service == null ? void 0 : service.mode) || 0;
  7502. const isRoundTrip = mode === 1;
  7503. const statusMap = {
  7504. 0: { label: "待派单", color: "#f56c6c" },
  7505. 1: { label: "待接单", color: "#e6a23c" },
  7506. 2: { label: "待服务", color: "#49a3ff" },
  7507. 3: { label: "服务中", color: "#49a3ff" },
  7508. 4: { label: "已完成", color: "#67c23a" },
  7509. 5: { label: "已取消", color: "#909399" }
  7510. };
  7511. const statusInfo = statusMap[order.status] || { label: "未知", color: "#999" };
  7512. return {
  7513. id: order.id,
  7514. orderType: isRoundTrip ? 1 : 2,
  7515. typeName: (service == null ? void 0 : service.name) || "未知",
  7516. typeIcon: (service == null ? void 0 : service.iconUrl) || "",
  7517. statusLabel: statusInfo.label,
  7518. statusColor: statusInfo.color,
  7519. finishTime: order.serviceTime || "",
  7520. serviceTime: order.serviceTime || "",
  7521. petName: order.petName || "未知",
  7522. petBreed: order.breed || "未知",
  7523. petAvatar: order.petAvatarUrl || "/static/dog.png",
  7524. price: (order.price / 100).toFixed(2),
  7525. startName: order.fromAddress || "",
  7526. startAddr: order.fromAddress || "",
  7527. endName: (order.customerName || "") + " " + (order.customerPhone || ""),
  7528. endAddr: order.toAddress || "",
  7529. serviceNote: order.remark || ""
  7530. };
  7531. },
  7532. switchTab(idx) {
  7533. this.activeTab = idx;
  7534. this.fetchOrders(true);
  7535. },
  7536. onReachBottom() {
  7537. this.fetchOrders();
  7538. },
  7539. navBack() {
  7540. uni.navigateBack();
  7541. }
  7542. }
  7543. };
  7544. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  7545. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7546. vue.createElementVNode("view", { class: "stats-banner" }, [
  7547. vue.createElementVNode("view", { class: "banner-item" }, [
  7548. vue.createElementVNode(
  7549. "text",
  7550. { class: "banner-num" },
  7551. vue.toDisplayString($data.stats.total),
  7552. 1
  7553. /* TEXT */
  7554. ),
  7555. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7556. ]),
  7557. vue.createElementVNode("view", { class: "banner-item" }, [
  7558. vue.createElementVNode(
  7559. "text",
  7560. { class: "banner-num" },
  7561. vue.toDisplayString($data.stats.reject),
  7562. 1
  7563. /* TEXT */
  7564. ),
  7565. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7566. ]),
  7567. vue.createElementVNode("view", { class: "banner-item" }, [
  7568. vue.createElementVNode(
  7569. "text",
  7570. { class: "banner-num" },
  7571. vue.toDisplayString($data.stats.reward),
  7572. 1
  7573. /* TEXT */
  7574. ),
  7575. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7576. ]),
  7577. vue.createElementVNode("view", { class: "banner-item" }, [
  7578. vue.createElementVNode(
  7579. "text",
  7580. { class: "banner-num" },
  7581. vue.toDisplayString($data.stats.punish),
  7582. 1
  7583. /* TEXT */
  7584. ),
  7585. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7586. ])
  7587. ]),
  7588. vue.createElementVNode("view", { class: "tab-bar" }, [
  7589. (vue.openBlock(true), vue.createElementBlock(
  7590. vue.Fragment,
  7591. null,
  7592. vue.renderList($data.tabs, (tab, idx) => {
  7593. return vue.openBlock(), vue.createElementBlock("view", {
  7594. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7595. key: idx,
  7596. onClick: ($event) => $options.switchTab(idx)
  7597. }, [
  7598. vue.createElementVNode(
  7599. "text",
  7600. null,
  7601. vue.toDisplayString(tab),
  7602. 1
  7603. /* TEXT */
  7604. ),
  7605. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7606. key: 0,
  7607. class: "tab-line"
  7608. })) : vue.createCommentVNode("v-if", true)
  7609. ], 10, ["onClick"]);
  7610. }),
  7611. 128
  7612. /* KEYED_FRAGMENT */
  7613. ))
  7614. ]),
  7615. vue.createElementVNode(
  7616. "scroll-view",
  7617. {
  7618. "scroll-y": "",
  7619. class: "order-scroll",
  7620. onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
  7621. },
  7622. [
  7623. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7624. (vue.openBlock(true), vue.createElementBlock(
  7625. vue.Fragment,
  7626. null,
  7627. vue.renderList($options.filteredOrders, (order, idx) => {
  7628. return vue.openBlock(), vue.createElementBlock("view", {
  7629. class: "order-card",
  7630. key: idx
  7631. }, [
  7632. vue.createElementVNode("view", { class: "card-header" }, [
  7633. vue.createElementVNode("view", { class: "type-badge" }, [
  7634. vue.createElementVNode("image", {
  7635. class: "type-icon",
  7636. src: order.typeIcon
  7637. }, null, 8, ["src"]),
  7638. vue.createElementVNode(
  7639. "text",
  7640. { class: "type-text" },
  7641. vue.toDisplayString(order.typeName),
  7642. 1
  7643. /* TEXT */
  7644. )
  7645. ]),
  7646. vue.createElementVNode(
  7647. "text",
  7648. {
  7649. class: "status-text",
  7650. style: vue.normalizeStyle({ color: order.statusColor })
  7651. },
  7652. vue.toDisplayString(order.statusLabel),
  7653. 5
  7654. /* TEXT, STYLE */
  7655. )
  7656. ]),
  7657. vue.createElementVNode(
  7658. "text",
  7659. { class: "service-time" },
  7660. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7661. 1
  7662. /* TEXT */
  7663. ),
  7664. vue.createElementVNode("view", { class: "pet-card" }, [
  7665. vue.createElementVNode("image", {
  7666. class: "pet-avatar",
  7667. src: order.petAvatar,
  7668. mode: "aspectFill"
  7669. }, null, 8, ["src"]),
  7670. vue.createElementVNode("view", { class: "pet-info" }, [
  7671. vue.createElementVNode(
  7672. "text",
  7673. { class: "pet-name" },
  7674. vue.toDisplayString(order.petName),
  7675. 1
  7676. /* TEXT */
  7677. ),
  7678. vue.createElementVNode(
  7679. "text",
  7680. { class: "pet-breed" },
  7681. "品种: " + vue.toDisplayString(order.petBreed),
  7682. 1
  7683. /* TEXT */
  7684. )
  7685. ]),
  7686. vue.createElementVNode(
  7687. "text",
  7688. { class: "pet-price" },
  7689. "¥" + vue.toDisplayString(order.price),
  7690. 1
  7691. /* TEXT */
  7692. )
  7693. ]),
  7694. vue.createElementVNode("view", { class: "route-info" }, [
  7695. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7696. vue.Fragment,
  7697. { key: 0 },
  7698. [
  7699. vue.createElementVNode("view", { class: "route-item" }, [
  7700. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7701. vue.createElementVNode("view", { class: "route-connector" }),
  7702. vue.createElementVNode("view", { class: "address-box" }, [
  7703. vue.createElementVNode(
  7704. "text",
  7705. { class: "addr-title" },
  7706. vue.toDisplayString(order.startName),
  7707. 1
  7708. /* TEXT */
  7709. ),
  7710. vue.createElementVNode(
  7711. "text",
  7712. { class: "addr-desc" },
  7713. vue.toDisplayString(order.startAddr),
  7714. 1
  7715. /* TEXT */
  7716. )
  7717. ])
  7718. ]),
  7719. vue.createElementVNode("view", { class: "route-item" }, [
  7720. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7721. vue.createElementVNode("view", { class: "address-box" }, [
  7722. vue.createElementVNode(
  7723. "text",
  7724. { class: "addr-title" },
  7725. vue.toDisplayString(order.endName),
  7726. 1
  7727. /* TEXT */
  7728. ),
  7729. vue.createElementVNode(
  7730. "text",
  7731. { class: "addr-desc" },
  7732. vue.toDisplayString(order.endAddr),
  7733. 1
  7734. /* TEXT */
  7735. )
  7736. ])
  7737. ])
  7738. ],
  7739. 64
  7740. /* STABLE_FRAGMENT */
  7741. )) : (vue.openBlock(), vue.createElementBlock(
  7742. vue.Fragment,
  7743. { key: 1 },
  7744. [
  7745. vue.createElementVNode("view", { class: "route-item" }, [
  7746. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7747. vue.createElementVNode("view", { class: "address-box" }, [
  7748. vue.createElementVNode(
  7749. "text",
  7750. { class: "addr-title" },
  7751. vue.toDisplayString(order.endName),
  7752. 1
  7753. /* TEXT */
  7754. ),
  7755. vue.createElementVNode(
  7756. "text",
  7757. { class: "addr-desc" },
  7758. vue.toDisplayString(order.endAddr),
  7759. 1
  7760. /* TEXT */
  7761. )
  7762. ])
  7763. ]),
  7764. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7765. key: 0,
  7766. class: "service-note-row"
  7767. }, [
  7768. vue.createElementVNode(
  7769. "text",
  7770. { class: "service-note-text" },
  7771. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7772. 1
  7773. /* TEXT */
  7774. )
  7775. ])) : vue.createCommentVNode("v-if", true)
  7776. ],
  7777. 64
  7778. /* STABLE_FRAGMENT */
  7779. ))
  7780. ])
  7781. ]);
  7782. }),
  7783. 128
  7784. /* KEYED_FRAGMENT */
  7785. )),
  7786. $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7787. key: 0,
  7788. class: "empty-state"
  7789. }, [
  7790. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7791. ])) : vue.createCommentVNode("v-if", true),
  7792. $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7793. key: 1,
  7794. class: "loading-more"
  7795. }, [
  7796. vue.createElementVNode("text", null, "加载中...")
  7797. ])) : vue.createCommentVNode("v-if", true),
  7798. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7799. ],
  7800. 32
  7801. /* NEED_HYDRATION */
  7802. )
  7803. ]);
  7804. }
  7805. const PagesMineOrderStats = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/order-stats.vue"]]);
  7806. function getBalanceOnApp() {
  7807. return request({
  7808. url: "/fulfiller/log/balanceOnApp",
  7809. method: "GET"
  7810. });
  7811. }
  7812. function pageBalanceOnApp(data) {
  7813. return request({
  7814. url: "/fulfiller/log/pageBalanceOnApp",
  7815. method: "GET",
  7816. data
  7817. });
  7818. }
  7819. function listBalanceOnApp(data) {
  7820. return request({
  7821. url: "/fulfiller/log/listBalanceOnApp",
  7822. method: "GET",
  7823. data
  7824. });
  7825. }
  7826. function pointsOnApp() {
  7827. return request({
  7828. url: "/fulfiller/log/pointsOnApp",
  7829. method: "GET"
  7830. });
  7831. }
  7832. function pagePointsOnApp(data) {
  7833. return request({
  7834. url: "/fulfiller/log/pagePointsOnApp",
  7835. method: "GET",
  7836. data
  7837. });
  7838. }
  7839. function listPointsOnApp(data) {
  7840. return request({
  7841. url: "/fulfiller/log/listPointsOnApp",
  7842. method: "GET",
  7843. data
  7844. });
  7845. }
  7846. function countOnAppReward(data) {
  7847. return request({
  7848. url: "/fulfiller/log/countOnAppReward",
  7849. method: "GET",
  7850. data
  7851. });
  7852. }
  7853. function listOnAppReward(data) {
  7854. return request({
  7855. url: "/fulfiller/log/listOnAppReward",
  7856. method: "GET",
  7857. data
  7858. });
  7859. }
  7860. const FlfBalanceBizType = {
  7861. admin_reward: "后台奖励",
  7862. admin_punish: "后台惩罚",
  7863. admin_adjust: "后台调整",
  7864. order_reward: "订单奖励",
  7865. order_punish: "订单惩罚",
  7866. order_finish: "订单完成",
  7867. salary: "工资发放",
  7868. withdraw: "提现"
  7869. };
  7870. const FlfPointsBizType = {
  7871. admin_reward: "后台奖励",
  7872. admin_punish: "后台惩罚",
  7873. admin_adjust: "后台调整",
  7874. order_reward: "订单奖励",
  7875. order_punish: "订单惩罚",
  7876. order_finish: "订单完成"
  7877. };
  7878. const FlfRewardBizType = {
  7879. admin_reward: "后台奖励",
  7880. admin_punish: "后台惩罚",
  7881. order_reward: "订单奖励",
  7882. order_punish: "订单惩罚",
  7883. order_finish: "订单完成"
  7884. };
  7885. const FlfActionType = {
  7886. add: "收入",
  7887. reduce: "支出"
  7888. };
  7889. const fulfillerEnum = {
  7890. FlfBalanceBizType,
  7891. FlfPointsBizType,
  7892. FlfRewardBizType,
  7893. FlfActionType
  7894. };
  7895. const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
  7896. const _sfc_main$o = {
  7897. data() {
  7898. const now = /* @__PURE__ */ new Date();
  7899. return {
  7900. tabs: ["全部", "奖励", "惩罚"],
  7901. activeTab: 0,
  7902. selectedYear: now.getFullYear(),
  7903. selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
  7904. // 默认当前月,处理一下测试数据时间
  7905. // 统计数据
  7906. stats: {
  7907. rewardCount: 0,
  7908. punishCount: 0,
  7909. rewardBalance: 0,
  7910. punishBalance: 0
  7911. },
  7912. // 月份选择器状态
  7913. showMonthPicker: false,
  7914. pickerYear: 2026,
  7915. pickerMonth: 3,
  7916. years: [2024, 2025, 2026],
  7917. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7918. yearScrollTop: 0,
  7919. monthScrollTop: 0,
  7920. // 奖惩记录列表
  7921. records: []
  7922. };
  7923. },
  7924. computed: {
  7925. filteredList() {
  7926. if (this.activeTab === 0)
  7927. return this.records;
  7928. const targetType = this.activeTab === 1 ? "reward" : "penalty";
  7929. return this.records.filter((r) => r.type === targetType);
  7930. }
  7931. },
  7932. onShow() {
  7933. if (this.selectedYear === 2026 && this.selectedMonth === 2)
  7934. ;
  7935. this.fetchData();
  7936. },
  7937. methods: {
  7938. async fetchData() {
  7939. const params = {
  7940. year: this.selectedYear,
  7941. month: this.selectedMonth
  7942. };
  7943. this.fetchStats(params);
  7944. this.fetchList(params);
  7945. },
  7946. async fetchStats(params) {
  7947. try {
  7948. const res = await countOnAppReward(params);
  7949. if (res.code === 200) {
  7950. this.stats = res.data || {
  7951. rewardCount: 0,
  7952. punishCount: 0,
  7953. rewardBalance: 0,
  7954. punishBalance: 0
  7955. };
  7956. }
  7957. } catch (err) {
  7958. formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
  7959. }
  7960. },
  7961. async fetchList(params) {
  7962. try {
  7963. const res = await listOnAppReward(params);
  7964. if (res.code === 200) {
  7965. const list = res.data || [];
  7966. this.records = list.map((item) => {
  7967. const isAdd = item.type === "add";
  7968. const amountVal = Math.abs(item.amount) / 100;
  7969. let dateStr = "";
  7970. if (item.createTime) {
  7971. const datePart = item.createTime.split(" ")[0];
  7972. const parts = datePart.split("-");
  7973. if (parts.length >= 3) {
  7974. dateStr = `${parts[1]}-${parts[2]}`;
  7975. }
  7976. }
  7977. return {
  7978. ...item,
  7979. date: dateStr,
  7980. title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
  7981. desc: item.reason || "",
  7982. amount: isAdd ? amountVal : -amountVal,
  7983. type: isAdd ? "reward" : "penalty",
  7984. status: isAdd ? "已入账" : "已扣款",
  7985. // 简化处理状态
  7986. statusClass: isAdd ? "credited" : "deducted"
  7987. };
  7988. });
  7989. }
  7990. } catch (err) {
  7991. formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
  7992. }
  7993. },
  7994. switchTab(idx) {
  7995. this.activeTab = idx;
  7996. },
  7997. openMonthPicker() {
  7998. this.pickerYear = this.selectedYear;
  7999. this.pickerMonth = this.selectedMonth;
  8000. this.showMonthPicker = true;
  8001. },
  8002. closeMonthPicker() {
  8003. this.showMonthPicker = false;
  8004. },
  8005. confirmMonthPicker() {
  8006. this.selectedYear = this.pickerYear;
  8007. this.selectedMonth = this.pickerMonth;
  8008. this.closeMonthPicker();
  8009. this.fetchData();
  8010. },
  8011. goToAll() {
  8012. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  8013. }
  8014. }
  8015. };
  8016. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  8017. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8018. vue.createElementVNode("view", { class: "top-banner" }, [
  8019. vue.createElementVNode("view", {
  8020. class: "month-btn",
  8021. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  8022. }, [
  8023. vue.createElementVNode(
  8024. "text",
  8025. { class: "month-text" },
  8026. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  8027. 1
  8028. /* TEXT */
  8029. )
  8030. ]),
  8031. vue.createElementVNode("view", { class: "stats-grid" }, [
  8032. vue.createElementVNode("view", { class: "stats-cell" }, [
  8033. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  8034. vue.createElementVNode("text", { class: "stats-num" }, [
  8035. vue.createTextVNode(
  8036. vue.toDisplayString($data.stats.rewardCount),
  8037. 1
  8038. /* TEXT */
  8039. ),
  8040. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  8041. ]),
  8042. vue.createElementVNode("view", { class: "stats-divider" }),
  8043. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8044. ]),
  8045. vue.createElementVNode("view", { class: "stats-cell" }, [
  8046. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  8047. vue.createElementVNode("text", { class: "stats-num" }, [
  8048. vue.createTextVNode(
  8049. vue.toDisplayString($data.stats.punishCount),
  8050. 1
  8051. /* TEXT */
  8052. ),
  8053. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  8054. ]),
  8055. vue.createElementVNode("view", { class: "stats-divider" }),
  8056. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8057. ]),
  8058. vue.createElementVNode("view", { class: "stats-cell" }, [
  8059. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  8060. vue.createElementVNode(
  8061. "text",
  8062. { class: "stats-num reward-num" },
  8063. vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
  8064. 1
  8065. /* TEXT */
  8066. ),
  8067. vue.createElementVNode("view", { class: "stats-divider" }),
  8068. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8069. ]),
  8070. vue.createElementVNode("view", { class: "stats-cell" }, [
  8071. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  8072. vue.createElementVNode(
  8073. "text",
  8074. { class: "stats-num penalty-num" },
  8075. vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
  8076. 1
  8077. /* TEXT */
  8078. ),
  8079. vue.createElementVNode("view", { class: "stats-divider" }),
  8080. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8081. ])
  8082. ])
  8083. ]),
  8084. vue.createElementVNode("view", { class: "list-header" }, [
  8085. vue.createElementVNode("view", { class: "tab-bar" }, [
  8086. (vue.openBlock(true), vue.createElementBlock(
  8087. vue.Fragment,
  8088. null,
  8089. vue.renderList($data.tabs, (tab, idx) => {
  8090. return vue.openBlock(), vue.createElementBlock("view", {
  8091. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8092. key: idx,
  8093. onClick: ($event) => $options.switchTab(idx)
  8094. }, [
  8095. vue.createElementVNode(
  8096. "text",
  8097. null,
  8098. vue.toDisplayString(tab),
  8099. 1
  8100. /* TEXT */
  8101. ),
  8102. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8103. key: 0,
  8104. class: "tab-line"
  8105. })) : vue.createCommentVNode("v-if", true)
  8106. ], 10, ["onClick"]);
  8107. }),
  8108. 128
  8109. /* KEYED_FRAGMENT */
  8110. ))
  8111. ]),
  8112. vue.createElementVNode("view", {
  8113. class: "view-all-btn",
  8114. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  8115. }, [
  8116. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  8117. ])
  8118. ]),
  8119. vue.createElementVNode("view", { class: "record-list" }, [
  8120. (vue.openBlock(true), vue.createElementBlock(
  8121. vue.Fragment,
  8122. null,
  8123. vue.renderList($options.filteredList, (item, idx) => {
  8124. return vue.openBlock(), vue.createElementBlock("view", {
  8125. class: "record-item",
  8126. key: idx
  8127. }, [
  8128. vue.createElementVNode(
  8129. "view",
  8130. {
  8131. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8132. },
  8133. [
  8134. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8135. ],
  8136. 2
  8137. /* CLASS */
  8138. ),
  8139. vue.createElementVNode("view", { class: "ri-content" }, [
  8140. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8141. vue.createElementVNode(
  8142. "text",
  8143. { class: "ri-date" },
  8144. vue.toDisplayString(item.date),
  8145. 1
  8146. /* TEXT */
  8147. ),
  8148. vue.createElementVNode(
  8149. "text",
  8150. { class: "ri-title" },
  8151. vue.toDisplayString(item.title),
  8152. 1
  8153. /* TEXT */
  8154. )
  8155. ]),
  8156. vue.createElementVNode(
  8157. "text",
  8158. { class: "ri-desc" },
  8159. vue.toDisplayString(item.desc),
  8160. 1
  8161. /* TEXT */
  8162. )
  8163. ]),
  8164. vue.createElementVNode("view", { class: "ri-right" }, [
  8165. vue.createElementVNode(
  8166. "text",
  8167. {
  8168. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8169. },
  8170. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8171. 3
  8172. /* TEXT, CLASS */
  8173. ),
  8174. vue.createElementVNode(
  8175. "text",
  8176. {
  8177. class: vue.normalizeClass(["ri-status", item.statusClass])
  8178. },
  8179. vue.toDisplayString(item.status),
  8180. 3
  8181. /* TEXT, CLASS */
  8182. )
  8183. ])
  8184. ]);
  8185. }),
  8186. 128
  8187. /* KEYED_FRAGMENT */
  8188. )),
  8189. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  8190. ]),
  8191. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  8192. key: 0,
  8193. class: "picker-mask",
  8194. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8195. }, [
  8196. vue.createElementVNode("view", {
  8197. class: "picker-sheet",
  8198. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  8199. }, ["stop"]))
  8200. }, [
  8201. vue.createElementVNode("view", { class: "picker-header" }, [
  8202. vue.createElementVNode("text", {
  8203. class: "picker-cancel",
  8204. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8205. }, "取消"),
  8206. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  8207. vue.createElementVNode("text", {
  8208. class: "picker-confirm",
  8209. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  8210. }, "确定")
  8211. ]),
  8212. vue.createElementVNode("view", { class: "picker-body" }, [
  8213. vue.createElementVNode("scroll-view", {
  8214. "scroll-y": "",
  8215. class: "picker-column",
  8216. "scroll-top": $data.yearScrollTop,
  8217. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  8218. }, [
  8219. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8220. (vue.openBlock(true), vue.createElementBlock(
  8221. vue.Fragment,
  8222. null,
  8223. vue.renderList($data.years, (year) => {
  8224. return vue.openBlock(), vue.createElementBlock("view", {
  8225. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  8226. key: year,
  8227. onClick: ($event) => $data.pickerYear = year
  8228. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  8229. }),
  8230. 128
  8231. /* KEYED_FRAGMENT */
  8232. )),
  8233. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8234. ], 40, ["scroll-top"]),
  8235. vue.createElementVNode("view", { class: "picker-highlight" }),
  8236. vue.createElementVNode("scroll-view", {
  8237. "scroll-y": "",
  8238. class: "picker-column",
  8239. "scroll-top": $data.monthScrollTop,
  8240. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  8241. }, [
  8242. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8243. (vue.openBlock(true), vue.createElementBlock(
  8244. vue.Fragment,
  8245. null,
  8246. vue.renderList($data.months, (month) => {
  8247. return vue.openBlock(), vue.createElementBlock("view", {
  8248. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  8249. key: month,
  8250. onClick: ($event) => $data.pickerMonth = month
  8251. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  8252. }),
  8253. 128
  8254. /* KEYED_FRAGMENT */
  8255. )),
  8256. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8257. ], 40, ["scroll-top"])
  8258. ])
  8259. ])
  8260. ])) : vue.createCommentVNode("v-if", true)
  8261. ]);
  8262. }
  8263. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  8264. const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
  8265. const _sfc_main$n = {
  8266. data() {
  8267. const now = /* @__PURE__ */ new Date();
  8268. return {
  8269. tabs: ["全部", "奖励", "惩罚"],
  8270. activeTab: 0,
  8271. selectedYear: now.getFullYear(),
  8272. selectedMonth: now.getMonth() + 1,
  8273. // 原始分组数据
  8274. allGroups: [],
  8275. loading: false
  8276. };
  8277. },
  8278. computed: {
  8279. currentPickerDate() {
  8280. return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
  8281. },
  8282. filteredGroups() {
  8283. if (this.activeTab === 0)
  8284. return this.allGroups;
  8285. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  8286. return this.allGroups.map((g) => ({
  8287. ...g,
  8288. items: g.items.filter((i) => i.type === typeKey)
  8289. })).filter((g) => g.items.length > 0);
  8290. }
  8291. },
  8292. onShow() {
  8293. this.fetchMonthData();
  8294. },
  8295. methods: {
  8296. async fetchMonthData() {
  8297. if (this.loading)
  8298. return;
  8299. this.loading = true;
  8300. try {
  8301. const params = {
  8302. year: this.selectedYear,
  8303. month: this.selectedMonth
  8304. };
  8305. const res = await listOnAppReward(params);
  8306. const data = res.data || [];
  8307. if (data.length === 0) {
  8308. this.allGroups = [];
  8309. return;
  8310. }
  8311. let credited = 0;
  8312. const items = data.map((item) => {
  8313. const isAdd = item.type === "add";
  8314. const amountVal = Math.abs(item.amount) / 100;
  8315. if (isAdd)
  8316. credited += amountVal;
  8317. let dateStr = "";
  8318. if (item.createTime) {
  8319. const datePart = item.createTime.split(" ")[0];
  8320. const parts = datePart.split("-");
  8321. if (parts.length >= 3) {
  8322. dateStr = `${parts[1]}-${parts[2]}`;
  8323. }
  8324. }
  8325. return {
  8326. ...item,
  8327. date: dateStr,
  8328. title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
  8329. desc: item.reason || "",
  8330. amount: isAdd ? amountVal : -amountVal,
  8331. type: isAdd ? "reward" : "penalty",
  8332. status: isAdd ? "已入账" : "已扣款",
  8333. statusClass: isAdd ? "credited" : "deducted"
  8334. };
  8335. });
  8336. this.allGroups = [{
  8337. month: this.selectedMonth,
  8338. year: this.selectedYear,
  8339. credited,
  8340. pending: 0,
  8341. items
  8342. }];
  8343. } catch (err) {
  8344. formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
  8345. } finally {
  8346. this.loading = false;
  8347. }
  8348. },
  8349. onDateChange(e) {
  8350. const val = e.detail.value;
  8351. const parts = val.split("-");
  8352. this.selectedYear = parseInt(parts[0]);
  8353. this.selectedMonth = parseInt(parts[1]);
  8354. this.fetchMonthData();
  8355. },
  8356. switchTab(idx) {
  8357. this.activeTab = idx;
  8358. }
  8359. }
  8360. };
  8361. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  8362. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8363. vue.createElementVNode("view", { class: "filter-header" }, [
  8364. vue.createElementVNode("view", { class: "tab-bar" }, [
  8365. (vue.openBlock(true), vue.createElementBlock(
  8366. vue.Fragment,
  8367. null,
  8368. vue.renderList($data.tabs, (tab, idx) => {
  8369. return vue.openBlock(), vue.createElementBlock("view", {
  8370. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8371. key: idx,
  8372. onClick: ($event) => $options.switchTab(idx)
  8373. }, [
  8374. vue.createElementVNode(
  8375. "text",
  8376. null,
  8377. vue.toDisplayString(tab),
  8378. 1
  8379. /* TEXT */
  8380. ),
  8381. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8382. key: 0,
  8383. class: "tab-line"
  8384. })) : vue.createCommentVNode("v-if", true)
  8385. ], 10, ["onClick"]);
  8386. }),
  8387. 128
  8388. /* KEYED_FRAGMENT */
  8389. ))
  8390. ]),
  8391. vue.createElementVNode("view", { class: "date-filter" }, [
  8392. vue.createElementVNode("picker", {
  8393. mode: "date",
  8394. fields: "month",
  8395. value: $options.currentPickerDate,
  8396. onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  8397. }, [
  8398. vue.createElementVNode("view", { class: "picker-trigger" }, [
  8399. vue.createElementVNode(
  8400. "text",
  8401. null,
  8402. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
  8403. 1
  8404. /* TEXT */
  8405. ),
  8406. vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
  8407. ])
  8408. ], 40, ["value"])
  8409. ])
  8410. ]),
  8411. vue.createElementVNode("scroll-view", {
  8412. "scroll-y": "",
  8413. class: "main-scroll"
  8414. }, [
  8415. (vue.openBlock(true), vue.createElementBlock(
  8416. vue.Fragment,
  8417. null,
  8418. vue.renderList($options.filteredGroups, (group, gIdx) => {
  8419. return vue.openBlock(), vue.createElementBlock("view", {
  8420. key: gIdx,
  8421. class: "month-group"
  8422. }, [
  8423. vue.createElementVNode("view", { class: "month-header" }, [
  8424. vue.createElementVNode(
  8425. "text",
  8426. { class: "month-title" },
  8427. vue.toDisplayString(group.month) + "月",
  8428. 1
  8429. /* TEXT */
  8430. ),
  8431. vue.createElementVNode("view", { class: "month-summary" }, [
  8432. vue.createElementVNode(
  8433. "text",
  8434. { class: "month-sum-text" },
  8435. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  8436. 1
  8437. /* TEXT */
  8438. ),
  8439. vue.createElementVNode(
  8440. "text",
  8441. { class: "month-sum-text" },
  8442. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  8443. 1
  8444. /* TEXT */
  8445. )
  8446. ])
  8447. ]),
  8448. (vue.openBlock(true), vue.createElementBlock(
  8449. vue.Fragment,
  8450. null,
  8451. vue.renderList(group.items, (item, rIdx) => {
  8452. return vue.openBlock(), vue.createElementBlock("view", {
  8453. class: "record-item",
  8454. key: rIdx
  8455. }, [
  8456. vue.createElementVNode(
  8457. "view",
  8458. {
  8459. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8460. },
  8461. [
  8462. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8463. ],
  8464. 2
  8465. /* CLASS */
  8466. ),
  8467. vue.createElementVNode("view", { class: "ri-content" }, [
  8468. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8469. vue.createElementVNode(
  8470. "text",
  8471. { class: "ri-date" },
  8472. vue.toDisplayString(item.date),
  8473. 1
  8474. /* TEXT */
  8475. ),
  8476. vue.createElementVNode(
  8477. "text",
  8478. { class: "ri-title" },
  8479. vue.toDisplayString(item.title),
  8480. 1
  8481. /* TEXT */
  8482. )
  8483. ]),
  8484. vue.createElementVNode(
  8485. "text",
  8486. { class: "ri-desc" },
  8487. vue.toDisplayString(item.desc),
  8488. 1
  8489. /* TEXT */
  8490. )
  8491. ]),
  8492. vue.createElementVNode("view", { class: "ri-right" }, [
  8493. vue.createElementVNode(
  8494. "text",
  8495. {
  8496. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8497. },
  8498. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8499. 3
  8500. /* TEXT, CLASS */
  8501. ),
  8502. vue.createElementVNode(
  8503. "text",
  8504. {
  8505. class: vue.normalizeClass(["ri-status", item.statusClass])
  8506. },
  8507. vue.toDisplayString(item.status),
  8508. 3
  8509. /* TEXT, CLASS */
  8510. )
  8511. ])
  8512. ]);
  8513. }),
  8514. 128
  8515. /* KEYED_FRAGMENT */
  8516. ))
  8517. ]);
  8518. }),
  8519. 128
  8520. /* KEYED_FRAGMENT */
  8521. )),
  8522. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  8523. ])
  8524. ]);
  8525. }
  8526. const PagesMineRewardsAll = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards-all.vue"]]);
  8527. function listAllLevelConfigs() {
  8528. return request({
  8529. url: "/fulfiller/levelConfig/listAll",
  8530. method: "GET"
  8531. });
  8532. }
  8533. const logic = {
  8534. components: {
  8535. customTabbar
  8536. },
  8537. data() {
  8538. return {
  8539. showServicePopup: false,
  8540. showLogoutPopup: false,
  8541. profile: null,
  8542. profileLoading: false,
  8543. levelConfigs: []
  8544. // 等级配置列表
  8545. };
  8546. },
  8547. computed: {
  8548. // 根据 profile.level 匹配对应的等级名称
  8549. displayLevelName() {
  8550. if (!this.profile || !this.levelConfigs.length)
  8551. return "普通履约者";
  8552. const config = this.levelConfigs.find((c) => c.lvNo === this.profile.level);
  8553. return config ? config.name : this.profile.levelName || "普通履约者";
  8554. }
  8555. },
  8556. onShow() {
  8557. uni.hideTabBar();
  8558. if (isLoggedIn()) {
  8559. this.loadProfile();
  8560. this.loadLevelConfigs();
  8561. }
  8562. },
  8563. methods: {
  8564. async loadProfile() {
  8565. if (this.profileLoading)
  8566. return;
  8567. this.profileLoading = true;
  8568. try {
  8569. const res = await getMyProfile();
  8570. this.profile = res.data || null;
  8571. } catch (err) {
  8572. formatAppLog("error", "at pages/mine/logic.js:43", "获取个人信息失败:", err);
  8573. } finally {
  8574. this.profileLoading = false;
  8575. }
  8576. },
  8577. async loadLevelConfigs() {
  8578. try {
  8579. const res = await listAllLevelConfigs();
  8580. this.levelConfigs = res.data || [];
  8581. } catch (err) {
  8582. formatAppLog("error", "at pages/mine/logic.js:53", "加载等级配置失败:", err);
  8583. }
  8584. },
  8585. navToSettings() {
  8586. uni.navigateTo({
  8587. url: "/pages/mine/settings/index"
  8588. });
  8589. },
  8590. navToProfile() {
  8591. uni.navigateTo({
  8592. url: "/pages/mine/settings/profile/index"
  8593. });
  8594. },
  8595. navToLevel() {
  8596. uni.navigateTo({
  8597. url: "/pages/mine/level/index"
  8598. });
  8599. },
  8600. navToNotification() {
  8601. uni.navigateTo({
  8602. url: "/pages/mine/message/index"
  8603. });
  8604. },
  8605. navToWallet() {
  8606. uni.navigateTo({
  8607. url: "/pages/mine/wallet/index"
  8608. });
  8609. },
  8610. navToPoints() {
  8611. uni.navigateTo({
  8612. url: "/pages/mine/points/index"
  8613. });
  8614. },
  8615. navToOrderStats() {
  8616. uni.navigateTo({
  8617. url: "/pages/mine/order-stats"
  8618. });
  8619. },
  8620. navToRewards() {
  8621. uni.navigateTo({
  8622. url: "/pages/mine/rewards"
  8623. });
  8624. },
  8625. openServicePopup() {
  8626. this.showServicePopup = true;
  8627. },
  8628. closeServicePopup() {
  8629. this.showServicePopup = false;
  8630. },
  8631. previewQRCode() {
  8632. uni.previewImage({
  8633. urls: ["/static/logo.png"]
  8634. });
  8635. },
  8636. openOnlineService() {
  8637. uni.showToast({
  8638. title: "正在跳转企业微信客服...",
  8639. icon: "none"
  8640. });
  8641. },
  8642. callServicePhone() {
  8643. uni.makePhoneCall({
  8644. phoneNumber: "400-123-4567"
  8645. });
  8646. },
  8647. logout() {
  8648. this.showLogoutPopup = true;
  8649. },
  8650. cancelLogout() {
  8651. this.showLogoutPopup = false;
  8652. },
  8653. async confirmLogout() {
  8654. this.showLogoutPopup = false;
  8655. try {
  8656. await logout();
  8657. } catch (e) {
  8658. }
  8659. clearAuth();
  8660. uni.reLaunch({
  8661. url: "/pages/login/login"
  8662. });
  8663. }
  8664. }
  8665. };
  8666. const _imports_0$1 = "/static/icons/motorbike.svg";
  8667. const _imports_1$5 = "/static/icons/location.svg";
  8668. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  8669. const _imports_3$1 = "/static/icons/calendar.svg";
  8670. const _imports_4 = "/static/icons/settings.svg";
  8671. const _imports_1$4 = "/static/icons/crown.svg";
  8672. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  8673. const _imports_3 = "/static/icons/chevron_right.svg";
  8674. const _imports_8 = "/static/icons/money_linear.svg";
  8675. const _imports_9 = "/static/icons/close_gray.svg";
  8676. const _imports_11 = "/static/icons/headset_green.svg";
  8677. const _imports_13 = "/static/icons/phone_green.svg";
  8678. const _sfc_main$m = {
  8679. ...logic
  8680. };
  8681. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  8682. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
  8683. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8684. return vue.openBlock(), vue.createElementBlock(
  8685. vue.Fragment,
  8686. null,
  8687. [
  8688. vue.createElementVNode("view", { class: "container" }, [
  8689. vue.createElementVNode("view", { class: "nav-bg" }, [
  8690. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8691. vue.createElementVNode("view", { class: "bg-circle-2" })
  8692. ]),
  8693. vue.createElementVNode("view", { class: "header-section" }, [
  8694. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8695. vue.createElementVNode("view", {
  8696. class: "user-card",
  8697. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8698. }, [
  8699. vue.createElementVNode("image", {
  8700. class: "avatar",
  8701. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8702. mode: "aspectFill"
  8703. }, null, 8, ["src"]),
  8704. vue.createElementVNode("view", { class: "info-content" }, [
  8705. vue.createElementVNode("view", { class: "name-row" }, [
  8706. vue.createElementVNode(
  8707. "text",
  8708. { class: "name" },
  8709. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8710. 1
  8711. /* TEXT */
  8712. ),
  8713. vue.createElementVNode("view", { class: "tags" }, [
  8714. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8715. key: 0,
  8716. class: "tag green"
  8717. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8718. key: 1,
  8719. class: "tag green"
  8720. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8721. key: 2,
  8722. class: "tag",
  8723. style: { "background": "#eee", "color": "#999" }
  8724. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8725. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8726. key: 3,
  8727. class: "tag blue"
  8728. }, "全职")) : vue.createCommentVNode("v-if", true),
  8729. vue.createElementVNode("image", {
  8730. class: "bike-icon",
  8731. src: _imports_0$1
  8732. })
  8733. ])
  8734. ]),
  8735. vue.createElementVNode("view", { class: "detail-row" }, [
  8736. vue.createElementVNode("image", {
  8737. class: "small-icon",
  8738. src: _imports_1$5
  8739. }),
  8740. vue.createElementVNode(
  8741. "text",
  8742. null,
  8743. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8744. 1
  8745. /* TEXT */
  8746. ),
  8747. vue.createElementVNode("image", {
  8748. class: "arrow-icon-small",
  8749. src: _imports_0
  8750. })
  8751. ]),
  8752. vue.createElementVNode("view", { class: "detail-row" }, [
  8753. vue.createElementVNode("image", {
  8754. class: "small-icon",
  8755. src: _imports_3$1
  8756. }),
  8757. vue.createElementVNode(
  8758. "text",
  8759. null,
  8760. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8761. 1
  8762. /* TEXT */
  8763. )
  8764. ])
  8765. ]),
  8766. vue.createElementVNode("image", {
  8767. class: "settings-icon",
  8768. src: _imports_4,
  8769. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8770. })
  8771. ]),
  8772. vue.createElementVNode("view", { class: "vip-card" }, [
  8773. vue.createElementVNode("view", { class: "vip-left" }, [
  8774. vue.createElementVNode("image", {
  8775. class: "vip-icon",
  8776. src: _imports_1$4
  8777. }),
  8778. vue.createElementVNode("view", { class: "vip-text" }, [
  8779. vue.createElementVNode(
  8780. "text",
  8781. { class: "vip-title" },
  8782. vue.toDisplayString(_ctx.displayLevelName),
  8783. 1
  8784. /* TEXT */
  8785. ),
  8786. vue.createElementVNode("text", { class: "vip-desc" }, "完成更多订单即可升级")
  8787. ])
  8788. ]),
  8789. vue.createElementVNode("view", {
  8790. class: "vip-btn",
  8791. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8792. }, [
  8793. vue.createElementVNode("text", null, "查看权益"),
  8794. vue.createElementVNode("image", {
  8795. class: "arrow-icon-small",
  8796. src: _imports_6
  8797. })
  8798. ])
  8799. ])
  8800. ]),
  8801. vue.createElementVNode("view", { class: "stats-panel" }, [
  8802. vue.createElementVNode("view", {
  8803. class: "stat-item",
  8804. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8805. }, [
  8806. vue.createElementVNode("view", { class: "stat-header" }, [
  8807. vue.createElementVNode("view", { class: "red-bar" }),
  8808. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8809. vue.createElementVNode("image", {
  8810. class: "arrow-icon",
  8811. src: _imports_3
  8812. })
  8813. ]),
  8814. vue.createElementVNode("view", { class: "stat-value" }, [
  8815. vue.createElementVNode(
  8816. "text",
  8817. { class: "num" },
  8818. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8819. 1
  8820. /* TEXT */
  8821. ),
  8822. vue.createElementVNode("text", { class: "unit" }, "元")
  8823. ]),
  8824. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8825. ]),
  8826. vue.createElementVNode("view", { class: "divider" }),
  8827. vue.createElementVNode("view", {
  8828. class: "stat-item",
  8829. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8830. }, [
  8831. vue.createElementVNode("view", { class: "stat-header" }, [
  8832. vue.createElementVNode("view", { class: "green-bar" }),
  8833. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8834. vue.createElementVNode("image", {
  8835. class: "arrow-icon",
  8836. src: _imports_3
  8837. })
  8838. ]),
  8839. vue.createElementVNode("view", { class: "stat-value" }, [
  8840. vue.createElementVNode(
  8841. "text",
  8842. { class: "num" },
  8843. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.orderCount) || 0),
  8844. 1
  8845. /* TEXT */
  8846. ),
  8847. vue.createElementVNode("text", { class: "unit" }, "单")
  8848. ]),
  8849. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8850. ]),
  8851. vue.createElementVNode("view", { class: "divider" }),
  8852. vue.createElementVNode("view", {
  8853. class: "stat-item",
  8854. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8855. }, [
  8856. vue.createElementVNode("view", { class: "stat-header" }, [
  8857. vue.createElementVNode("view", { class: "orange-bar" }),
  8858. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8859. vue.createElementVNode("image", {
  8860. class: "arrow-icon",
  8861. src: _imports_3
  8862. })
  8863. ]),
  8864. vue.createElementVNode("view", { class: "stat-value" }, [
  8865. vue.createElementVNode(
  8866. "text",
  8867. { class: "num" },
  8868. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.points) || 0),
  8869. 1
  8870. /* TEXT */
  8871. ),
  8872. vue.createElementVNode("text", { class: "unit" }, "分")
  8873. ]),
  8874. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8875. ])
  8876. ]),
  8877. vue.createElementVNode("view", { class: "menu-list" }, [
  8878. vue.createElementVNode("view", {
  8879. class: "menu-item",
  8880. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8881. }, [
  8882. vue.createElementVNode("image", {
  8883. class: "menu-icon",
  8884. src: _imports_8
  8885. }),
  8886. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8887. vue.createElementVNode("image", {
  8888. class: "arrow-icon",
  8889. src: _imports_3
  8890. })
  8891. ])
  8892. ]),
  8893. vue.createElementVNode("view", {
  8894. class: "logout-btn",
  8895. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.logout && _ctx.logout(...args))
  8896. }, "退出登录"),
  8897. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8898. key: 0,
  8899. class: "service-popup-mask",
  8900. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8901. }, [
  8902. vue.createElementVNode("view", {
  8903. class: "service-popup",
  8904. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  8905. }, ["stop"]))
  8906. }, [
  8907. vue.createElementVNode("view", { class: "service-header" }, [
  8908. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8909. vue.createElementVNode("image", {
  8910. class: "close-icon",
  8911. src: _imports_9,
  8912. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8913. })
  8914. ]),
  8915. vue.createElementVNode("view", { class: "qr-section" }, [
  8916. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8917. vue.createElementVNode("image", {
  8918. class: "qr-img",
  8919. src: _imports_1$8,
  8920. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8921. }),
  8922. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8923. ]),
  8924. vue.createElementVNode("view", { class: "service-list" }, [
  8925. vue.createElementVNode("view", {
  8926. class: "service-row",
  8927. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8928. }, [
  8929. vue.createElementVNode("image", {
  8930. class: "service-row-icon",
  8931. src: _imports_11
  8932. }),
  8933. vue.createElementVNode("view", { class: "service-info" }, [
  8934. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8935. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8936. ]),
  8937. vue.createElementVNode("image", {
  8938. class: "arrow-icon-small",
  8939. src: _imports_3
  8940. })
  8941. ]),
  8942. vue.createElementVNode("view", { class: "service-row" }, [
  8943. vue.createElementVNode("image", {
  8944. class: "service-row-icon",
  8945. src: _imports_12
  8946. }),
  8947. vue.createElementVNode("view", { class: "service-info" }, [
  8948. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8949. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8950. ]),
  8951. vue.createElementVNode("view", {
  8952. class: "call-btn",
  8953. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8954. }, [
  8955. vue.createElementVNode("image", {
  8956. class: "phone-icon-small",
  8957. src: _imports_13
  8958. }),
  8959. vue.createElementVNode("text", null, "拨打")
  8960. ])
  8961. ])
  8962. ])
  8963. ])
  8964. ])) : vue.createCommentVNode("v-if", true),
  8965. vue.createElementVNode(
  8966. "view",
  8967. {
  8968. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8969. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8970. onTouchmove: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  8971. }, ["stop", "prevent"]))
  8972. },
  8973. [
  8974. vue.createElementVNode("view", {
  8975. class: "popup-modal",
  8976. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  8977. }, ["stop"]))
  8978. }, [
  8979. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8980. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8981. vue.createElementVNode("view", { class: "popup-actions" }, [
  8982. vue.createElementVNode("view", {
  8983. class: "popup-btn cancel",
  8984. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8985. }, "取消"),
  8986. vue.createElementVNode("view", {
  8987. class: "popup-btn confirm",
  8988. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8989. }, "确定")
  8990. ])
  8991. ])
  8992. ],
  8993. 34
  8994. /* CLASS, NEED_HYDRATION */
  8995. )
  8996. ]),
  8997. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8998. ],
  8999. 64
  9000. /* STABLE_FRAGMENT */
  9001. );
  9002. }
  9003. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  9004. const _sfc_main$l = {
  9005. data() {
  9006. return {
  9007. version: "2.0.6",
  9008. cacheSize: "0B",
  9009. // 明确默认状态为开启:获取不到缓存即为 true,以此确保默认值为开启。
  9010. isGpsEnabled: uni.getStorageSync("GPS_REPORT_ENABLED") !== false
  9011. };
  9012. },
  9013. onLoad() {
  9014. this.getAppVersion();
  9015. this.getCacheSize();
  9016. },
  9017. methods: {
  9018. navBack() {
  9019. uni.navigateBack({
  9020. delta: 1
  9021. });
  9022. },
  9023. navTo(type) {
  9024. let url = "";
  9025. switch (type) {
  9026. case "profile":
  9027. url = "/pages/mine/settings/profile/index";
  9028. break;
  9029. case "auth":
  9030. url = "/pages/mine/settings/auth/index";
  9031. break;
  9032. case "bank":
  9033. url = "/pages/mine/settings/bank/index";
  9034. break;
  9035. case "security":
  9036. url = "/pages/mine/settings/security/index";
  9037. break;
  9038. case "push":
  9039. url = "/pages/mine/settings/notification/index";
  9040. break;
  9041. case "about":
  9042. url = "/pages/mine/settings/about/index";
  9043. break;
  9044. default:
  9045. formatAppLog("log", "at pages/mine/settings/index.vue:114", "Navigate to:", type);
  9046. return;
  9047. }
  9048. uni.navigateTo({ url });
  9049. },
  9050. clearCache() {
  9051. uni.showModal({
  9052. title: "清理缓存",
  9053. content: "确定要清理应用缓存吗?",
  9054. success: (res) => {
  9055. if (res.confirm) {
  9056. try {
  9057. const token = uni.getStorageSync("Authorization_token");
  9058. const gpsToggle = uni.getStorageSync("GPS_REPORT_ENABLED");
  9059. uni.clearStorageSync();
  9060. if (token)
  9061. uni.setStorageSync("Authorization_token", token);
  9062. uni.setStorageSync("GPS_REPORT_ENABLED", gpsToggle);
  9063. uni.showToast({ title: "清理完成", icon: "success" });
  9064. this.getCacheSize();
  9065. } catch (err) {
  9066. formatAppLog("error", "at pages/mine/settings/index.vue:140", "清理缓存失败:", err);
  9067. }
  9068. }
  9069. }
  9070. });
  9071. },
  9072. getCacheSize() {
  9073. try {
  9074. const res = uni.getStorageInfoSync();
  9075. const kb = res.currentSize;
  9076. if (kb < 1024) {
  9077. this.cacheSize = kb + "KB";
  9078. } else {
  9079. this.cacheSize = (kb / 1024).toFixed(2) + "MB";
  9080. }
  9081. } catch (err) {
  9082. this.cacheSize = "0B";
  9083. }
  9084. },
  9085. getAppVersion() {
  9086. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  9087. this.version = widgetInfo.version || "2.0.6";
  9088. });
  9089. },
  9090. onGpsSwitchChange(e) {
  9091. const val = e.detail.value;
  9092. this.isGpsEnabled = val;
  9093. uni.setStorageSync("GPS_REPORT_ENABLED", val);
  9094. if (val) {
  9095. startGpsTimer();
  9096. } else {
  9097. stopGpsTimer();
  9098. }
  9099. }
  9100. }
  9101. };
  9102. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  9103. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9104. vue.createElementVNode("view", { class: "custom-header" }, [
  9105. vue.createElementVNode("view", {
  9106. class: "header-left",
  9107. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9108. }, [
  9109. vue.createElementVNode("image", {
  9110. class: "back-icon",
  9111. src: _imports_0,
  9112. style: { "transform": "rotate(180deg)" }
  9113. })
  9114. ]),
  9115. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  9116. vue.createElementVNode("view", { class: "header-right" })
  9117. ]),
  9118. vue.createElementVNode("view", { class: "header-placeholder" }),
  9119. vue.createElementVNode("view", { class: "group-card" }, [
  9120. vue.createElementVNode("view", {
  9121. class: "list-item",
  9122. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  9123. }, [
  9124. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  9125. vue.createElementVNode("image", {
  9126. class: "arrow-icon",
  9127. src: _imports_3
  9128. })
  9129. ]),
  9130. vue.createElementVNode("view", {
  9131. class: "list-item",
  9132. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  9133. }, [
  9134. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  9135. vue.createElementVNode("image", {
  9136. class: "arrow-icon",
  9137. src: _imports_3
  9138. })
  9139. ]),
  9140. vue.createElementVNode("view", {
  9141. class: "list-item no-border",
  9142. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("security"))
  9143. }, [
  9144. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  9145. vue.createElementVNode("image", {
  9146. class: "arrow-icon",
  9147. src: _imports_3
  9148. })
  9149. ])
  9150. ]),
  9151. vue.createElementVNode("view", { class: "group-card" }, [
  9152. vue.createElementVNode("view", { class: "list-item" }, [
  9153. vue.createElementVNode("view", { class: "item-row-left" }, [
  9154. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  9155. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  9156. ]),
  9157. vue.createElementVNode("switch", {
  9158. checked: $data.isGpsEnabled,
  9159. color: "#FF5722",
  9160. style: { "transform": "scale(0.8)" },
  9161. onChange: _cache[4] || (_cache[4] = (...args) => $options.onGpsSwitchChange && $options.onGpsSwitchChange(...args))
  9162. }, null, 40, ["checked"])
  9163. ]),
  9164. vue.createElementVNode("view", {
  9165. class: "list-item",
  9166. onClick: _cache[5] || (_cache[5] = (...args) => $options.clearCache && $options.clearCache(...args))
  9167. }, [
  9168. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  9169. vue.createElementVNode("view", { class: "item-right" }, [
  9170. vue.createElementVNode(
  9171. "text",
  9172. { class: "item-value" },
  9173. vue.toDisplayString($data.cacheSize),
  9174. 1
  9175. /* TEXT */
  9176. ),
  9177. vue.createElementVNode("image", {
  9178. class: "arrow-icon",
  9179. src: _imports_3
  9180. })
  9181. ])
  9182. ]),
  9183. vue.createElementVNode("view", {
  9184. class: "list-item no-border",
  9185. onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("about"))
  9186. }, [
  9187. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  9188. vue.createElementVNode("view", { class: "item-right" }, [
  9189. vue.createElementVNode(
  9190. "text",
  9191. { class: "item-value" },
  9192. "v" + vue.toDisplayString($data.version),
  9193. 1
  9194. /* TEXT */
  9195. ),
  9196. vue.createElementVNode("image", {
  9197. class: "arrow-icon",
  9198. src: _imports_3
  9199. })
  9200. ])
  9201. ])
  9202. ])
  9203. ]);
  9204. }
  9205. const PagesMineSettingsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/index.vue"]]);
  9206. const _sfc_main$k = {
  9207. data() {
  9208. return {
  9209. userInfo: {
  9210. name: "",
  9211. workType: "",
  9212. workStatus: "",
  9213. city: "",
  9214. avatar: "/static/touxiang.png",
  9215. stationName: "",
  9216. stationFullName: ""
  9217. },
  9218. isStatusPickerShow: false,
  9219. isCityPickerShow: false,
  9220. // 城市站点级联选择器
  9221. selectStep: 0,
  9222. selectedPathway: [],
  9223. currentCityList: [],
  9224. selectedCityId: null,
  9225. fullTree: []
  9226. // 树形结构数据
  9227. };
  9228. },
  9229. onLoad() {
  9230. this.loadUserInfo();
  9231. uni.$on("updateName", (newName) => {
  9232. this.userInfo.name = newName;
  9233. });
  9234. },
  9235. onUnload() {
  9236. uni.$off("updateName");
  9237. },
  9238. methods: {
  9239. // 加载用户信息 @author steelwei
  9240. async loadUserInfo() {
  9241. uni.showLoading({ title: "加载中..." });
  9242. try {
  9243. const res = await getMyProfile();
  9244. if (res.code === 200) {
  9245. const data = res.data;
  9246. this.userInfo = {
  9247. name: data.realName || data.name,
  9248. workType: data.workType === "full_time" ? "全职" : "兼职",
  9249. workStatus: this.formatStatus(data.status),
  9250. city: data.cityName || "",
  9251. avatar: data.avatarUrl || "/static/touxiang.png",
  9252. stationName: data.stationName || "",
  9253. stationFullName: "加载中..."
  9254. };
  9255. if (data.stationId) {
  9256. if (this.fullTree.length === 0) {
  9257. await this.loadAreaStationTree();
  9258. }
  9259. this.userInfo.stationFullName = this.findStationFullName(data.stationId, this.fullTree) || data.stationName || "未分配站点";
  9260. } else {
  9261. this.userInfo.stationFullName = "未分配站点";
  9262. }
  9263. } else {
  9264. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  9265. }
  9266. } catch (error) {
  9267. formatAppLog("error", "at pages/mine/settings/profile/index.vue:182", "加载用户信息失败:", error);
  9268. uni.showToast({ title: "网络错误", icon: "none" });
  9269. } finally {
  9270. uni.hideLoading();
  9271. }
  9272. },
  9273. // 格式化状态 @author steelwei
  9274. formatStatus(status) {
  9275. const statusMap = {
  9276. "busy": "接单中",
  9277. "resting": "休息中",
  9278. "disabled": "已禁用"
  9279. };
  9280. return statusMap[status] || status;
  9281. },
  9282. // 查找站点完整路径 (城市/区域/站点) @author steelwei
  9283. findStationFullName(stationId, tree) {
  9284. if (!stationId || !tree || tree.length === 0)
  9285. return "";
  9286. let path = [];
  9287. const dfs = (nodes, targetId, currentPath) => {
  9288. for (let node of nodes) {
  9289. if (node.id === targetId) {
  9290. path = [...currentPath, node.name];
  9291. return true;
  9292. }
  9293. if (node.children && node.children.length > 0) {
  9294. if (dfs(node.children, targetId, [...currentPath, node.name])) {
  9295. return true;
  9296. }
  9297. }
  9298. }
  9299. return false;
  9300. };
  9301. dfs(tree, stationId, []);
  9302. return path.join("/");
  9303. },
  9304. navBack() {
  9305. uni.navigateBack({ delta: 1 });
  9306. },
  9307. // 修改头像 @author steelwei
  9308. changeAvatar() {
  9309. uni.chooseImage({
  9310. count: 1,
  9311. success: async (res) => {
  9312. const tempFilePath = res.tempFilePaths[0];
  9313. uni.showLoading({ title: "上传中..." });
  9314. try {
  9315. const uploadRes = await uploadFile(tempFilePath);
  9316. if (uploadRes.code === 200) {
  9317. const { url, ossId } = uploadRes.data;
  9318. const result = await updateAvatar(ossId);
  9319. if (result.code === 200) {
  9320. this.userInfo.avatar = url;
  9321. uni.showToast({ title: "修改成功", icon: "success" });
  9322. } else {
  9323. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  9324. }
  9325. }
  9326. } catch (error) {
  9327. formatAppLog("error", "at pages/mine/settings/profile/index.vue:251", "修改头像失败:", error);
  9328. uni.showToast({ title: "上传失败", icon: "none" });
  9329. } finally {
  9330. uni.hideLoading();
  9331. }
  9332. }
  9333. });
  9334. },
  9335. editName() {
  9336. uni.navigateTo({
  9337. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  9338. });
  9339. },
  9340. showStatusPicker() {
  9341. this.isStatusPickerShow = true;
  9342. },
  9343. closeStatusPicker() {
  9344. this.isStatusPickerShow = false;
  9345. },
  9346. // 选择状态 @author steelwei
  9347. async selectStatus(statusText) {
  9348. const statusMap = {
  9349. "接单中": "busy",
  9350. "休息中": "resting"
  9351. };
  9352. const status = statusMap[statusText];
  9353. try {
  9354. const res = await updateStatus(status);
  9355. if (res.code === 200) {
  9356. this.userInfo.workStatus = statusText;
  9357. uni.showToast({ title: "状态已更新", icon: "success" });
  9358. } else {
  9359. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9360. }
  9361. } catch (error) {
  9362. formatAppLog("error", "at pages/mine/settings/profile/index.vue:291", "修改状态失败:", error);
  9363. uni.showToast({ title: "网络错误", icon: "none" });
  9364. } finally {
  9365. this.closeStatusPicker();
  9366. }
  9367. },
  9368. // 城市和站点级联选择器 @author steelwei
  9369. async showCityPicker() {
  9370. this.isCityPickerShow = true;
  9371. if (this.fullTree.length === 0) {
  9372. await this.loadAreaStationTree();
  9373. }
  9374. if (this.selectedPathway.length === 0) {
  9375. this.resetCityPicker();
  9376. }
  9377. },
  9378. async loadAreaStationTree() {
  9379. try {
  9380. uni.showLoading({ title: "加载中..." });
  9381. const res = await getAreaStationList();
  9382. const list = res.data || [];
  9383. let map = {};
  9384. let roots = [];
  9385. list.forEach((node) => {
  9386. map[node.id] = { ...node, children: [] };
  9387. });
  9388. list.forEach((node) => {
  9389. if (node.parentId === 0 || !map[node.parentId]) {
  9390. roots.push(map[node.id]);
  9391. } else {
  9392. map[node.parentId].children.push(map[node.id]);
  9393. }
  9394. });
  9395. this.fullTree = roots;
  9396. } catch (err) {
  9397. formatAppLog("error", "at pages/mine/settings/profile/index.vue:328", "加载站点数据失败:", err);
  9398. this.fullTree = [];
  9399. } finally {
  9400. uni.hideLoading();
  9401. }
  9402. },
  9403. resetCityPicker() {
  9404. this.selectStep = 0;
  9405. this.selectedPathway = [];
  9406. this.currentCityList = this.fullTree;
  9407. },
  9408. closeCityPicker() {
  9409. this.isCityPickerShow = false;
  9410. },
  9411. selectCityItem(item) {
  9412. this.selectedPathway[this.selectStep] = item;
  9413. if (item.children && item.children.length > 0) {
  9414. this.selectStep++;
  9415. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  9416. this.currentCityList = item.children;
  9417. } else {
  9418. this.selectedCityId = item.id;
  9419. this.confirmCity();
  9420. }
  9421. },
  9422. jumpToStep(step) {
  9423. this.selectStep = step;
  9424. if (step === 0) {
  9425. this.currentCityList = this.fullTree;
  9426. } else {
  9427. const parent = this.selectedPathway[step - 1];
  9428. this.currentCityList = parent ? parent.children : [];
  9429. }
  9430. },
  9431. // 确认城市与站点选择 @author steelwei
  9432. async confirmCity() {
  9433. if (this.selectedPathway.length === 0) {
  9434. uni.showToast({ title: "请选择站点", icon: "none" });
  9435. return;
  9436. }
  9437. let stationNode = this.selectedPathway[this.selectedPathway.length - 1];
  9438. const fullName = this.selectedPathway.map((i) => i.name).join("/");
  9439. const reqData = {
  9440. stationId: stationNode.id
  9441. };
  9442. try {
  9443. const res = await updateCity(reqData);
  9444. if (res.code === 200) {
  9445. this.userInfo.stationFullName = fullName;
  9446. uni.showToast({ title: "修改成功", icon: "success" });
  9447. this.closeCityPicker();
  9448. this.selectedPathway = [];
  9449. } else {
  9450. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9451. }
  9452. } catch (error) {
  9453. formatAppLog("error", "at pages/mine/settings/profile/index.vue:393", "修改失败:", error);
  9454. uni.showToast({ title: "网络错误", icon: "none" });
  9455. }
  9456. }
  9457. }
  9458. };
  9459. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  9460. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9461. vue.createElementVNode("view", { class: "custom-header" }, [
  9462. vue.createElementVNode("view", {
  9463. class: "header-left",
  9464. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9465. }, [
  9466. vue.createElementVNode("image", {
  9467. class: "back-icon",
  9468. src: _imports_0,
  9469. style: { "transform": "rotate(180deg)" }
  9470. })
  9471. ]),
  9472. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  9473. vue.createElementVNode("view", { class: "header-right" })
  9474. ]),
  9475. vue.createElementVNode("view", { class: "header-placeholder" }),
  9476. vue.createElementVNode("view", { class: "group-card" }, [
  9477. vue.createElementVNode("view", {
  9478. class: "list-item",
  9479. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  9480. }, [
  9481. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  9482. vue.createElementVNode("view", { class: "item-right" }, [
  9483. vue.createElementVNode("image", {
  9484. class: "user-avatar",
  9485. src: $data.userInfo.avatar,
  9486. mode: "aspectFill"
  9487. }, null, 8, ["src"]),
  9488. vue.createElementVNode("image", {
  9489. class: "arrow-icon",
  9490. src: _imports_3
  9491. })
  9492. ])
  9493. ]),
  9494. vue.createElementVNode("view", {
  9495. class: "list-item",
  9496. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  9497. }, [
  9498. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  9499. vue.createElementVNode("view", { class: "item-right" }, [
  9500. vue.createElementVNode(
  9501. "text",
  9502. { class: "item-value" },
  9503. vue.toDisplayString($data.userInfo.name),
  9504. 1
  9505. /* TEXT */
  9506. ),
  9507. vue.createElementVNode("image", {
  9508. class: "arrow-icon",
  9509. src: _imports_3
  9510. })
  9511. ])
  9512. ])
  9513. ]),
  9514. vue.createElementVNode("view", { class: "group-card" }, [
  9515. vue.createElementVNode("view", {
  9516. class: "list-item",
  9517. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  9518. }, [
  9519. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  9520. vue.createElementVNode("view", { class: "item-right" }, [
  9521. vue.createElementVNode(
  9522. "text",
  9523. { class: "item-value-black" },
  9524. vue.toDisplayString($data.userInfo.workStatus),
  9525. 1
  9526. /* TEXT */
  9527. ),
  9528. vue.createElementVNode("image", {
  9529. class: "arrow-icon",
  9530. src: _imports_3
  9531. })
  9532. ])
  9533. ])
  9534. ]),
  9535. vue.createElementVNode("view", { class: "group-card" }, [
  9536. vue.createElementVNode("view", {
  9537. class: "list-item no-border",
  9538. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  9539. }, [
  9540. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  9541. vue.createElementVNode("view", { class: "item-right" }, [
  9542. vue.createElementVNode(
  9543. "text",
  9544. { class: "item-value" },
  9545. vue.toDisplayString($data.userInfo.stationFullName || "未分配站点"),
  9546. 1
  9547. /* TEXT */
  9548. ),
  9549. vue.createElementVNode("image", {
  9550. class: "arrow-icon",
  9551. src: _imports_3
  9552. })
  9553. ])
  9554. ])
  9555. ]),
  9556. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9557. key: 0,
  9558. class: "popup-mask",
  9559. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9560. }, [
  9561. vue.createElementVNode("view", {
  9562. class: "popup-content",
  9563. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  9564. }, ["stop"]))
  9565. }, [
  9566. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  9567. vue.createElementVNode("view", {
  9568. class: "popup-item",
  9569. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  9570. }, "接单中"),
  9571. vue.createElementVNode("view", {
  9572. class: "popup-item",
  9573. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  9574. }, "休息中"),
  9575. vue.createElementVNode("view", {
  9576. class: "popup-cancel",
  9577. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9578. }, "取消")
  9579. ])
  9580. ])) : vue.createCommentVNode("v-if", true),
  9581. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9582. key: 1,
  9583. class: "popup-mask",
  9584. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9585. }, [
  9586. vue.createElementVNode("view", {
  9587. class: "popup-content",
  9588. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  9589. }, ["stop"]))
  9590. }, [
  9591. vue.createElementVNode("view", { class: "popup-header-row" }, [
  9592. vue.createElementVNode("text", {
  9593. class: "popup-btn-cancel",
  9594. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9595. }, "取消"),
  9596. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市和站点"),
  9597. vue.createElementVNode("text", {
  9598. class: "popup-btn-confirm",
  9599. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  9600. }, "确定")
  9601. ]),
  9602. vue.createElementVNode("view", { class: "picker-body" }, [
  9603. vue.createElementVNode("view", { class: "timeline-area" }, [
  9604. (vue.openBlock(true), vue.createElementBlock(
  9605. vue.Fragment,
  9606. null,
  9607. vue.renderList($data.selectedPathway, (item, index) => {
  9608. return vue.openBlock(), vue.createElementBlock("view", {
  9609. class: "timeline-item",
  9610. key: index,
  9611. onClick: ($event) => $options.jumpToStep(index)
  9612. }, [
  9613. vue.createElementVNode("view", { class: "timeline-dot" }),
  9614. vue.createElementVNode(
  9615. "text",
  9616. null,
  9617. vue.toDisplayString(item.name),
  9618. 1
  9619. /* TEXT */
  9620. )
  9621. ], 8, ["onClick"]);
  9622. }),
  9623. 128
  9624. /* KEYED_FRAGMENT */
  9625. )),
  9626. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  9627. key: 0,
  9628. class: "timeline-item active"
  9629. }, [
  9630. vue.createElementVNode("view", { class: "timeline-dot" }),
  9631. vue.createElementVNode("text", null, "请选择")
  9632. ])) : vue.createCommentVNode("v-if", true)
  9633. ]),
  9634. vue.createElementVNode("scroll-view", {
  9635. "scroll-y": "",
  9636. class: "list-area"
  9637. }, [
  9638. (vue.openBlock(true), vue.createElementBlock(
  9639. vue.Fragment,
  9640. null,
  9641. vue.renderList($data.currentCityList, (item) => {
  9642. return vue.openBlock(), vue.createElementBlock("view", {
  9643. class: "list-item",
  9644. key: item.id,
  9645. onClick: ($event) => $options.selectCityItem(item)
  9646. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  9647. }),
  9648. 128
  9649. /* KEYED_FRAGMENT */
  9650. )),
  9651. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9652. key: 0,
  9653. style: { "padding": "20rpx", "color": "#999" }
  9654. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  9655. ])
  9656. ])
  9657. ])
  9658. ])) : vue.createCommentVNode("v-if", true)
  9659. ]);
  9660. }
  9661. const PagesMineSettingsProfileIndex = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/profile/index.vue"]]);
  9662. const _sfc_main$j = {
  9663. data() {
  9664. return {
  9665. authInfo: {
  9666. realName: "",
  9667. idCard: "",
  9668. idCardFront: "",
  9669. idCardBack: "",
  9670. serviceTypes: [],
  9671. authId: false,
  9672. authQual: false,
  9673. pendingAudit: false,
  9674. qualImages: []
  9675. }
  9676. };
  9677. },
  9678. onLoad() {
  9679. this.loadAuthInfo();
  9680. },
  9681. methods: {
  9682. navBack() {
  9683. uni.navigateBack({
  9684. delta: 1
  9685. });
  9686. },
  9687. async loadAuthInfo() {
  9688. try {
  9689. const res = await getAuthInfo();
  9690. if (res.code === 200 && res.data) {
  9691. this.authInfo = {
  9692. realName: res.data.realName || "",
  9693. idCard: res.data.idCard || "",
  9694. idCardFront: res.data.idCardFrontUrl || "",
  9695. idCardBack: res.data.idCardBackUrl || "",
  9696. serviceTypes: res.data.serviceTypeList || [],
  9697. authId: res.data.authId || false,
  9698. authQual: res.data.authQual || false,
  9699. pendingAudit: res.data.pendingAudit || false,
  9700. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  9701. };
  9702. }
  9703. } catch (e) {
  9704. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  9705. uni.showToast({ title: "加载失败", icon: "none" });
  9706. }
  9707. },
  9708. maskIdCard(idCard) {
  9709. if (!idCard || idCard.length < 8)
  9710. return idCard;
  9711. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9712. },
  9713. editAuth() {
  9714. uni.showModal({
  9715. title: "提示",
  9716. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9717. success: (res) => {
  9718. if (res.confirm) {
  9719. uni.navigateTo({
  9720. url: "/pages/mine/settings/auth/edit"
  9721. });
  9722. }
  9723. }
  9724. });
  9725. }
  9726. }
  9727. };
  9728. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  9729. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9730. vue.createElementVNode("view", { class: "custom-header" }, [
  9731. vue.createElementVNode("view", {
  9732. class: "header-left",
  9733. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9734. }, [
  9735. vue.createElementVNode("image", {
  9736. class: "back-icon",
  9737. src: _imports_0,
  9738. style: { "transform": "rotate(180deg)" }
  9739. })
  9740. ]),
  9741. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9742. vue.createElementVNode("view", { class: "header-right" })
  9743. ]),
  9744. vue.createElementVNode("view", { class: "header-placeholder" }),
  9745. vue.createElementVNode("view", { class: "card" }, [
  9746. vue.createElementVNode("view", { class: "section-header" }, [
  9747. vue.createElementVNode("view", { class: "orange-bar" }),
  9748. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9749. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9750. key: 0,
  9751. class: "tag-orange"
  9752. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9753. key: 1,
  9754. class: "tag-green"
  9755. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9756. key: 2,
  9757. class: "tag-gray"
  9758. }, "未认证"))
  9759. ]),
  9760. vue.createElementVNode("view", { class: "info-row" }, [
  9761. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9762. vue.createElementVNode(
  9763. "text",
  9764. { class: "value" },
  9765. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9766. 1
  9767. /* TEXT */
  9768. )
  9769. ]),
  9770. vue.createElementVNode("view", { class: "info-row" }, [
  9771. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9772. vue.createElementVNode(
  9773. "text",
  9774. { class: "value" },
  9775. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9776. 1
  9777. /* TEXT */
  9778. )
  9779. ]),
  9780. vue.createElementVNode("view", { class: "id-card-row" }, [
  9781. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9782. key: 0,
  9783. class: "id-card-box green-bg"
  9784. }, [
  9785. vue.createElementVNode("image", {
  9786. class: "id-card-img",
  9787. src: $data.authInfo.idCardFront,
  9788. mode: "aspectFill"
  9789. }, null, 8, ["src"]),
  9790. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9791. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9792. key: 1,
  9793. class: "id-card-box green-bg"
  9794. }, [
  9795. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9796. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9797. ])),
  9798. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9799. key: 2,
  9800. class: "id-card-box green-bg"
  9801. }, [
  9802. vue.createElementVNode("image", {
  9803. class: "id-card-img",
  9804. src: $data.authInfo.idCardBack,
  9805. mode: "aspectFill"
  9806. }, null, 8, ["src"]),
  9807. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9808. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9809. key: 3,
  9810. class: "id-card-box green-bg"
  9811. }, [
  9812. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9813. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9814. ]))
  9815. ])
  9816. ]),
  9817. vue.createElementVNode("view", { class: "card" }, [
  9818. vue.createElementVNode("view", { class: "section-header" }, [
  9819. vue.createElementVNode("view", { class: "orange-bar" }),
  9820. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9821. ]),
  9822. vue.createElementVNode("view", { class: "tags-row" }, [
  9823. (vue.openBlock(true), vue.createElementBlock(
  9824. vue.Fragment,
  9825. null,
  9826. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9827. return vue.openBlock(), vue.createElementBlock(
  9828. "view",
  9829. {
  9830. class: "service-tag",
  9831. key: index
  9832. },
  9833. vue.toDisplayString(type),
  9834. 1
  9835. /* TEXT */
  9836. );
  9837. }),
  9838. 128
  9839. /* KEYED_FRAGMENT */
  9840. )),
  9841. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9842. key: 0,
  9843. class: "empty-text"
  9844. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9845. ])
  9846. ]),
  9847. vue.createElementVNode("view", { class: "card" }, [
  9848. vue.createElementVNode("view", { class: "section-header" }, [
  9849. vue.createElementVNode("view", { class: "orange-bar" }),
  9850. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9851. ]),
  9852. vue.createElementVNode(
  9853. "text",
  9854. { class: "sub-title" },
  9855. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9856. 1
  9857. /* TEXT */
  9858. ),
  9859. vue.createElementVNode("view", { class: "cert-row" }, [
  9860. (vue.openBlock(true), vue.createElementBlock(
  9861. vue.Fragment,
  9862. null,
  9863. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9864. return vue.openBlock(), vue.createElementBlock("view", {
  9865. class: "cert-box yellow-bg",
  9866. key: index
  9867. }, [
  9868. vue.createElementVNode("image", {
  9869. class: "cert-img",
  9870. src: img,
  9871. mode: "aspectFill"
  9872. }, null, 8, ["src"])
  9873. ]);
  9874. }),
  9875. 128
  9876. /* KEYED_FRAGMENT */
  9877. )),
  9878. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9879. key: 0,
  9880. class: "empty-text"
  9881. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9882. ])
  9883. ]),
  9884. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9885. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9886. key: 0,
  9887. class: "action-btn disabled",
  9888. disabled: ""
  9889. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9890. key: 1,
  9891. class: "action-btn",
  9892. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9893. }, "修改认证信息")),
  9894. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9895. key: 2,
  9896. class: "tips"
  9897. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9898. key: 3,
  9899. class: "tips"
  9900. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9901. ])
  9902. ]);
  9903. }
  9904. const PagesMineSettingsAuthIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/auth/index.vue"]]);
  9905. const _sfc_main$i = {
  9906. data() {
  9907. return {
  9908. idCardFront: "",
  9909. idCardBack: "",
  9910. idCardFrontOssId: "",
  9911. idCardBackOssId: "",
  9912. serviceOptions: [],
  9913. selectedServices: [],
  9914. qualifications: {},
  9915. qualOssIds: {}
  9916. };
  9917. },
  9918. async onLoad() {
  9919. await this.loadServiceOptions();
  9920. this.loadAuthInfo();
  9921. },
  9922. methods: {
  9923. async loadServiceOptions() {
  9924. try {
  9925. const res = await getServiceTypes();
  9926. this.serviceOptions = (res.data || []).map((item) => ({
  9927. id: String(item.id),
  9928. name: item.name
  9929. }));
  9930. } catch (e) {
  9931. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:135", "加载服务类型失败", e);
  9932. }
  9933. },
  9934. async loadAuthInfo() {
  9935. try {
  9936. uni.showLoading({ title: "加载中..." });
  9937. const res = await getAuthInfo();
  9938. if (res.code === 200 && res.data) {
  9939. this.idCardFront = res.data.idCardFrontUrl || "";
  9940. this.idCardBack = res.data.idCardBackUrl || "";
  9941. this.idCardFrontOssId = res.data.idCardFront || "";
  9942. this.idCardBackOssId = res.data.idCardBack || "";
  9943. let serviceIds = [];
  9944. if (res.data.serviceTypes) {
  9945. serviceIds = [...new Set(
  9946. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9947. )];
  9948. }
  9949. this.selectedServices = serviceIds;
  9950. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9951. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9952. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9953. validNames.forEach((name, idx) => {
  9954. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9955. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9956. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9957. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9958. });
  9959. }
  9960. uni.hideLoading();
  9961. } catch (e) {
  9962. uni.hideLoading();
  9963. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:177", "加载认证信息失败", e);
  9964. uni.showToast({ title: "加载失败", icon: "none" });
  9965. }
  9966. },
  9967. navBack() {
  9968. uni.navigateBack({ delta: 1 });
  9969. },
  9970. chooseImage(side) {
  9971. uni.chooseImage({
  9972. count: 1,
  9973. sizeType: ["compressed"],
  9974. sourceType: ["album", "camera"],
  9975. success: async (res) => {
  9976. const tempPath = res.tempFilePaths[0];
  9977. if (side === "front") {
  9978. this.idCardFront = tempPath;
  9979. } else {
  9980. this.idCardBack = tempPath;
  9981. }
  9982. try {
  9983. uni.showLoading({ title: "上传中..." });
  9984. const uploadRes = await uploadFile(tempPath);
  9985. if (side === "front") {
  9986. this.idCardFrontOssId = uploadRes.data.ossId;
  9987. } else {
  9988. this.idCardBackOssId = uploadRes.data.ossId;
  9989. }
  9990. uni.hideLoading();
  9991. uni.showToast({ title: "上传成功", icon: "success" });
  9992. } catch (err) {
  9993. uni.hideLoading();
  9994. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:209", "上传身份证图片失败:", err);
  9995. uni.showToast({ title: "上传失败", icon: "none" });
  9996. }
  9997. }
  9998. });
  9999. },
  10000. deleteImage(side) {
  10001. if (side === "front") {
  10002. this.idCardFront = "";
  10003. this.idCardFrontOssId = "";
  10004. } else {
  10005. this.idCardBack = "";
  10006. this.idCardBackOssId = "";
  10007. }
  10008. },
  10009. getServiceName(serviceId) {
  10010. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  10011. return found ? found.name : "";
  10012. },
  10013. toggleService(service) {
  10014. const index = this.selectedServices.indexOf(service.id);
  10015. if (index > -1) {
  10016. this.selectedServices.splice(index, 1);
  10017. this.$delete(this.qualifications, service.name);
  10018. this.$delete(this.qualOssIds, service.name);
  10019. } else {
  10020. this.selectedServices.push(service.id);
  10021. this.$set(this.qualifications, service.name, []);
  10022. this.$set(this.qualOssIds, service.name, []);
  10023. }
  10024. this.$forceUpdate();
  10025. },
  10026. chooseQualImage(service) {
  10027. uni.chooseImage({
  10028. count: 9,
  10029. sizeType: ["compressed"],
  10030. sourceType: ["album", "camera"],
  10031. success: async (res) => {
  10032. if (!this.qualifications[service]) {
  10033. this.qualifications[service] = [];
  10034. this.qualOssIds[service] = [];
  10035. }
  10036. for (const tempPath of res.tempFilePaths) {
  10037. this.qualifications[service].push(tempPath);
  10038. this.$forceUpdate();
  10039. try {
  10040. uni.showLoading({ title: "上传中..." });
  10041. const uploadRes = await uploadFile(tempPath);
  10042. this.qualOssIds[service].push(uploadRes.data.ossId);
  10043. uni.hideLoading();
  10044. } catch (err) {
  10045. uni.hideLoading();
  10046. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:263", "上传资质图片失败:", err);
  10047. }
  10048. }
  10049. }
  10050. });
  10051. },
  10052. deleteQualImage(service, index) {
  10053. this.qualifications[service].splice(index, 1);
  10054. if (this.qualOssIds[service]) {
  10055. this.qualOssIds[service].splice(index, 1);
  10056. }
  10057. this.$forceUpdate();
  10058. },
  10059. previewImage(service, index) {
  10060. uni.previewImage({
  10061. urls: this.qualifications[service],
  10062. current: index
  10063. });
  10064. },
  10065. async submitAuth() {
  10066. if (!this.idCardFront || !this.idCardBack) {
  10067. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  10068. return;
  10069. }
  10070. if (this.selectedServices.length === 0) {
  10071. uni.showToast({ title: "请选择服务类型", icon: "none" });
  10072. return;
  10073. }
  10074. for (const serviceId of this.selectedServices) {
  10075. const name = this.getServiceName(serviceId);
  10076. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  10077. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  10078. return;
  10079. }
  10080. }
  10081. uni.showModal({
  10082. title: "提示",
  10083. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  10084. success: (res) => {
  10085. if (res.confirm) {
  10086. this.doSubmit();
  10087. }
  10088. }
  10089. });
  10090. },
  10091. async doSubmit() {
  10092. const allQualOssIds = [];
  10093. Object.values(this.qualOssIds).forEach((ids) => {
  10094. allQualOssIds.push(...ids);
  10095. });
  10096. const submitData = {
  10097. idCardFront: this.idCardFrontOssId,
  10098. idCardBack: this.idCardBackOssId,
  10099. serviceTypes: this.selectedServices.join(","),
  10100. // 逗号分隔的服务类型ID
  10101. qualifications: allQualOssIds.join(",")
  10102. // 逗号分隔的资质图片OSS ID
  10103. };
  10104. try {
  10105. uni.showLoading({ title: "提交中..." });
  10106. await updateAuthInfo(submitData);
  10107. uni.hideLoading();
  10108. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  10109. setTimeout(() => {
  10110. uni.navigateBack({ delta: 1 });
  10111. }, 1500);
  10112. } catch (err) {
  10113. uni.hideLoading();
  10114. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:334", "提交失败:", err);
  10115. uni.showToast({ title: "提交失败", icon: "none" });
  10116. }
  10117. }
  10118. }
  10119. };
  10120. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  10121. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  10122. vue.createElementVNode("view", { class: "custom-header" }, [
  10123. vue.createElementVNode("view", {
  10124. class: "header-left",
  10125. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10126. }, [
  10127. vue.createElementVNode("image", {
  10128. class: "back-icon",
  10129. src: _imports_0,
  10130. style: { "transform": "rotate(180deg)" }
  10131. })
  10132. ]),
  10133. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  10134. vue.createElementVNode("view", { class: "header-right" })
  10135. ]),
  10136. vue.createElementVNode("view", { class: "header-placeholder" }),
  10137. vue.createElementVNode("view", { class: "warning-tip" }, [
  10138. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  10139. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  10140. ]),
  10141. vue.createElementVNode("view", { class: "section-card" }, [
  10142. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  10143. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  10144. vue.createElementVNode("view", { class: "id-card-row" }, [
  10145. vue.createElementVNode("view", {
  10146. class: "id-card-upload",
  10147. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  10148. }, [
  10149. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  10150. key: 0,
  10151. src: $data.idCardFront,
  10152. class: "id-card-img",
  10153. mode: "aspectFill"
  10154. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10155. key: 1,
  10156. class: "id-card-placeholder"
  10157. }, [
  10158. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  10159. ])),
  10160. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  10161. key: 2,
  10162. class: "delete-btn",
  10163. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  10164. }, "×")) : vue.createCommentVNode("v-if", true),
  10165. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  10166. ]),
  10167. vue.createElementVNode("view", {
  10168. class: "id-card-upload",
  10169. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  10170. }, [
  10171. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  10172. key: 0,
  10173. src: $data.idCardBack,
  10174. class: "id-card-img",
  10175. mode: "aspectFill"
  10176. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10177. key: 1,
  10178. class: "id-card-placeholder"
  10179. }, [
  10180. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  10181. ])),
  10182. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  10183. key: 2,
  10184. class: "delete-btn",
  10185. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  10186. }, "×")) : vue.createCommentVNode("v-if", true),
  10187. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  10188. ])
  10189. ])
  10190. ]),
  10191. vue.createElementVNode("view", { class: "section-card" }, [
  10192. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  10193. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  10194. vue.createElementVNode("view", { class: "service-list" }, [
  10195. (vue.openBlock(true), vue.createElementBlock(
  10196. vue.Fragment,
  10197. null,
  10198. vue.renderList($data.serviceOptions, (service, index) => {
  10199. return vue.openBlock(), vue.createElementBlock("view", {
  10200. class: "service-item",
  10201. key: service.id,
  10202. onClick: ($event) => $options.toggleService(service)
  10203. }, [
  10204. vue.createElementVNode(
  10205. "text",
  10206. { class: "service-name" },
  10207. vue.toDisplayString(service.name),
  10208. 1
  10209. /* TEXT */
  10210. ),
  10211. vue.createElementVNode(
  10212. "view",
  10213. {
  10214. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  10215. },
  10216. [
  10217. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  10218. ],
  10219. 2
  10220. /* CLASS */
  10221. )
  10222. ], 8, ["onClick"]);
  10223. }),
  10224. 128
  10225. /* KEYED_FRAGMENT */
  10226. ))
  10227. ])
  10228. ]),
  10229. vue.createElementVNode("view", { class: "section-card" }, [
  10230. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  10231. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  10232. (vue.openBlock(true), vue.createElementBlock(
  10233. vue.Fragment,
  10234. null,
  10235. vue.renderList($data.selectedServices, (serviceId, index) => {
  10236. return vue.openBlock(), vue.createElementBlock("view", {
  10237. key: serviceId,
  10238. class: "qual-section"
  10239. }, [
  10240. vue.createElementVNode(
  10241. "text",
  10242. { class: "qual-title" },
  10243. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  10244. 1
  10245. /* TEXT */
  10246. ),
  10247. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  10248. (vue.openBlock(true), vue.createElementBlock(
  10249. vue.Fragment,
  10250. null,
  10251. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  10252. return vue.openBlock(), vue.createElementBlock("view", {
  10253. class: "qual-item",
  10254. key: imgIndex,
  10255. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  10256. }, [
  10257. vue.createElementVNode("image", {
  10258. src: img,
  10259. class: "qual-img",
  10260. mode: "aspectFill"
  10261. }, null, 8, ["src"]),
  10262. vue.createElementVNode("view", {
  10263. class: "delete-btn",
  10264. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  10265. }, "×", 8, ["onClick"])
  10266. ], 8, ["onClick"]);
  10267. }),
  10268. 128
  10269. /* KEYED_FRAGMENT */
  10270. )),
  10271. vue.createElementVNode("view", {
  10272. class: "qual-upload-btn",
  10273. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  10274. }, [
  10275. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  10276. ], 8, ["onClick"])
  10277. ])
  10278. ]);
  10279. }),
  10280. 128
  10281. /* KEYED_FRAGMENT */
  10282. )),
  10283. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  10284. key: 0,
  10285. class: "empty-hint"
  10286. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  10287. ]),
  10288. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  10289. vue.createElementVNode("button", {
  10290. class: "submit-btn",
  10291. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  10292. }, "提交审核")
  10293. ])
  10294. ]);
  10295. }
  10296. const PagesMineSettingsAuthEdit = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-10d0f207"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/auth/edit.vue"]]);
  10297. const _imports_1$3 = "/static/icons/shield.svg";
  10298. const _sfc_main$h = {
  10299. data() {
  10300. return {
  10301. hasShieldIcon: false
  10302. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  10303. };
  10304. },
  10305. methods: {
  10306. navBack() {
  10307. uni.navigateBack({
  10308. delta: 1
  10309. });
  10310. },
  10311. editBank() {
  10312. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  10313. }
  10314. }
  10315. };
  10316. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  10317. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10318. vue.createElementVNode("view", { class: "custom-header" }, [
  10319. vue.createElementVNode("view", {
  10320. class: "header-left",
  10321. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10322. }, [
  10323. vue.createElementVNode("image", {
  10324. class: "back-icon",
  10325. src: _imports_0,
  10326. style: { "transform": "rotate(180deg)" }
  10327. })
  10328. ]),
  10329. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  10330. vue.createElementVNode("view", { class: "header-right" })
  10331. ]),
  10332. vue.createElementVNode("view", { class: "header-placeholder" }),
  10333. vue.createElementVNode("view", { class: "bank-card" }, [
  10334. vue.createElementVNode("view", { class: "card-top" }, [
  10335. vue.createElementVNode("view", { class: "bank-info" }, [
  10336. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  10337. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  10338. ]),
  10339. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  10340. ]),
  10341. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  10342. ]),
  10343. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  10344. vue.createElementVNode("view", { class: "card-bg-circle" })
  10345. ]),
  10346. vue.createElementVNode("button", {
  10347. class: "action-btn",
  10348. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  10349. }, "修改银行卡信息"),
  10350. vue.createElementVNode("view", { class: "security-tip" }, [
  10351. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  10352. key: 0,
  10353. class: "shield-icon",
  10354. src: _imports_1$3
  10355. })) : vue.createCommentVNode("v-if", true),
  10356. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  10357. ])
  10358. ]);
  10359. }
  10360. const PagesMineSettingsBankIndex = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/bank/index.vue"]]);
  10361. const _sfc_main$g = {
  10362. data() {
  10363. return {
  10364. phone: "",
  10365. hasPassword: false
  10366. };
  10367. },
  10368. onLoad() {
  10369. this.loadProfile();
  10370. },
  10371. methods: {
  10372. navBack() {
  10373. uni.navigateBack({
  10374. delta: 1
  10375. });
  10376. },
  10377. async loadProfile() {
  10378. try {
  10379. const res = await getMyProfile();
  10380. if (res.code === 200 && res.data) {
  10381. this.phone = res.data.phone || "";
  10382. this.hasPassword = !!res.data.hasPassword;
  10383. }
  10384. } catch (e) {
  10385. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  10386. }
  10387. },
  10388. maskPhone(phone) {
  10389. if (!phone || phone.length < 11)
  10390. return phone;
  10391. return phone.substring(0, 3) + "****" + phone.substring(7);
  10392. },
  10393. changeMobile() {
  10394. uni.navigateTo({
  10395. url: "/pages/mine/settings/security/change-phone"
  10396. });
  10397. },
  10398. changePassword() {
  10399. uni.navigateTo({
  10400. url: "/pages/mine/settings/security/change-password"
  10401. });
  10402. },
  10403. async deleteAccount() {
  10404. uni.showModal({
  10405. title: "警示",
  10406. content: "注销账号后将无法恢复,确定要继续吗?",
  10407. success: async (res) => {
  10408. if (res.confirm) {
  10409. try {
  10410. const result = await deleteAccount();
  10411. if (result.code === 200) {
  10412. uni.showToast({ title: "账号已注销", icon: "success" });
  10413. setTimeout(() => {
  10414. uni.reLaunch({ url: "/pages/login/login" });
  10415. }, 1500);
  10416. } else {
  10417. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  10418. }
  10419. } catch (e) {
  10420. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  10421. uni.showToast({ title: "注销失败", icon: "none" });
  10422. }
  10423. }
  10424. }
  10425. });
  10426. }
  10427. }
  10428. };
  10429. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  10430. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10431. vue.createElementVNode("view", { class: "custom-header" }, [
  10432. vue.createElementVNode("view", {
  10433. class: "header-left",
  10434. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10435. }, [
  10436. vue.createElementVNode("image", {
  10437. class: "back-icon",
  10438. src: _imports_0,
  10439. style: { "transform": "rotate(180deg)" }
  10440. })
  10441. ]),
  10442. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  10443. vue.createElementVNode("view", { class: "header-right" })
  10444. ]),
  10445. vue.createElementVNode("view", { class: "header-placeholder" }),
  10446. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  10447. vue.createElementVNode("view", { class: "group-card" }, [
  10448. vue.createElementVNode("view", {
  10449. class: "list-item",
  10450. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  10451. }, [
  10452. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  10453. vue.createElementVNode("view", { class: "item-right" }, [
  10454. vue.createElementVNode(
  10455. "text",
  10456. { class: "item-value" },
  10457. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  10458. 1
  10459. /* TEXT */
  10460. ),
  10461. vue.createElementVNode("image", {
  10462. class: "arrow-icon",
  10463. src: _imports_3
  10464. })
  10465. ])
  10466. ]),
  10467. vue.createElementVNode("view", {
  10468. class: "list-item",
  10469. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  10470. }, [
  10471. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  10472. vue.createElementVNode("view", { class: "item-right" }, [
  10473. vue.createElementVNode(
  10474. "text",
  10475. { class: "item-value" },
  10476. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  10477. 1
  10478. /* TEXT */
  10479. ),
  10480. vue.createElementVNode("image", {
  10481. class: "arrow-icon",
  10482. src: _imports_3
  10483. })
  10484. ])
  10485. ])
  10486. ]),
  10487. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  10488. vue.createElementVNode("view", { class: "group-card" }, [
  10489. vue.createElementVNode("view", {
  10490. class: "list-item no-border",
  10491. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  10492. }, [
  10493. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  10494. vue.createElementVNode("image", {
  10495. class: "arrow-icon",
  10496. src: _imports_3
  10497. })
  10498. ])
  10499. ])
  10500. ]);
  10501. }
  10502. const PagesMineSettingsSecurityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/index.vue"]]);
  10503. const _sfc_main$f = {
  10504. data() {
  10505. return {
  10506. name: ""
  10507. };
  10508. },
  10509. onLoad(options) {
  10510. if (options.name) {
  10511. this.name = decodeURIComponent(options.name);
  10512. }
  10513. },
  10514. methods: {
  10515. navBack() {
  10516. uni.navigateBack({ delta: 1 });
  10517. },
  10518. // 提交修改 @author steelwei
  10519. async submitChange() {
  10520. if (!this.name || !this.name.trim()) {
  10521. uni.showToast({ title: "请输入姓名", icon: "none" });
  10522. return;
  10523. }
  10524. if (this.name.trim().length < 2) {
  10525. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  10526. return;
  10527. }
  10528. uni.showLoading({ title: "提交中..." });
  10529. try {
  10530. const res = await updateName(this.name.trim());
  10531. if (res.code === 200) {
  10532. uni.showToast({
  10533. title: "修改成功",
  10534. icon: "success",
  10535. duration: 2e3
  10536. });
  10537. uni.$emit("updateName", this.name.trim());
  10538. setTimeout(() => {
  10539. uni.navigateBack({ delta: 1 });
  10540. }, 2e3);
  10541. } else {
  10542. uni.showToast({
  10543. title: res.msg || "修改失败",
  10544. icon: "none"
  10545. });
  10546. }
  10547. } catch (error) {
  10548. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  10549. uni.showToast({ title: "网络错误", icon: "none" });
  10550. } finally {
  10551. uni.hideLoading();
  10552. }
  10553. }
  10554. }
  10555. };
  10556. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  10557. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10558. vue.createElementVNode("view", { class: "custom-header" }, [
  10559. vue.createElementVNode("view", {
  10560. class: "header-left",
  10561. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10562. }, [
  10563. vue.createElementVNode("image", {
  10564. class: "back-icon",
  10565. src: _imports_0,
  10566. style: { "transform": "rotate(180deg)" }
  10567. })
  10568. ]),
  10569. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  10570. vue.createElementVNode("view", { class: "header-right" })
  10571. ]),
  10572. vue.createElementVNode("view", { class: "header-placeholder" }),
  10573. vue.createElementVNode("view", { class: "form-card" }, [
  10574. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10575. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  10576. vue.withDirectives(vue.createElementVNode(
  10577. "input",
  10578. {
  10579. class: "form-input",
  10580. type: "text",
  10581. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  10582. placeholder: "请输入真实姓名",
  10583. "placeholder-class": "placeholder",
  10584. maxlength: "20"
  10585. },
  10586. null,
  10587. 512
  10588. /* NEED_PATCH */
  10589. ), [
  10590. [vue.vModelText, $data.name]
  10591. ])
  10592. ])
  10593. ]),
  10594. vue.createElementVNode("view", { class: "btn-area" }, [
  10595. vue.createElementVNode("button", {
  10596. class: "submit-btn",
  10597. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  10598. }, "确认修改")
  10599. ]),
  10600. vue.createElementVNode("view", { class: "tips" }, [
  10601. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  10602. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  10603. ])
  10604. ]);
  10605. }
  10606. const PagesMineSettingsProfileEditName = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/profile/edit-name.vue"]]);
  10607. const _sfc_main$e = {
  10608. data() {
  10609. return {
  10610. oldPassword: "",
  10611. newPassword: "",
  10612. confirmPassword: ""
  10613. };
  10614. },
  10615. methods: {
  10616. navBack() {
  10617. uni.navigateBack({ delta: 1 });
  10618. },
  10619. // 提交修改 @author steelwei
  10620. async submitChange() {
  10621. if (!this.oldPassword) {
  10622. uni.showToast({ title: "请输入旧密码", icon: "none" });
  10623. return;
  10624. }
  10625. if (!this.newPassword) {
  10626. uni.showToast({ title: "请输入新密码", icon: "none" });
  10627. return;
  10628. }
  10629. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  10630. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  10631. return;
  10632. }
  10633. if (this.newPassword !== this.confirmPassword) {
  10634. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  10635. return;
  10636. }
  10637. uni.showLoading({ title: "提交中..." });
  10638. try {
  10639. const res = await updatePassword(this.oldPassword, this.newPassword);
  10640. if (res.code === 200) {
  10641. uni.showToast({
  10642. title: "修改成功",
  10643. icon: "success",
  10644. duration: 2e3
  10645. });
  10646. setTimeout(() => {
  10647. uni.navigateBack({ delta: 1 });
  10648. }, 2e3);
  10649. } else {
  10650. uni.showToast({
  10651. title: res.msg || "修改失败",
  10652. icon: "none"
  10653. });
  10654. }
  10655. } catch (error) {
  10656. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  10657. uni.showToast({ title: "网络错误", icon: "none" });
  10658. } finally {
  10659. uni.hideLoading();
  10660. }
  10661. }
  10662. }
  10663. };
  10664. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  10665. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10666. vue.createElementVNode("view", { class: "custom-header" }, [
  10667. vue.createElementVNode("view", {
  10668. class: "header-left",
  10669. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10670. }, [
  10671. vue.createElementVNode("image", {
  10672. class: "back-icon",
  10673. src: _imports_0,
  10674. style: { "transform": "rotate(180deg)" }
  10675. })
  10676. ]),
  10677. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  10678. vue.createElementVNode("view", { class: "header-right" })
  10679. ]),
  10680. vue.createElementVNode("view", { class: "header-placeholder" }),
  10681. vue.createElementVNode("view", { class: "form-card" }, [
  10682. vue.createElementVNode("view", { class: "form-item" }, [
  10683. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  10684. vue.withDirectives(vue.createElementVNode(
  10685. "input",
  10686. {
  10687. class: "form-input",
  10688. type: "password",
  10689. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  10690. placeholder: "请输入旧密码",
  10691. "placeholder-class": "placeholder"
  10692. },
  10693. null,
  10694. 512
  10695. /* NEED_PATCH */
  10696. ), [
  10697. [vue.vModelText, $data.oldPassword]
  10698. ])
  10699. ]),
  10700. vue.createElementVNode("view", { class: "form-item" }, [
  10701. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  10702. vue.withDirectives(vue.createElementVNode(
  10703. "input",
  10704. {
  10705. class: "form-input",
  10706. type: "password",
  10707. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  10708. placeholder: "请输入新密码(6-20位)",
  10709. "placeholder-class": "placeholder"
  10710. },
  10711. null,
  10712. 512
  10713. /* NEED_PATCH */
  10714. ), [
  10715. [vue.vModelText, $data.newPassword]
  10716. ])
  10717. ]),
  10718. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10719. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10720. vue.withDirectives(vue.createElementVNode(
  10721. "input",
  10722. {
  10723. class: "form-input",
  10724. type: "password",
  10725. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10726. placeholder: "请再次输入新密码",
  10727. "placeholder-class": "placeholder"
  10728. },
  10729. null,
  10730. 512
  10731. /* NEED_PATCH */
  10732. ), [
  10733. [vue.vModelText, $data.confirmPassword]
  10734. ])
  10735. ])
  10736. ]),
  10737. vue.createElementVNode("view", { class: "btn-area" }, [
  10738. vue.createElementVNode("button", {
  10739. class: "submit-btn",
  10740. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10741. }, "确认修改")
  10742. ])
  10743. ]);
  10744. }
  10745. const PagesMineSettingsSecurityChangePassword = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/change-password.vue"]]);
  10746. const _sfc_main$d = {
  10747. data() {
  10748. return {
  10749. phone: "",
  10750. code: "",
  10751. countdown: 0,
  10752. timer: null
  10753. };
  10754. },
  10755. onUnload() {
  10756. if (this.timer) {
  10757. clearInterval(this.timer);
  10758. }
  10759. },
  10760. methods: {
  10761. navBack() {
  10762. uni.navigateBack({ delta: 1 });
  10763. },
  10764. // 发送验证码 @author steelwei
  10765. sendCode() {
  10766. if (!this.phone) {
  10767. uni.showToast({ title: "请输入手机号", icon: "none" });
  10768. return;
  10769. }
  10770. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10771. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10772. return;
  10773. }
  10774. uni.showToast({ title: "验证码已发送", icon: "success" });
  10775. this.countdown = 60;
  10776. this.timer = setInterval(() => {
  10777. this.countdown--;
  10778. if (this.countdown <= 0) {
  10779. clearInterval(this.timer);
  10780. }
  10781. }, 1e3);
  10782. },
  10783. // 提交修改 @author steelwei
  10784. async submitChange() {
  10785. if (!this.phone) {
  10786. uni.showToast({ title: "请输入手机号", icon: "none" });
  10787. return;
  10788. }
  10789. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10790. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10791. return;
  10792. }
  10793. if (!this.code) {
  10794. uni.showToast({ title: "请输入验证码", icon: "none" });
  10795. return;
  10796. }
  10797. uni.showLoading({ title: "提交中..." });
  10798. try {
  10799. const res = await updatePhone(this.phone, this.code);
  10800. if (res.code === 200) {
  10801. uni.showToast({
  10802. title: "修改成功",
  10803. icon: "success",
  10804. duration: 2e3
  10805. });
  10806. setTimeout(() => {
  10807. uni.navigateBack({ delta: 1 });
  10808. }, 2e3);
  10809. } else {
  10810. uni.showToast({
  10811. title: res.msg || "修改失败",
  10812. icon: "none"
  10813. });
  10814. }
  10815. } catch (error) {
  10816. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10817. uni.showToast({ title: "网络错误", icon: "none" });
  10818. } finally {
  10819. uni.hideLoading();
  10820. }
  10821. }
  10822. }
  10823. };
  10824. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  10825. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10826. vue.createElementVNode("view", { class: "custom-header" }, [
  10827. vue.createElementVNode("view", {
  10828. class: "header-left",
  10829. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10830. }, [
  10831. vue.createElementVNode("image", {
  10832. class: "back-icon",
  10833. src: _imports_0,
  10834. style: { "transform": "rotate(180deg)" }
  10835. })
  10836. ]),
  10837. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10838. vue.createElementVNode("view", { class: "header-right" })
  10839. ]),
  10840. vue.createElementVNode("view", { class: "header-placeholder" }),
  10841. vue.createElementVNode("view", { class: "form-card" }, [
  10842. vue.createElementVNode("view", { class: "form-item" }, [
  10843. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10844. vue.withDirectives(vue.createElementVNode(
  10845. "input",
  10846. {
  10847. class: "form-input",
  10848. type: "number",
  10849. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10850. placeholder: "请输入新手机号",
  10851. "placeholder-class": "placeholder",
  10852. maxlength: "11"
  10853. },
  10854. null,
  10855. 512
  10856. /* NEED_PATCH */
  10857. ), [
  10858. [vue.vModelText, $data.phone]
  10859. ])
  10860. ]),
  10861. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10862. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10863. vue.withDirectives(vue.createElementVNode(
  10864. "input",
  10865. {
  10866. class: "form-input",
  10867. type: "number",
  10868. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10869. placeholder: "请输入验证码",
  10870. "placeholder-class": "placeholder",
  10871. maxlength: "6"
  10872. },
  10873. null,
  10874. 512
  10875. /* NEED_PATCH */
  10876. ), [
  10877. [vue.vModelText, $data.code]
  10878. ]),
  10879. vue.createElementVNode("button", {
  10880. class: "code-btn",
  10881. disabled: $data.countdown > 0,
  10882. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10883. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10884. ])
  10885. ]),
  10886. vue.createElementVNode("view", { class: "btn-area" }, [
  10887. vue.createElementVNode("button", {
  10888. class: "submit-btn",
  10889. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10890. }, "确认修改")
  10891. ]),
  10892. vue.createElementVNode("view", { class: "tips" }, [
  10893. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10894. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10895. ])
  10896. ]);
  10897. }
  10898. const PagesMineSettingsSecurityChangePhone = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/change-phone.vue"]]);
  10899. const _sfc_main$c = {
  10900. data() {
  10901. return {};
  10902. },
  10903. methods: {
  10904. navBack() {
  10905. uni.navigateBack({
  10906. delta: 1
  10907. });
  10908. },
  10909. switchChange(type, e) {
  10910. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10911. }
  10912. }
  10913. };
  10914. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10915. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10916. vue.createElementVNode("view", { class: "custom-header" }, [
  10917. vue.createElementVNode("view", {
  10918. class: "header-left",
  10919. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10920. }, [
  10921. vue.createElementVNode("image", {
  10922. class: "back-icon",
  10923. src: _imports_0,
  10924. style: { "transform": "rotate(180deg)" }
  10925. })
  10926. ]),
  10927. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10928. vue.createElementVNode("view", { class: "header-right" })
  10929. ]),
  10930. vue.createElementVNode("view", { class: "header-placeholder" }),
  10931. vue.createElementVNode("view", { class: "group-card" }, [
  10932. vue.createElementVNode("view", { class: "list-item" }, [
  10933. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10934. vue.createElementVNode(
  10935. "switch",
  10936. {
  10937. checked: "",
  10938. color: "#FF5722",
  10939. style: { "transform": "scale(0.8)" },
  10940. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10941. },
  10942. null,
  10943. 32
  10944. /* NEED_HYDRATION */
  10945. )
  10946. ]),
  10947. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10948. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10949. vue.createElementVNode(
  10950. "switch",
  10951. {
  10952. checked: "",
  10953. color: "#FF5722",
  10954. style: { "transform": "scale(0.8)" },
  10955. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10956. },
  10957. null,
  10958. 32
  10959. /* NEED_HYDRATION */
  10960. )
  10961. ])
  10962. ]),
  10963. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10964. ]);
  10965. }
  10966. const PagesMineSettingsNotificationIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/notification/index.vue"]]);
  10967. const _sfc_main$b = {
  10968. data() {
  10969. return {
  10970. version: "2.0.6"
  10971. };
  10972. },
  10973. onLoad() {
  10974. this.getAppVersion();
  10975. },
  10976. methods: {
  10977. navBack() {
  10978. uni.navigateBack({
  10979. delta: 1
  10980. });
  10981. },
  10982. goToDetail(id) {
  10983. uni.navigateTo({
  10984. url: `/pages/mine/settings/about/agreement-detail?id=${id}`
  10985. });
  10986. },
  10987. checkUpdate() {
  10988. uni.showToast({ title: "已是最新版本", icon: "none" });
  10989. },
  10990. getAppVersion() {
  10991. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  10992. this.version = widgetInfo.version || "2.0.6";
  10993. });
  10994. }
  10995. }
  10996. };
  10997. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10998. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10999. vue.createElementVNode("view", { class: "custom-header" }, [
  11000. vue.createElementVNode("view", {
  11001. class: "header-left",
  11002. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11003. }, [
  11004. vue.createElementVNode("image", {
  11005. class: "back-icon",
  11006. src: _imports_0,
  11007. style: { "transform": "rotate(180deg)" }
  11008. })
  11009. ]),
  11010. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  11011. vue.createElementVNode("view", { class: "header-right" })
  11012. ]),
  11013. vue.createElementVNode("view", { class: "header-placeholder" }),
  11014. vue.createElementVNode("view", { class: "logo-area" }, [
  11015. vue.createElementVNode("image", {
  11016. class: "app-logo",
  11017. src: _imports_1$8,
  11018. mode: "aspectFit"
  11019. }),
  11020. vue.createElementVNode("text", { class: "app-name" }, "履约者"),
  11021. vue.createElementVNode(
  11022. "text",
  11023. { class: "app-version" },
  11024. "Version " + vue.toDisplayString($data.version),
  11025. 1
  11026. /* TEXT */
  11027. )
  11028. ]),
  11029. vue.createElementVNode("view", { class: "group-card" }, [
  11030. vue.createElementVNode("view", {
  11031. class: "list-item",
  11032. onClick: _cache[1] || (_cache[1] = ($event) => $options.goToDetail(1))
  11033. }, [
  11034. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  11035. vue.createElementVNode("image", {
  11036. class: "arrow-icon",
  11037. src: _imports_3
  11038. })
  11039. ]),
  11040. vue.createElementVNode("view", {
  11041. class: "list-item",
  11042. onClick: _cache[2] || (_cache[2] = ($event) => $options.goToDetail(2))
  11043. }, [
  11044. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  11045. vue.createElementVNode("image", {
  11046. class: "arrow-icon",
  11047. src: _imports_3
  11048. })
  11049. ])
  11050. ])
  11051. ]);
  11052. }
  11053. const PagesMineSettingsAboutIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/about/index.vue"]]);
  11054. const _imports_1$2 = "/static/icons/wallet_white.svg";
  11055. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  11056. const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
  11057. const _sfc_main$a = {
  11058. data() {
  11059. return {
  11060. balance: "0.00",
  11061. pendingBalance: "0.00",
  11062. currentTab: 0,
  11063. list: [],
  11064. pageNum: 1,
  11065. pageSize: 10,
  11066. total: 0,
  11067. loading: false
  11068. };
  11069. },
  11070. computed: {
  11071. displayList() {
  11072. if (this.currentTab === 0)
  11073. return this.list;
  11074. if (this.currentTab === 1)
  11075. return this.list.filter((item) => item.type === "income");
  11076. if (this.currentTab === 2)
  11077. return this.list.filter((item) => item.type === "expense");
  11078. return [];
  11079. }
  11080. },
  11081. onShow() {
  11082. this.fetchData();
  11083. this.fetchList(true);
  11084. },
  11085. onReachBottom() {
  11086. this.fetchList();
  11087. },
  11088. methods: {
  11089. async fetchData() {
  11090. try {
  11091. const res = await getBalanceOnApp();
  11092. if (res.code === 200 && res.data) {
  11093. this.balance = (res.data.balance / 100).toFixed(2);
  11094. this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
  11095. }
  11096. } catch (error) {
  11097. formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
  11098. }
  11099. },
  11100. async fetchList(reset = false) {
  11101. if (reset) {
  11102. this.pageNum = 1;
  11103. this.list = [];
  11104. this.total = 0;
  11105. }
  11106. if (this.loading)
  11107. return;
  11108. if (!reset && this.list.length >= this.total && this.total !== 0)
  11109. return;
  11110. this.loading = true;
  11111. try {
  11112. const res = await pageBalanceOnApp({
  11113. pageNum: this.pageNum,
  11114. pageSize: this.pageSize
  11115. });
  11116. if (res.code === 200) {
  11117. this.total = res.total || 0;
  11118. const rows = res.rows || [];
  11119. const mappedRows = rows.map((item) => {
  11120. const isAdd = item.type === "add";
  11121. const uiType = isAdd ? "income" : "expense";
  11122. const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
  11123. let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
  11124. if (!isAdd) {
  11125. amountStr = "-" + amountStr;
  11126. }
  11127. return {
  11128. ...item,
  11129. title,
  11130. desc: item.reason || "",
  11131. time: item.createTime || "",
  11132. amount: amountStr,
  11133. type: uiType,
  11134. // 'income' or 'expense' for template class
  11135. tag: title
  11136. };
  11137. });
  11138. this.list = this.list.concat(mappedRows);
  11139. this.pageNum++;
  11140. }
  11141. } catch (error) {
  11142. formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
  11143. } finally {
  11144. this.loading = false;
  11145. }
  11146. },
  11147. navBack() {
  11148. uni.navigateBack();
  11149. },
  11150. navToBill() {
  11151. uni.navigateTo({
  11152. url: "/pages/mine/wallet/bill"
  11153. });
  11154. },
  11155. switchTab(index) {
  11156. this.currentTab = index;
  11157. }
  11158. }
  11159. };
  11160. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  11161. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11162. vue.createElementVNode("view", { class: "nav-bar" }, [
  11163. vue.createElementVNode("view", {
  11164. class: "nav-left",
  11165. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11166. }, [
  11167. vue.createElementVNode("image", {
  11168. class: "back-icon",
  11169. src: _imports_0
  11170. })
  11171. ]),
  11172. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  11173. vue.createElementVNode("view", { class: "nav-right" })
  11174. ]),
  11175. vue.createElementVNode("view", { class: "wallet-card" }, [
  11176. vue.createElementVNode("view", { class: "bg-circle big" }),
  11177. vue.createElementVNode("view", { class: "bg-circle small" }),
  11178. vue.createElementVNode("view", { class: "card-content" }, [
  11179. vue.createElementVNode("view", { class: "card-top" }, [
  11180. vue.createElementVNode("view", { class: "app-info" }, [
  11181. vue.createElementVNode("image", {
  11182. class: "app-logo",
  11183. src: _imports_1$2,
  11184. mode: "aspectFit"
  11185. }),
  11186. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  11187. ]),
  11188. vue.createElementVNode("view", {
  11189. class: "bill-btn",
  11190. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  11191. }, [
  11192. vue.createElementVNode("text", null, "账单")
  11193. ])
  11194. ]),
  11195. vue.createElementVNode("view", { class: "balance-container" }, [
  11196. vue.createElementVNode("view", { class: "balance-main" }, [
  11197. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  11198. vue.createElementVNode(
  11199. "text",
  11200. { class: "balance-num" },
  11201. vue.toDisplayString($data.balance),
  11202. 1
  11203. /* TEXT */
  11204. )
  11205. ]),
  11206. vue.createElementVNode("view", { class: "balance-pending" }, [
  11207. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  11208. vue.createElementVNode(
  11209. "text",
  11210. { class: "pending-num" },
  11211. vue.toDisplayString($data.pendingBalance),
  11212. 1
  11213. /* TEXT */
  11214. )
  11215. ])
  11216. ])
  11217. ])
  11218. ]),
  11219. vue.createElementVNode("view", { class: "record-container" }, [
  11220. vue.createElementVNode("view", { class: "record-header" }, [
  11221. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  11222. vue.createElementVNode("view", {
  11223. class: "header-more",
  11224. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  11225. }, [
  11226. vue.createElementVNode("text", null, "查看全部"),
  11227. vue.createElementVNode("image", {
  11228. class: "more-icon",
  11229. src: _imports_2$2
  11230. })
  11231. ])
  11232. ]),
  11233. vue.createElementVNode("view", { class: "tabs-row" }, [
  11234. vue.createElementVNode(
  11235. "view",
  11236. {
  11237. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11238. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  11239. },
  11240. [
  11241. vue.createElementVNode("text", null, "全部"),
  11242. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11243. key: 0,
  11244. class: "tab-line"
  11245. })) : vue.createCommentVNode("v-if", true)
  11246. ],
  11247. 2
  11248. /* CLASS */
  11249. ),
  11250. vue.createElementVNode(
  11251. "view",
  11252. {
  11253. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11254. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  11255. },
  11256. [
  11257. vue.createElementVNode("text", null, "收入"),
  11258. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11259. key: 0,
  11260. class: "tab-line"
  11261. })) : vue.createCommentVNode("v-if", true)
  11262. ],
  11263. 2
  11264. /* CLASS */
  11265. ),
  11266. vue.createElementVNode(
  11267. "view",
  11268. {
  11269. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11270. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  11271. },
  11272. [
  11273. vue.createElementVNode("text", null, "支出"),
  11274. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11275. key: 0,
  11276. class: "tab-line"
  11277. })) : vue.createCommentVNode("v-if", true)
  11278. ],
  11279. 2
  11280. /* CLASS */
  11281. )
  11282. ]),
  11283. vue.createElementVNode("view", { class: "record-list" }, [
  11284. (vue.openBlock(true), vue.createElementBlock(
  11285. vue.Fragment,
  11286. null,
  11287. vue.renderList($options.displayList, (item, index) => {
  11288. return vue.openBlock(), vue.createElementBlock("view", {
  11289. class: "list-item",
  11290. key: index
  11291. }, [
  11292. vue.createElementVNode("view", { class: "item-left" }, [
  11293. vue.createElementVNode(
  11294. "text",
  11295. { class: "item-title" },
  11296. vue.toDisplayString(item.title),
  11297. 1
  11298. /* TEXT */
  11299. ),
  11300. vue.createElementVNode(
  11301. "text",
  11302. { class: "item-desc" },
  11303. vue.toDisplayString(item.desc),
  11304. 1
  11305. /* TEXT */
  11306. ),
  11307. vue.createElementVNode(
  11308. "text",
  11309. { class: "item-time" },
  11310. vue.toDisplayString(item.time),
  11311. 1
  11312. /* TEXT */
  11313. )
  11314. ]),
  11315. vue.createElementVNode("view", { class: "item-right" }, [
  11316. vue.createElementVNode(
  11317. "text",
  11318. {
  11319. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11320. },
  11321. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11322. 3
  11323. /* TEXT, CLASS */
  11324. ),
  11325. vue.createElementVNode("view", { class: "item-tag" }, [
  11326. vue.createElementVNode(
  11327. "text",
  11328. null,
  11329. vue.toDisplayString(item.tag),
  11330. 1
  11331. /* TEXT */
  11332. )
  11333. ])
  11334. ])
  11335. ]);
  11336. }),
  11337. 128
  11338. /* KEYED_FRAGMENT */
  11339. ))
  11340. ])
  11341. ])
  11342. ]);
  11343. }
  11344. const PagesMineWalletIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/wallet/index.vue"]]);
  11345. const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
  11346. const _sfc_main$9 = {
  11347. data() {
  11348. const d = /* @__PURE__ */ new Date();
  11349. return {
  11350. currentTab: 0,
  11351. year: d.getFullYear(),
  11352. month: d.getMonth() + 1,
  11353. groups: []
  11354. };
  11355. },
  11356. computed: {
  11357. currentDate() {
  11358. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  11359. },
  11360. displayGroups() {
  11361. if (this.currentTab === 0)
  11362. return this.groups;
  11363. return this.groups.map((group) => {
  11364. const filteredItems = group.items.filter((item) => {
  11365. const type = this.currentTab === 1 ? "income" : "expense";
  11366. return item.type === type;
  11367. });
  11368. return {
  11369. ...group,
  11370. items: filteredItems
  11371. };
  11372. }).filter((group) => group.items.length > 0);
  11373. }
  11374. },
  11375. onShow() {
  11376. this.fetchData();
  11377. },
  11378. methods: {
  11379. async fetchData() {
  11380. try {
  11381. const res = await listBalanceOnApp({
  11382. year: this.year,
  11383. month: this.month
  11384. });
  11385. if (res.code === 200) {
  11386. const list = res.data || [];
  11387. let incomeTotal = 0;
  11388. let expenseTotal = 0;
  11389. const items = list.map((item) => {
  11390. const isAdd = item.type === "add";
  11391. const uiType = isAdd ? "income" : "expense";
  11392. const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
  11393. let amountVal = Math.abs(item.amount) / 100;
  11394. if (isAdd) {
  11395. incomeTotal += amountVal;
  11396. } else {
  11397. expenseTotal += amountVal;
  11398. }
  11399. let amountStr = amountVal.toFixed(2);
  11400. if (!isAdd)
  11401. amountStr = "-" + amountStr;
  11402. let timeStr = item.createTime || "";
  11403. if (timeStr.length >= 16) {
  11404. timeStr = timeStr.substring(5, 16);
  11405. }
  11406. return {
  11407. ...item,
  11408. title,
  11409. desc: item.reason || "",
  11410. time: timeStr,
  11411. amount: amountStr,
  11412. type: uiType,
  11413. tag: title
  11414. };
  11415. });
  11416. this.groups = [
  11417. {
  11418. month: `${this.month}月 ${this.year}`,
  11419. income: incomeTotal.toFixed(2),
  11420. expense: expenseTotal.toFixed(2),
  11421. items
  11422. }
  11423. ];
  11424. }
  11425. } catch (error) {
  11426. formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
  11427. }
  11428. },
  11429. onDateChange(e) {
  11430. const val = e.detail.value;
  11431. const [y, m] = val.split("-");
  11432. this.year = parseInt(y, 10);
  11433. this.month = parseInt(m, 10);
  11434. this.fetchData();
  11435. },
  11436. navBack() {
  11437. uni.navigateBack();
  11438. },
  11439. switchTab(index) {
  11440. this.currentTab = index;
  11441. }
  11442. }
  11443. };
  11444. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  11445. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11446. vue.createElementVNode("view", { class: "nav-bar" }, [
  11447. vue.createElementVNode("view", {
  11448. class: "nav-left",
  11449. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11450. }, [
  11451. vue.createElementVNode("image", {
  11452. class: "back-icon",
  11453. src: _imports_0
  11454. })
  11455. ]),
  11456. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  11457. vue.createElementVNode("view", { class: "nav-right" })
  11458. ]),
  11459. vue.createElementVNode("view", { class: "content-area" }, [
  11460. vue.createElementVNode("view", { class: "filter-area" }, [
  11461. vue.createElementVNode("view", { class: "tabs-row" }, [
  11462. vue.createElementVNode(
  11463. "view",
  11464. {
  11465. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11466. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11467. },
  11468. [
  11469. vue.createElementVNode("text", null, "全部"),
  11470. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11471. key: 0,
  11472. class: "tab-line"
  11473. })) : vue.createCommentVNode("v-if", true)
  11474. ],
  11475. 2
  11476. /* CLASS */
  11477. ),
  11478. vue.createElementVNode(
  11479. "view",
  11480. {
  11481. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11482. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11483. },
  11484. [
  11485. vue.createElementVNode("text", null, "收入"),
  11486. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11487. key: 0,
  11488. class: "tab-line"
  11489. })) : vue.createCommentVNode("v-if", true)
  11490. ],
  11491. 2
  11492. /* CLASS */
  11493. ),
  11494. vue.createElementVNode(
  11495. "view",
  11496. {
  11497. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11498. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11499. },
  11500. [
  11501. vue.createElementVNode("text", null, "支出"),
  11502. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11503. key: 0,
  11504. class: "tab-line"
  11505. })) : vue.createCommentVNode("v-if", true)
  11506. ],
  11507. 2
  11508. /* CLASS */
  11509. )
  11510. ]),
  11511. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  11512. vue.createElementVNode("picker", {
  11513. mode: "date",
  11514. fields: "month",
  11515. value: $options.currentDate,
  11516. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  11517. }, [
  11518. vue.createElementVNode("view", { class: "date-picker" }, [
  11519. vue.createElementVNode(
  11520. "text",
  11521. { class: "date-text" },
  11522. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  11523. 1
  11524. /* TEXT */
  11525. ),
  11526. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  11527. ])
  11528. ], 40, ["value"])
  11529. ])
  11530. ]),
  11531. vue.createElementVNode("scroll-view", {
  11532. "scroll-y": "",
  11533. class: "bill-list"
  11534. }, [
  11535. (vue.openBlock(true), vue.createElementBlock(
  11536. vue.Fragment,
  11537. null,
  11538. vue.renderList($options.displayGroups, (group, gIndex) => {
  11539. return vue.openBlock(), vue.createElementBlock("view", {
  11540. key: gIndex,
  11541. class: "month-group"
  11542. }, [
  11543. vue.createElementVNode("view", { class: "group-header" }, [
  11544. vue.createElementVNode(
  11545. "text",
  11546. { class: "month-title" },
  11547. vue.toDisplayString(group.month),
  11548. 1
  11549. /* TEXT */
  11550. ),
  11551. vue.createElementVNode(
  11552. "text",
  11553. { class: "month-summary" },
  11554. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  11555. 1
  11556. /* TEXT */
  11557. )
  11558. ]),
  11559. (vue.openBlock(true), vue.createElementBlock(
  11560. vue.Fragment,
  11561. null,
  11562. vue.renderList(group.items, (item, index) => {
  11563. return vue.openBlock(), vue.createElementBlock("view", {
  11564. class: "list-item",
  11565. key: index
  11566. }, [
  11567. vue.createElementVNode(
  11568. "view",
  11569. {
  11570. class: vue.normalizeClass(["item-icon-box", item.type])
  11571. },
  11572. [
  11573. vue.createElementVNode(
  11574. "text",
  11575. { class: "item-icon-symbol" },
  11576. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11577. 1
  11578. /* TEXT */
  11579. )
  11580. ],
  11581. 2
  11582. /* CLASS */
  11583. ),
  11584. vue.createElementVNode("view", { class: "item-center" }, [
  11585. vue.createElementVNode(
  11586. "text",
  11587. { class: "item-title" },
  11588. vue.toDisplayString(item.title),
  11589. 1
  11590. /* TEXT */
  11591. ),
  11592. vue.createElementVNode(
  11593. "text",
  11594. { class: "item-desc" },
  11595. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11596. 1
  11597. /* TEXT */
  11598. )
  11599. ]),
  11600. vue.createElementVNode("view", { class: "item-right" }, [
  11601. vue.createElementVNode(
  11602. "text",
  11603. {
  11604. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11605. },
  11606. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11607. 3
  11608. /* TEXT, CLASS */
  11609. ),
  11610. vue.createElementVNode("view", { class: "item-tag" }, [
  11611. vue.createElementVNode(
  11612. "text",
  11613. null,
  11614. vue.toDisplayString(item.tag),
  11615. 1
  11616. /* TEXT */
  11617. )
  11618. ])
  11619. ])
  11620. ]);
  11621. }),
  11622. 128
  11623. /* KEYED_FRAGMENT */
  11624. ))
  11625. ]);
  11626. }),
  11627. 128
  11628. /* KEYED_FRAGMENT */
  11629. )),
  11630. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11631. ])
  11632. ])
  11633. ]);
  11634. }
  11635. const PagesMineWalletBill = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/wallet/bill.vue"]]);
  11636. function listAllLevelRights() {
  11637. return request({
  11638. url: "/fulfiller/levelRights/listAll",
  11639. method: "GET"
  11640. });
  11641. }
  11642. const _sfc_main$8 = {
  11643. data() {
  11644. return {
  11645. currentIndex: 0,
  11646. profile: null,
  11647. levels: [],
  11648. // 从后端获取的等级配置
  11649. rightsList: [],
  11650. // 从后端获取的所有权益列表
  11651. isPopupShow: false,
  11652. currentBenefit: null,
  11653. pageLoading: true
  11654. };
  11655. },
  11656. computed: {
  11657. currentLevel() {
  11658. return this.processedLevels[this.currentIndex];
  11659. },
  11660. // 合并等级与对应的权益详细信息
  11661. processedLevels() {
  11662. if (!this.levels.length)
  11663. return [];
  11664. return this.levels.map((lvl) => {
  11665. const benefits = (lvl.rights || []).map((rightId) => {
  11666. return this.rightsList.find((r) => r.id === rightId);
  11667. }).filter(Boolean);
  11668. return {
  11669. ...lvl,
  11670. isCurrent: this.profile && this.profile.level === lvl.lvNo,
  11671. benefits
  11672. };
  11673. }).sort((a, b) => a.lvNo - b.lvNo);
  11674. }
  11675. },
  11676. async onLoad() {
  11677. await this.initData();
  11678. },
  11679. methods: {
  11680. async initData() {
  11681. this.pageLoading = true;
  11682. uni.showLoading({ title: "加载中..." });
  11683. try {
  11684. const [profileRes, levelsRes, rightsRes] = await Promise.all([
  11685. getMyProfile(),
  11686. listAllLevelConfigs(),
  11687. listAllLevelRights()
  11688. ]);
  11689. this.profile = profileRes.data;
  11690. this.levels = levelsRes.data || [];
  11691. this.rightsList = rightsRes.data || [];
  11692. if (this.profile) {
  11693. const idx = this.processedLevels.findIndex((lvl) => lvl.lvNo === this.profile.level);
  11694. if (idx !== -1) {
  11695. this.currentIndex = idx;
  11696. }
  11697. }
  11698. } catch (err) {
  11699. formatAppLog("error", "at pages/mine/level/index.vue:157", "初始化等级页面失败:", err);
  11700. uni.showToast({ title: "数据加载失败", icon: "none" });
  11701. } finally {
  11702. this.pageLoading = false;
  11703. uni.hideLoading();
  11704. }
  11705. },
  11706. navBack() {
  11707. uni.navigateBack();
  11708. },
  11709. swiperChange(e) {
  11710. this.currentIndex = e.detail.current;
  11711. },
  11712. changeLevel(index) {
  11713. this.currentIndex = index;
  11714. },
  11715. showBenefitDetail(benefit) {
  11716. this.currentBenefit = benefit;
  11717. this.isPopupShow = true;
  11718. },
  11719. closePopup() {
  11720. this.isPopupShow = false;
  11721. }
  11722. }
  11723. };
  11724. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  11725. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11726. vue.createElementVNode("view", { class: "custom-header" }, [
  11727. vue.createElementVNode("view", {
  11728. class: "header-left",
  11729. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11730. }, [
  11731. vue.createElementVNode("image", {
  11732. class: "back-icon",
  11733. src: _imports_0,
  11734. style: { "transform": "rotate(180deg)" }
  11735. })
  11736. ]),
  11737. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  11738. vue.createElementVNode("view", { class: "header-right" })
  11739. ]),
  11740. vue.createElementVNode("view", { class: "header-placeholder" }),
  11741. !$data.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  11742. key: 0,
  11743. class: "swiper-container"
  11744. }, [
  11745. vue.createElementVNode("swiper", {
  11746. class: "level-swiper",
  11747. "previous-margin": "80rpx",
  11748. "next-margin": "80rpx",
  11749. current: $data.currentIndex,
  11750. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  11751. }, [
  11752. (vue.openBlock(true), vue.createElementBlock(
  11753. vue.Fragment,
  11754. null,
  11755. vue.renderList($options.processedLevels, (level, index) => {
  11756. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  11757. key: index,
  11758. onClick: ($event) => $options.changeLevel(index)
  11759. }, [
  11760. vue.createElementVNode(
  11761. "view",
  11762. {
  11763. class: "level-card",
  11764. style: vue.normalizeStyle({
  11765. transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)",
  11766. backgroundImage: "url(" + level.backgroundUrl + ")",
  11767. backgroundSize: "cover",
  11768. backgroundPosition: "center"
  11769. })
  11770. },
  11771. [
  11772. vue.createElementVNode("view", { class: "card-content" }, [
  11773. vue.createElementVNode("view", { class: "card-header" }, [
  11774. vue.createElementVNode(
  11775. "view",
  11776. { class: "level-badge" },
  11777. "L" + vue.toDisplayString(index + 1),
  11778. 1
  11779. /* TEXT */
  11780. ),
  11781. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  11782. key: 0,
  11783. class: "current-badge"
  11784. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  11785. ]),
  11786. vue.createElementVNode(
  11787. "text",
  11788. { class: "level-name" },
  11789. vue.toDisplayString(level.name),
  11790. 1
  11791. /* TEXT */
  11792. ),
  11793. vue.createElementVNode(
  11794. "text",
  11795. { class: "level-score" },
  11796. "所需积分: " + vue.toDisplayString(level.upgradePoints || 0),
  11797. 1
  11798. /* TEXT */
  11799. ),
  11800. vue.createElementVNode("image", {
  11801. class: "crown-overlay",
  11802. src: _imports_1$4,
  11803. mode: "aspectFit"
  11804. })
  11805. ])
  11806. ],
  11807. 4
  11808. /* STYLE */
  11809. )
  11810. ], 8, ["onClick"]);
  11811. }),
  11812. 128
  11813. /* KEYED_FRAGMENT */
  11814. ))
  11815. ], 40, ["current"]),
  11816. vue.createElementVNode("view", { class: "swiper-dots" }, [
  11817. (vue.openBlock(true), vue.createElementBlock(
  11818. vue.Fragment,
  11819. null,
  11820. vue.renderList($options.processedLevels, (item, index) => {
  11821. return vue.openBlock(), vue.createElementBlock(
  11822. "view",
  11823. {
  11824. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  11825. key: index
  11826. },
  11827. null,
  11828. 2
  11829. /* CLASS */
  11830. );
  11831. }),
  11832. 128
  11833. /* KEYED_FRAGMENT */
  11834. ))
  11835. ])
  11836. ])) : vue.createCommentVNode("v-if", true),
  11837. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11838. key: 1,
  11839. class: "benefits-title-row"
  11840. }, [
  11841. vue.createElementVNode("text", { class: "benefits-title" }, "专属权益"),
  11842. vue.createElementVNode(
  11843. "text",
  11844. { class: "benefits-count" },
  11845. "(" + vue.toDisplayString($options.currentLevel.benefits ? $options.currentLevel.benefits.length : 0) + ")",
  11846. 1
  11847. /* TEXT */
  11848. )
  11849. ])) : vue.createCommentVNode("v-if", true),
  11850. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11851. key: 2,
  11852. class: "benefits-grid"
  11853. }, [
  11854. (vue.openBlock(true), vue.createElementBlock(
  11855. vue.Fragment,
  11856. null,
  11857. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11858. return vue.openBlock(), vue.createElementBlock("view", {
  11859. class: "benefit-item",
  11860. key: index,
  11861. onClick: ($event) => $options.showBenefitDetail(benefit)
  11862. }, [
  11863. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11864. benefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11865. key: 0,
  11866. class: "benefit-icon",
  11867. src: benefit.iconUrl,
  11868. mode: "aspectFit"
  11869. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11870. "view",
  11871. {
  11872. key: 1,
  11873. class: "benefit-icon-placeholder"
  11874. },
  11875. vue.toDisplayString(benefit.name[0]),
  11876. 1
  11877. /* TEXT */
  11878. ))
  11879. ]),
  11880. vue.createElementVNode(
  11881. "text",
  11882. { class: "benefit-name" },
  11883. vue.toDisplayString(benefit.name),
  11884. 1
  11885. /* TEXT */
  11886. )
  11887. ], 8, ["onClick"]);
  11888. }),
  11889. 128
  11890. /* KEYED_FRAGMENT */
  11891. )),
  11892. !$options.currentLevel.benefits || $options.currentLevel.benefits.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11893. key: 0,
  11894. class: "empty-benefits"
  11895. }, [
  11896. vue.createElementVNode("text", null, "该等级暂无特殊权益")
  11897. ])) : vue.createCommentVNode("v-if", true)
  11898. ])) : vue.createCommentVNode("v-if", true),
  11899. vue.createElementVNode(
  11900. "view",
  11901. {
  11902. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11903. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11904. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11905. }, ["stop", "prevent"]))
  11906. },
  11907. [
  11908. vue.createElementVNode("view", {
  11909. class: "popup-modal",
  11910. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11911. }, ["stop"]))
  11912. }, [
  11913. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11914. $data.currentBenefit && $data.currentBenefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11915. key: 0,
  11916. class: "benefit-icon-large",
  11917. src: $data.currentBenefit.iconUrl,
  11918. mode: "aspectFit"
  11919. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11920. "view",
  11921. {
  11922. key: 1,
  11923. class: "benefit-icon-placeholder-large"
  11924. },
  11925. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11926. 1
  11927. /* TEXT */
  11928. ))
  11929. ]),
  11930. vue.createElementVNode(
  11931. "text",
  11932. { class: "popup-title" },
  11933. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11934. 1
  11935. /* TEXT */
  11936. ),
  11937. vue.createElementVNode(
  11938. "text",
  11939. { class: "popup-desc" },
  11940. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.statement : ""),
  11941. 1
  11942. /* TEXT */
  11943. ),
  11944. vue.createElementVNode("button", {
  11945. class: "popup-btn",
  11946. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11947. }, "我知道了")
  11948. ])
  11949. ],
  11950. 34
  11951. /* CLASS, NEED_HYDRATION */
  11952. )
  11953. ]);
  11954. }
  11955. const PagesMineLevelIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/level/index.vue"]]);
  11956. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11957. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11958. const _sfc_main$7 = {
  11959. data() {
  11960. return {};
  11961. },
  11962. methods: {
  11963. navBack() {
  11964. uni.navigateBack();
  11965. },
  11966. navToOrderMsg() {
  11967. uni.navigateTo({
  11968. url: "/pages/mine/message/order"
  11969. });
  11970. },
  11971. navToSystemMsg() {
  11972. uni.navigateTo({
  11973. url: "/pages/mine/message/system"
  11974. });
  11975. }
  11976. }
  11977. };
  11978. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  11979. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11980. vue.createElementVNode("view", { class: "nav-bar" }, [
  11981. vue.createElementVNode("view", {
  11982. class: "nav-left",
  11983. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11984. }, [
  11985. vue.createElementVNode("image", {
  11986. class: "back-icon",
  11987. src: _imports_0,
  11988. style: { "transform": "rotate(180deg)" }
  11989. })
  11990. ]),
  11991. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11992. vue.createElementVNode("view", { class: "nav-right" }, [
  11993. vue.createElementVNode("view", { class: "more-dots" }, [
  11994. vue.createElementVNode("view", { class: "dot" }),
  11995. vue.createElementVNode("view", { class: "dot" }),
  11996. vue.createElementVNode("view", { class: "dot" })
  11997. ])
  11998. ])
  11999. ]),
  12000. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12001. vue.createElementVNode("view", { class: "message-list" }, [
  12002. vue.createElementVNode("view", {
  12003. class: "message-item",
  12004. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  12005. }, [
  12006. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  12007. vue.createElementVNode("image", {
  12008. class: "msg-icon",
  12009. src: _imports_1$1
  12010. }),
  12011. vue.createElementVNode("view", { class: "red-dot-badge" })
  12012. ]),
  12013. vue.createElementVNode("view", { class: "content-wrapper" }, [
  12014. vue.createElementVNode("view", { class: "top-row" }, [
  12015. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  12016. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  12017. ]),
  12018. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  12019. ])
  12020. ]),
  12021. vue.createElementVNode("view", {
  12022. class: "message-item",
  12023. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  12024. }, [
  12025. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  12026. vue.createElementVNode("image", {
  12027. class: "msg-icon",
  12028. src: _imports_2$1
  12029. })
  12030. ]),
  12031. vue.createElementVNode("view", { class: "content-wrapper" }, [
  12032. vue.createElementVNode("view", { class: "top-row" }, [
  12033. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  12034. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  12035. ]),
  12036. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  12037. ])
  12038. ])
  12039. ])
  12040. ]);
  12041. }
  12042. const PagesMineMessageIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/index.vue"]]);
  12043. const _sfc_main$6 = {
  12044. methods: {
  12045. navBack() {
  12046. uni.navigateBack();
  12047. }
  12048. }
  12049. };
  12050. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  12051. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12052. vue.createElementVNode("view", { class: "nav-bar" }, [
  12053. vue.createElementVNode("view", {
  12054. class: "nav-left",
  12055. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12056. }, [
  12057. vue.createElementVNode("image", {
  12058. class: "back-icon",
  12059. src: _imports_0,
  12060. style: { "transform": "rotate(180deg)" }
  12061. })
  12062. ]),
  12063. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  12064. vue.createElementVNode("view", { class: "nav-right" })
  12065. ]),
  12066. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12067. vue.createElementVNode("view", { class: "msg-group" }, [
  12068. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  12069. vue.createElementVNode("view", { class: "msg-card" }, [
  12070. vue.createElementVNode("view", { class: "card-header" }, [
  12071. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  12072. vue.createElementVNode("view", { class: "red-dot" })
  12073. ]),
  12074. vue.createElementVNode("view", { class: "card-body" }, [
  12075. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  12076. ]),
  12077. vue.createElementVNode("view", { class: "card-footer" }, [
  12078. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  12079. vue.createElementVNode("image", {
  12080. class: "arrow-icon",
  12081. src: _imports_3
  12082. })
  12083. ])
  12084. ]),
  12085. vue.createElementVNode("view", { class: "msg-card" }, [
  12086. vue.createElementVNode("view", { class: "card-header" }, [
  12087. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  12088. ]),
  12089. vue.createElementVNode("view", { class: "card-body" }, [
  12090. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  12091. ]),
  12092. vue.createElementVNode("view", { class: "card-footer" }, [
  12093. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  12094. vue.createElementVNode("image", {
  12095. class: "arrow-icon",
  12096. src: _imports_3
  12097. })
  12098. ])
  12099. ])
  12100. ]),
  12101. vue.createElementVNode("view", { class: "msg-group" }, [
  12102. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  12103. vue.createElementVNode("view", { class: "msg-card" }, [
  12104. vue.createElementVNode("view", { class: "card-header" }, [
  12105. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  12106. ]),
  12107. vue.createElementVNode("view", { class: "card-body" }, [
  12108. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  12109. ]),
  12110. vue.createElementVNode("view", { class: "card-footer" }, [
  12111. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  12112. vue.createElementVNode("image", {
  12113. class: "arrow-icon",
  12114. src: _imports_3
  12115. })
  12116. ])
  12117. ])
  12118. ])
  12119. ]);
  12120. }
  12121. const PagesMineMessageOrder = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/order.vue"]]);
  12122. const _sfc_main$5 = {
  12123. methods: {
  12124. navBack() {
  12125. uni.navigateBack();
  12126. },
  12127. navToDetail() {
  12128. uni.navigateTo({
  12129. url: "/pages/mine/message/detail"
  12130. });
  12131. }
  12132. }
  12133. };
  12134. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  12135. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12136. vue.createElementVNode("view", { class: "nav-bar" }, [
  12137. vue.createElementVNode("view", {
  12138. class: "nav-left",
  12139. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12140. }, [
  12141. vue.createElementVNode("image", {
  12142. class: "back-icon",
  12143. src: _imports_0,
  12144. style: { "transform": "rotate(180deg)" }
  12145. })
  12146. ]),
  12147. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  12148. vue.createElementVNode("view", { class: "nav-right" })
  12149. ]),
  12150. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12151. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  12152. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  12153. vue.createElementVNode("view", {
  12154. class: "sys-card",
  12155. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12156. }, [
  12157. vue.createElementVNode("view", { class: "sys-header" }, [
  12158. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  12159. vue.createElementVNode("view", { class: "red-dot" })
  12160. ]),
  12161. vue.createElementVNode("view", { class: "sys-content" }, [
  12162. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  12163. ]),
  12164. vue.createElementVNode("view", { class: "sys-footer" }, [
  12165. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  12166. vue.createElementVNode("view", { class: "check-more" }, [
  12167. vue.createElementVNode("text", null, "查看详情"),
  12168. vue.createElementVNode("image", {
  12169. class: "arrow-icon-small",
  12170. src: _imports_3
  12171. })
  12172. ])
  12173. ])
  12174. ]),
  12175. vue.createElementVNode("view", { class: "sys-card" }, [
  12176. vue.createElementVNode("view", { class: "sys-header" }, [
  12177. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  12178. ]),
  12179. vue.createElementVNode("view", { class: "sys-content" }, [
  12180. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  12181. ]),
  12182. vue.createElementVNode("view", { class: "sys-footer" }, [
  12183. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  12184. vue.createElementVNode("view", { class: "check-more" }, [
  12185. vue.createElementVNode("text", null, "查看详情"),
  12186. vue.createElementVNode("image", {
  12187. class: "arrow-icon-small",
  12188. src: _imports_3
  12189. })
  12190. ])
  12191. ])
  12192. ]),
  12193. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  12194. vue.createElementVNode("view", { class: "sys-card" }, [
  12195. vue.createElementVNode("view", { class: "sys-header" }, [
  12196. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  12197. ]),
  12198. vue.createElementVNode("view", { class: "sys-content" }, [
  12199. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  12200. ]),
  12201. vue.createElementVNode("view", { class: "sys-footer" }, [
  12202. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  12203. vue.createElementVNode("view", { class: "check-more" }, [
  12204. vue.createElementVNode("text", null, "查看详情"),
  12205. vue.createElementVNode("image", {
  12206. class: "arrow-icon-small",
  12207. src: _imports_3
  12208. })
  12209. ])
  12210. ])
  12211. ])
  12212. ])
  12213. ]);
  12214. }
  12215. const PagesMineMessageSystem = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/system.vue"]]);
  12216. const _sfc_main$4 = {
  12217. methods: {
  12218. navBack() {
  12219. uni.navigateBack();
  12220. }
  12221. }
  12222. };
  12223. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  12224. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12225. vue.createElementVNode("view", { class: "nav-bar" }, [
  12226. vue.createElementVNode("view", {
  12227. class: "nav-left",
  12228. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12229. }, [
  12230. vue.createElementVNode("image", {
  12231. class: "back-icon",
  12232. src: _imports_0,
  12233. style: { "transform": "rotate(180deg)" }
  12234. })
  12235. ]),
  12236. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  12237. vue.createElementVNode("view", { class: "nav-right" })
  12238. ]),
  12239. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12240. vue.createElementVNode("view", { class: "detail-content" }, [
  12241. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  12242. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  12243. vue.createElementVNode("view", { class: "detail-body" }, [
  12244. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  12245. ]),
  12246. vue.createElementVNode("view", { class: "detail-footer" }, [
  12247. vue.createElementVNode("view", { class: "divider" }),
  12248. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  12249. ])
  12250. ])
  12251. ]);
  12252. }
  12253. const PagesMineMessageDetail = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/detail.vue"]]);
  12254. const _imports_1 = "/static/icons/diamond_white.svg";
  12255. const _imports_2 = "/static/icons/star_decor.svg";
  12256. const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
  12257. const _sfc_main$3 = {
  12258. data() {
  12259. return {
  12260. points: 0,
  12261. currentTab: 0,
  12262. list: [],
  12263. pageNum: 1,
  12264. pageSize: 10,
  12265. total: 0,
  12266. loading: false
  12267. };
  12268. },
  12269. computed: {
  12270. displayList() {
  12271. if (this.currentTab === 0)
  12272. return this.list;
  12273. const type = this.currentTab === 1 ? "income" : "expense";
  12274. return this.list.filter((item) => item.type === type);
  12275. }
  12276. },
  12277. onShow() {
  12278. this.fetchPoints();
  12279. this.fetchList(true);
  12280. },
  12281. onReachBottom() {
  12282. this.fetchList();
  12283. },
  12284. methods: {
  12285. async fetchPoints() {
  12286. try {
  12287. const res = await pointsOnApp();
  12288. if (res.code === 200) {
  12289. this.points = res.data || 0;
  12290. }
  12291. } catch (error) {
  12292. formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
  12293. }
  12294. },
  12295. async fetchList(reset = false) {
  12296. if (reset) {
  12297. this.pageNum = 1;
  12298. this.list = [];
  12299. this.total = 0;
  12300. }
  12301. if (this.loading)
  12302. return;
  12303. if (!reset && this.list.length >= this.total && this.total !== 0)
  12304. return;
  12305. this.loading = true;
  12306. try {
  12307. const res = await pagePointsOnApp({
  12308. pageNum: this.pageNum,
  12309. pageSize: this.pageSize
  12310. });
  12311. if (res.code === 200) {
  12312. this.total = res.total || 0;
  12313. const rows = res.rows || [];
  12314. const mappedRows = rows.map((item) => {
  12315. const isAdd = item.type === "add";
  12316. const uiType = isAdd ? "income" : "expense";
  12317. const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
  12318. let amountStr = Math.abs(item.amount);
  12319. if (!isAdd) {
  12320. amountStr = "-" + amountStr;
  12321. }
  12322. return {
  12323. ...item,
  12324. title,
  12325. desc: item.reason || "",
  12326. time: item.createTime || "",
  12327. amount: amountStr,
  12328. type: uiType,
  12329. tag: title
  12330. };
  12331. });
  12332. this.list = this.list.concat(mappedRows);
  12333. this.pageNum++;
  12334. }
  12335. } catch (error) {
  12336. formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
  12337. } finally {
  12338. this.loading = false;
  12339. }
  12340. },
  12341. navBack() {
  12342. uni.navigateBack();
  12343. },
  12344. navToDetail() {
  12345. uni.navigateTo({
  12346. url: "/pages/mine/points/detail"
  12347. });
  12348. },
  12349. navToEquity() {
  12350. },
  12351. switchTab(index) {
  12352. this.currentTab = index;
  12353. }
  12354. }
  12355. };
  12356. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  12357. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12358. vue.createElementVNode("view", { class: "nav-bar" }, [
  12359. vue.createElementVNode("view", {
  12360. class: "nav-left",
  12361. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12362. }, [
  12363. vue.createElementVNode("image", {
  12364. class: "back-icon",
  12365. src: _imports_0
  12366. })
  12367. ]),
  12368. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  12369. vue.createElementVNode("view", { class: "nav-right" })
  12370. ]),
  12371. vue.createElementVNode("view", { class: "points-card" }, [
  12372. vue.createElementVNode("view", { class: "card-header" }, [
  12373. vue.createElementVNode("view", {
  12374. class: "equity-btn",
  12375. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  12376. }, [
  12377. vue.createElementVNode("image", {
  12378. class: "equity-icon",
  12379. src: _imports_1
  12380. }),
  12381. vue.createElementVNode("text", null, "积分权益")
  12382. ]),
  12383. vue.createElementVNode("view", {
  12384. class: "detail-link",
  12385. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12386. }, [
  12387. vue.createElementVNode("text", null, "明细")
  12388. ])
  12389. ]),
  12390. vue.createElementVNode("view", { class: "card-body" }, [
  12391. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  12392. vue.createElementVNode(
  12393. "text",
  12394. { class: "value" },
  12395. vue.toDisplayString($data.points),
  12396. 1
  12397. /* TEXT */
  12398. )
  12399. ]),
  12400. vue.createElementVNode("image", {
  12401. class: "bg-decor",
  12402. src: _imports_2,
  12403. mode: "aspectFit"
  12404. })
  12405. ]),
  12406. vue.createElementVNode("view", { class: "record-container" }, [
  12407. vue.createElementVNode("view", { class: "record-header" }, [
  12408. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  12409. vue.createElementVNode("view", {
  12410. class: "header-more",
  12411. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12412. }, [
  12413. vue.createElementVNode("text", null, "查看全部"),
  12414. vue.createElementVNode("image", {
  12415. class: "more-icon",
  12416. src: _imports_3
  12417. })
  12418. ])
  12419. ]),
  12420. vue.createElementVNode("view", { class: "tabs-row" }, [
  12421. vue.createElementVNode(
  12422. "view",
  12423. {
  12424. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12425. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  12426. },
  12427. [
  12428. vue.createElementVNode("text", null, "全部"),
  12429. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12430. key: 0,
  12431. class: "tab-line"
  12432. })) : vue.createCommentVNode("v-if", true)
  12433. ],
  12434. 2
  12435. /* CLASS */
  12436. ),
  12437. vue.createElementVNode(
  12438. "view",
  12439. {
  12440. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12441. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  12442. },
  12443. [
  12444. vue.createElementVNode("text", null, "获取"),
  12445. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12446. key: 0,
  12447. class: "tab-line"
  12448. })) : vue.createCommentVNode("v-if", true)
  12449. ],
  12450. 2
  12451. /* CLASS */
  12452. ),
  12453. vue.createElementVNode(
  12454. "view",
  12455. {
  12456. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12457. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  12458. },
  12459. [
  12460. vue.createElementVNode("text", null, "扣减"),
  12461. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12462. key: 0,
  12463. class: "tab-line"
  12464. })) : vue.createCommentVNode("v-if", true)
  12465. ],
  12466. 2
  12467. /* CLASS */
  12468. )
  12469. ]),
  12470. vue.createElementVNode("view", { class: "record-list" }, [
  12471. (vue.openBlock(true), vue.createElementBlock(
  12472. vue.Fragment,
  12473. null,
  12474. vue.renderList($options.displayList, (item, index) => {
  12475. return vue.openBlock(), vue.createElementBlock("view", {
  12476. class: "list-item",
  12477. key: index
  12478. }, [
  12479. vue.createElementVNode("view", { class: "item-left" }, [
  12480. vue.createElementVNode(
  12481. "text",
  12482. { class: "item-title" },
  12483. vue.toDisplayString(item.title),
  12484. 1
  12485. /* TEXT */
  12486. ),
  12487. vue.createElementVNode(
  12488. "text",
  12489. { class: "item-desc" },
  12490. vue.toDisplayString(item.desc),
  12491. 1
  12492. /* TEXT */
  12493. ),
  12494. vue.createElementVNode(
  12495. "text",
  12496. { class: "item-time" },
  12497. vue.toDisplayString(item.time),
  12498. 1
  12499. /* TEXT */
  12500. )
  12501. ]),
  12502. vue.createElementVNode("view", { class: "item-right" }, [
  12503. vue.createElementVNode(
  12504. "text",
  12505. {
  12506. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12507. },
  12508. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12509. 3
  12510. /* TEXT, CLASS */
  12511. ),
  12512. vue.createElementVNode("view", { class: "item-tag" }, [
  12513. vue.createElementVNode(
  12514. "text",
  12515. null,
  12516. vue.toDisplayString(item.tag),
  12517. 1
  12518. /* TEXT */
  12519. )
  12520. ])
  12521. ])
  12522. ]);
  12523. }),
  12524. 128
  12525. /* KEYED_FRAGMENT */
  12526. ))
  12527. ])
  12528. ])
  12529. ]);
  12530. }
  12531. const PagesMinePointsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/index.vue"]]);
  12532. const bizTypeMap = fulfillerEnum.FlfPointsBizType;
  12533. const _sfc_main$2 = {
  12534. data() {
  12535. const d = /* @__PURE__ */ new Date();
  12536. return {
  12537. currentTab: 0,
  12538. year: d.getFullYear(),
  12539. month: d.getMonth() + 1,
  12540. groups: []
  12541. };
  12542. },
  12543. computed: {
  12544. currentDate() {
  12545. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  12546. },
  12547. displayGroups() {
  12548. if (this.currentTab === 0)
  12549. return this.groups;
  12550. return this.groups.map((group) => {
  12551. const filteredItems = group.items.filter((item) => {
  12552. const type = this.currentTab === 1 ? "income" : "expense";
  12553. return item.type === type;
  12554. });
  12555. return {
  12556. ...group,
  12557. items: filteredItems
  12558. };
  12559. }).filter((group) => group.items.length > 0);
  12560. }
  12561. },
  12562. onShow() {
  12563. this.fetchData();
  12564. },
  12565. methods: {
  12566. async fetchData() {
  12567. try {
  12568. const res = await listPointsOnApp({
  12569. year: this.year,
  12570. month: this.month
  12571. });
  12572. if (res.code === 200) {
  12573. const list = res.data || [];
  12574. let incomeTotal = 0;
  12575. let expenseTotal = 0;
  12576. const items = list.map((item) => {
  12577. const isAdd = item.type === "add";
  12578. const uiType = isAdd ? "income" : "expense";
  12579. const title = bizTypeMap[item.bizType] || item.bizType || "其他";
  12580. let amountVal = Math.abs(item.amount);
  12581. if (isAdd) {
  12582. incomeTotal += amountVal;
  12583. } else {
  12584. expenseTotal += amountVal;
  12585. }
  12586. let amountStr = String(amountVal);
  12587. if (!isAdd)
  12588. amountStr = "-" + amountStr;
  12589. let timeStr = item.createTime || "";
  12590. if (timeStr.length >= 16) {
  12591. timeStr = timeStr.substring(5, 16);
  12592. }
  12593. return {
  12594. ...item,
  12595. title,
  12596. desc: item.reason || "",
  12597. time: timeStr,
  12598. amount: amountStr,
  12599. type: uiType,
  12600. tag: title
  12601. };
  12602. });
  12603. this.groups = [
  12604. {
  12605. month: `${this.month}月 ${this.year}`,
  12606. income: String(incomeTotal),
  12607. expense: String(expenseTotal),
  12608. items
  12609. }
  12610. ];
  12611. }
  12612. } catch (error) {
  12613. formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
  12614. }
  12615. },
  12616. onDateChange(e) {
  12617. const val = e.detail.value;
  12618. const [y, m] = val.split("-");
  12619. this.year = parseInt(y, 10);
  12620. this.month = parseInt(m, 10);
  12621. this.fetchData();
  12622. },
  12623. navBack() {
  12624. uni.navigateBack();
  12625. },
  12626. switchTab(index) {
  12627. this.currentTab = index;
  12628. }
  12629. }
  12630. };
  12631. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  12632. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12633. vue.createElementVNode("view", { class: "nav-bar" }, [
  12634. vue.createElementVNode("view", {
  12635. class: "nav-left",
  12636. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12637. }, [
  12638. vue.createElementVNode("image", {
  12639. class: "back-icon",
  12640. src: _imports_0
  12641. })
  12642. ]),
  12643. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  12644. vue.createElementVNode("view", { class: "nav-right" })
  12645. ]),
  12646. vue.createElementVNode("view", { class: "content-area" }, [
  12647. vue.createElementVNode("view", { class: "filter-area" }, [
  12648. vue.createElementVNode("view", { class: "tabs-row" }, [
  12649. vue.createElementVNode(
  12650. "view",
  12651. {
  12652. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12653. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  12654. },
  12655. [
  12656. vue.createElementVNode("text", null, "全部"),
  12657. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12658. key: 0,
  12659. class: "tab-line"
  12660. })) : vue.createCommentVNode("v-if", true)
  12661. ],
  12662. 2
  12663. /* CLASS */
  12664. ),
  12665. vue.createElementVNode(
  12666. "view",
  12667. {
  12668. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12669. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  12670. },
  12671. [
  12672. vue.createElementVNode("text", null, "获取"),
  12673. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12674. key: 0,
  12675. class: "tab-line"
  12676. })) : vue.createCommentVNode("v-if", true)
  12677. ],
  12678. 2
  12679. /* CLASS */
  12680. ),
  12681. vue.createElementVNode(
  12682. "view",
  12683. {
  12684. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12685. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  12686. },
  12687. [
  12688. vue.createElementVNode("text", null, "扣减"),
  12689. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12690. key: 0,
  12691. class: "tab-line"
  12692. })) : vue.createCommentVNode("v-if", true)
  12693. ],
  12694. 2
  12695. /* CLASS */
  12696. )
  12697. ]),
  12698. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  12699. vue.createElementVNode("picker", {
  12700. mode: "date",
  12701. fields: "month",
  12702. value: $options.currentDate,
  12703. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  12704. }, [
  12705. vue.createElementVNode("view", { class: "date-picker" }, [
  12706. vue.createElementVNode(
  12707. "text",
  12708. { class: "date-text" },
  12709. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  12710. 1
  12711. /* TEXT */
  12712. ),
  12713. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  12714. ])
  12715. ], 40, ["value"])
  12716. ])
  12717. ]),
  12718. vue.createElementVNode("scroll-view", {
  12719. "scroll-y": "",
  12720. class: "bill-list"
  12721. }, [
  12722. (vue.openBlock(true), vue.createElementBlock(
  12723. vue.Fragment,
  12724. null,
  12725. vue.renderList($options.displayGroups, (group, gIndex) => {
  12726. return vue.openBlock(), vue.createElementBlock("view", {
  12727. key: gIndex,
  12728. class: "month-group"
  12729. }, [
  12730. vue.createElementVNode("view", { class: "group-header" }, [
  12731. vue.createElementVNode(
  12732. "text",
  12733. { class: "month-title" },
  12734. vue.toDisplayString(group.month),
  12735. 1
  12736. /* TEXT */
  12737. ),
  12738. vue.createElementVNode(
  12739. "text",
  12740. { class: "month-summary" },
  12741. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  12742. 1
  12743. /* TEXT */
  12744. )
  12745. ]),
  12746. (vue.openBlock(true), vue.createElementBlock(
  12747. vue.Fragment,
  12748. null,
  12749. vue.renderList(group.items, (item, index) => {
  12750. return vue.openBlock(), vue.createElementBlock("view", {
  12751. class: "list-item",
  12752. key: index
  12753. }, [
  12754. vue.createElementVNode(
  12755. "view",
  12756. {
  12757. class: vue.normalizeClass(["item-icon-box", item.type])
  12758. },
  12759. [
  12760. vue.createElementVNode(
  12761. "text",
  12762. { class: "item-icon-symbol" },
  12763. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  12764. 1
  12765. /* TEXT */
  12766. )
  12767. ],
  12768. 2
  12769. /* CLASS */
  12770. ),
  12771. vue.createElementVNode("view", { class: "item-center" }, [
  12772. vue.createElementVNode(
  12773. "text",
  12774. { class: "item-title" },
  12775. vue.toDisplayString(item.title),
  12776. 1
  12777. /* TEXT */
  12778. ),
  12779. vue.createElementVNode(
  12780. "text",
  12781. { class: "item-desc" },
  12782. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  12783. 1
  12784. /* TEXT */
  12785. )
  12786. ]),
  12787. vue.createElementVNode("view", { class: "item-right" }, [
  12788. vue.createElementVNode(
  12789. "text",
  12790. {
  12791. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12792. },
  12793. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12794. 3
  12795. /* TEXT, CLASS */
  12796. ),
  12797. vue.createElementVNode("view", { class: "item-tag" }, [
  12798. vue.createElementVNode(
  12799. "text",
  12800. null,
  12801. vue.toDisplayString(item.tag),
  12802. 1
  12803. /* TEXT */
  12804. )
  12805. ])
  12806. ])
  12807. ]);
  12808. }),
  12809. 128
  12810. /* KEYED_FRAGMENT */
  12811. ))
  12812. ]);
  12813. }),
  12814. 128
  12815. /* KEYED_FRAGMENT */
  12816. )),
  12817. vue.createElementVNode("view", { class: "list-padding-bottom" })
  12818. ])
  12819. ])
  12820. ]);
  12821. }
  12822. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  12823. const _sfc_main$1 = {
  12824. data() {
  12825. return {
  12826. id: null,
  12827. title: "",
  12828. content: "",
  12829. loading: false
  12830. };
  12831. },
  12832. onLoad(options) {
  12833. if (options.id) {
  12834. this.id = options.id;
  12835. this.loadDetail();
  12836. }
  12837. },
  12838. methods: {
  12839. async loadDetail() {
  12840. if (!this.id)
  12841. return;
  12842. uni.showLoading({ title: "加载中..." });
  12843. try {
  12844. const res = await getAgreement(this.id);
  12845. if (res.code === 200 && res.data) {
  12846. this.title = res.data.title;
  12847. this.content = res.data.content;
  12848. uni.setNavigationBarTitle({ title: this.title });
  12849. } else {
  12850. uni.showToast({ title: res.msg || "获取失败", icon: "none" });
  12851. }
  12852. } catch (err) {
  12853. formatAppLog("error", "at pages/mine/settings/about/agreement-detail.vue:56", "获取协议详情失败:", err);
  12854. uni.showToast({ title: "网络错误", icon: "none" });
  12855. } finally {
  12856. uni.hideLoading();
  12857. }
  12858. },
  12859. navBack() {
  12860. uni.navigateBack({ delta: 1 });
  12861. }
  12862. }
  12863. };
  12864. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  12865. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12866. vue.createElementVNode("view", { class: "custom-header" }, [
  12867. vue.createElementVNode("view", {
  12868. class: "header-left",
  12869. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12870. }, [
  12871. vue.createElementVNode("image", {
  12872. class: "back-icon",
  12873. src: _imports_0,
  12874. style: { "transform": "rotate(180deg)" }
  12875. })
  12876. ]),
  12877. vue.createElementVNode(
  12878. "text",
  12879. { class: "header-title" },
  12880. vue.toDisplayString($data.title || "协议详情"),
  12881. 1
  12882. /* TEXT */
  12883. ),
  12884. vue.createElementVNode("view", { class: "header-right" })
  12885. ]),
  12886. vue.createElementVNode("view", { class: "header-placeholder" }),
  12887. vue.createElementVNode("scroll-view", {
  12888. "scroll-y": "",
  12889. class: "content-scroll"
  12890. }, [
  12891. vue.createElementVNode("view", { class: "content-card" }, [
  12892. vue.createElementVNode("rich-text", {
  12893. nodes: $data.content,
  12894. class: "rich-text"
  12895. }, null, 8, ["nodes"])
  12896. ]),
  12897. vue.createElementVNode("view", { class: "safe-area-inset-bottom" })
  12898. ])
  12899. ]);
  12900. }
  12901. const PagesMineSettingsAboutAgreementDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/about/agreement-detail.vue"]]);
  12902. __definePage("pages/login/login", PagesLoginLogin);
  12903. __definePage("pages/recruit/landing", PagesRecruitLanding);
  12904. __definePage("pages/recruit/form", PagesRecruitForm);
  12905. __definePage("pages/recruit/auth", PagesRecruitAuth);
  12906. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  12907. __definePage("pages/recruit/success", PagesRecruitSuccess);
  12908. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  12909. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  12910. __definePage("pages/home/index", PagesHomeIndex);
  12911. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  12912. __definePage("pages/orders/index", PagesOrdersIndex);
  12913. __definePage("pages/orders/detail", PagesOrdersDetail);
  12914. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  12915. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  12916. __definePage("pages/mine/rewards", PagesMineRewards);
  12917. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  12918. __definePage("pages/mine/index", PagesMineIndex);
  12919. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  12920. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  12921. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  12922. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  12923. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  12924. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  12925. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  12926. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  12927. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  12928. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  12929. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  12930. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  12931. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  12932. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  12933. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  12934. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  12935. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  12936. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  12937. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  12938. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  12939. __definePage("pages/mine/settings/about/agreement-detail", PagesMineSettingsAboutAgreementDetail);
  12940. const _sfc_main = {
  12941. onLaunch: function() {
  12942. formatAppLog("log", "at App.vue:7", "App Launch");
  12943. uni.removeStorageSync("recruit_form_data");
  12944. uni.removeStorageSync("recruit_auth_data");
  12945. uni.removeStorageSync("recruit_qual_data");
  12946. if (isLoggedIn()) {
  12947. startGpsTimer();
  12948. uni.switchTab({
  12949. url: "/pages/home/index"
  12950. });
  12951. }
  12952. },
  12953. onShow: function() {
  12954. formatAppLog("log", "at App.vue:22", "App Show");
  12955. },
  12956. onHide: function() {
  12957. formatAppLog("log", "at App.vue:25", "App Hide");
  12958. }
  12959. };
  12960. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  12961. function createApp() {
  12962. const app = vue.createVueApp(App);
  12963. return {
  12964. app
  12965. };
  12966. }
  12967. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  12968. uni.Vuex = __Vuex__;
  12969. uni.Pinia = __Pinia__;
  12970. __app__.provide("__globalStyles", __uniConfig.styles);
  12971. __app__._component.mpType = "app";
  12972. __app__._component.render = () => {
  12973. };
  12974. __app__.mount("#app");
  12975. })(Vue);