app-service.js 503 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925
  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.0.102: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() {
  120. uni.getLocation({
  121. type: "wgs84",
  122. success: function(res) {
  123. const data = {
  124. longitude: res.longitude,
  125. latitude: res.latitude
  126. };
  127. uploadGps(data).then(() => {
  128. formatAppLog("log", "at utils/gps.js:20", "GPS定位上传成功", data);
  129. }).catch((err) => {
  130. formatAppLog("error", "at utils/gps.js:22", "GPS定位上传失败", err);
  131. });
  132. },
  133. fail: function(err) {
  134. formatAppLog("error", "at utils/gps.js:26", "获取GPS定位失败", err);
  135. }
  136. });
  137. }
  138. function startGpsTimer() {
  139. const isEnabled = uni.getStorageSync("GPS_REPORT_ENABLED");
  140. if (isEnabled === false) {
  141. stopGpsTimer();
  142. formatAppLog("log", "at utils/gps.js:36", "GPS上报已在配置中禁用,取消启动定时器");
  143. return;
  144. }
  145. stopGpsTimer();
  146. reportGps();
  147. gpsTimer = setInterval(() => {
  148. reportGps();
  149. }, 12e5);
  150. }
  151. function stopGpsTimer() {
  152. if (gpsTimer) {
  153. clearInterval(gpsTimer);
  154. gpsTimer = null;
  155. }
  156. }
  157. const TOKEN_KEY = "fulfiller_token";
  158. const USER_INFO_KEY = "fulfiller_user_info";
  159. function getToken() {
  160. return uni.getStorageSync(TOKEN_KEY) || "";
  161. }
  162. function setToken(token) {
  163. uni.setStorageSync(TOKEN_KEY, token);
  164. }
  165. function removeToken() {
  166. uni.removeStorageSync(TOKEN_KEY);
  167. }
  168. function isLoggedIn() {
  169. return !!getToken();
  170. }
  171. function removeUserInfo() {
  172. uni.removeStorageSync(USER_INFO_KEY);
  173. }
  174. function clearAuth() {
  175. removeToken();
  176. removeUserInfo();
  177. stopGpsTimer();
  178. }
  179. function request(options = {}) {
  180. const {
  181. url,
  182. method = "GET",
  183. data,
  184. header = {},
  185. needToken = true
  186. } = options;
  187. const headers = {
  188. "Content-Type": "application/json;charset=utf-8",
  189. "clientid": CLIENT_ID,
  190. "X-Platform-Code": PLATFORM_CODE,
  191. ...header
  192. };
  193. if (needToken) {
  194. const token = getToken();
  195. if (token) {
  196. headers["Authorization"] = "Bearer " + token;
  197. }
  198. }
  199. return new Promise((resolve, reject) => {
  200. uni.request({
  201. url: BASE_URL + url,
  202. method: method.toUpperCase(),
  203. data,
  204. header: headers,
  205. timeout: 6e5,
  206. success: (res) => {
  207. formatAppLog("log", "at utils/request.js:51", res);
  208. const statusCode = res.statusCode;
  209. const code = res.data.code;
  210. const msg = res.data.msg;
  211. res.data.data;
  212. if (statusCode !== 200) {
  213. const errorMsg = msg || `请求失败(${statusCode})`;
  214. uni.showToast({ title: errorMsg, icon: "none" });
  215. return reject(new Error(errorMsg));
  216. }
  217. if (code === 401) {
  218. clearAuth();
  219. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  220. setTimeout(() => {
  221. uni.reLaunch({ url: "/pages/login/login" });
  222. }, 1500);
  223. return reject(new Error("未授权"));
  224. }
  225. if (code !== void 0 && code !== 200) {
  226. const errorMsg = msg || "操作失败";
  227. uni.showToast({ title: errorMsg, icon: "none" });
  228. return reject(new Error(errorMsg));
  229. }
  230. resolve(res.data);
  231. },
  232. fail: (err) => {
  233. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  234. reject(err);
  235. }
  236. });
  237. });
  238. }
  239. function loginByPassword(username, password) {
  240. return request({
  241. url: "/auth/login",
  242. method: "POST",
  243. needToken: false,
  244. data: {
  245. userSource: 1,
  246. username,
  247. password,
  248. clientId: CLIENT_ID,
  249. grantType: "password",
  250. source: 1
  251. }
  252. });
  253. }
  254. function logout() {
  255. return request({
  256. url: "/auth/logout",
  257. method: "POST"
  258. });
  259. }
  260. function getAgreement(id) {
  261. return request({
  262. url: "/system/agreement/" + id,
  263. method: "get"
  264. });
  265. }
  266. const logic$9 = {
  267. data() {
  268. return {
  269. currentTab: 1,
  270. // 0: 免密, 1: 密码
  271. mobile: "",
  272. code: "",
  273. password: "",
  274. showPassword: false,
  275. isAgreed: false,
  276. countDown: 0,
  277. timer: null,
  278. showAgreementModal: false,
  279. agreementTitle: "",
  280. // 协议标题
  281. agreementContent: "",
  282. // 协议内容
  283. loginLoading: false
  284. };
  285. },
  286. methods: {
  287. /**
  288. * 显示协议弹窗
  289. * @param {Number} id 协议ID (1: 用户服务协议, 2: 隐私政策)
  290. */
  291. async showAgreement(id) {
  292. try {
  293. uni.showLoading({ title: "加载中..." });
  294. const res = await getAgreement(id);
  295. if (res.code === 200 && res.data) {
  296. this.agreementTitle = res.data.title;
  297. this.agreementContent = res.data.content;
  298. this.showAgreementModal = true;
  299. } else {
  300. uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
  301. }
  302. } catch (err) {
  303. formatAppLog("error", "at pages/login/logic.js:41", "获取协议详情失败:", err);
  304. } finally {
  305. uni.hideLoading();
  306. }
  307. },
  308. /* async getVerifyCode() {
  309. if (this.currentTab === 1) return;
  310. if (this.countDown > 0) return;
  311. if (!this.mobile || this.mobile.length !== 11) {
  312. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  313. return;
  314. }
  315. try {
  316. const res = await sendSmsCode(this.mobile);
  317. // 发送成功,启动倒计时
  318. this.countDown = 60;
  319. this.timer = setInterval(() => {
  320. this.countDown--;
  321. if (this.countDown <= 0) {
  322. clearInterval(this.timer);
  323. }
  324. }, 1000);
  325. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  326. const devCode = res.data;
  327. if (devCode) {
  328. this.code = devCode;
  329. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  330. } else {
  331. uni.showToast({ title: '验证码已发送', icon: 'none' });
  332. }
  333. } catch (err) {
  334. __f__('error','at pages/login/logic.js:73','发送验证码失败:', err);
  335. }
  336. }, */
  337. async handleLogin() {
  338. var _a;
  339. if (!this.isAgreed) {
  340. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  341. return;
  342. }
  343. if (!this.mobile) {
  344. uni.showToast({ title: "请输入手机号", icon: "none" });
  345. return;
  346. }
  347. if (!this.password) {
  348. uni.showToast({ title: "请输入密码", icon: "none" });
  349. return;
  350. }
  351. if (this.loginLoading)
  352. return;
  353. this.loginLoading = true;
  354. uni.showLoading({
  355. title: "登录中...",
  356. mask: true
  357. });
  358. try {
  359. let res;
  360. res = await loginByPassword(this.mobile, this.password);
  361. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  362. if (token) {
  363. setToken(token);
  364. }
  365. startGpsTimer();
  366. uni.showToast({ title: "登录成功", icon: "success" });
  367. setTimeout(() => {
  368. uni.switchTab({
  369. url: "/pages/home/index"
  370. });
  371. }, 1e3);
  372. } catch (err) {
  373. formatAppLog("error", "at pages/login/logic.js:138", "登录失败:", err);
  374. } finally {
  375. this.loginLoading = false;
  376. uni.hideLoading();
  377. }
  378. },
  379. goToRecruit() {
  380. uni.navigateTo({
  381. url: "/pages/recruit/landing"
  382. });
  383. },
  384. goToForgotPwd() {
  385. uni.navigateTo({
  386. url: "/pages/login/reset-pwd-verify"
  387. });
  388. }
  389. }
  390. };
  391. const _export_sfc = (sfc, props) => {
  392. const target = sfc.__vccOpts || sfc;
  393. for (const [key, val] of props) {
  394. target[key] = val;
  395. }
  396. return target;
  397. };
  398. const _sfc_main$E = {
  399. name: "Agreement",
  400. props: {
  401. visible: {
  402. type: Boolean,
  403. default: false
  404. },
  405. title: {
  406. type: String,
  407. default: ""
  408. },
  409. content: {
  410. type: String,
  411. default: ""
  412. }
  413. },
  414. methods: {
  415. /**
  416. * 关闭弹窗
  417. */
  418. handleClose() {
  419. this.$emit("close");
  420. }
  421. }
  422. };
  423. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  424. return $props.visible ? (vue.openBlock(), vue.createElementBlock(
  425. "view",
  426. {
  427. key: 0,
  428. class: "agreement-mask",
  429. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  430. }, ["stop", "prevent"]))
  431. },
  432. [
  433. vue.createElementVNode("view", { class: "agreement-container" }, [
  434. vue.createElementVNode("view", { class: "agreement-header" }, [
  435. vue.createElementVNode(
  436. "text",
  437. { class: "agreement-title" },
  438. vue.toDisplayString($props.title || "协议详情"),
  439. 1
  440. /* TEXT */
  441. )
  442. ]),
  443. vue.createElementVNode("scroll-view", {
  444. "scroll-y": "",
  445. class: "agreement-body"
  446. }, [
  447. vue.createElementVNode("rich-text", { nodes: $props.content }, null, 8, ["nodes"])
  448. ]),
  449. vue.createElementVNode("view", { class: "agreement-footer" }, [
  450. vue.createElementVNode("button", {
  451. class: "confirm-btn",
  452. onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args))
  453. }, "确 定")
  454. ])
  455. ])
  456. ],
  457. 32
  458. /* NEED_HYDRATION */
  459. )) : vue.createCommentVNode("v-if", true);
  460. }
  461. 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"]]);
  462. const _imports_0$3 = "/static/header.png";
  463. const _imports_1$8 = "/static/logo.png";
  464. const _sfc_main$D = {
  465. ...logic$9,
  466. components: {
  467. Agreement
  468. }
  469. };
  470. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  471. const _component_agreement = vue.resolveComponent("agreement");
  472. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  473. vue.createElementVNode("view", { class: "banner-area" }, [
  474. vue.createElementVNode("image", {
  475. class: "banner-img",
  476. src: _imports_0$3,
  477. mode: "widthFix"
  478. })
  479. ]),
  480. vue.createElementVNode("view", { class: "content-card" }, [
  481. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  482. vue.createElementVNode("image", {
  483. class: "logo-img",
  484. src: _imports_1$8,
  485. mode: "widthFix"
  486. })
  487. ]),
  488. vue.createElementVNode("view", { class: "tabs" }, [
  489. vue.createElementVNode("view", { class: "tab-item active" }, [
  490. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  491. vue.createElementVNode("view", { class: "tab-indicator" })
  492. ])
  493. ]),
  494. vue.createElementVNode("view", { class: "form-area" }, [
  495. vue.createElementVNode("view", { class: "input-group" }, [
  496. vue.createElementVNode("view", { class: "area-code" }, [
  497. vue.createElementVNode("text", null, "+86"),
  498. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  499. ]),
  500. vue.withDirectives(vue.createElementVNode(
  501. "input",
  502. {
  503. class: "input",
  504. type: "number",
  505. placeholder: "手机号",
  506. "placeholder-style": "color: #ccc",
  507. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  508. maxlength: "11"
  509. },
  510. null,
  511. 512
  512. /* NEED_PATCH */
  513. ), [
  514. [vue.vModelText, _ctx.mobile]
  515. ])
  516. ]),
  517. vue.createElementVNode("view", { class: "input-group" }, [
  518. vue.withDirectives(vue.createElementVNode("input", {
  519. class: "input",
  520. password: !_ctx.showPassword,
  521. type: "text",
  522. placeholder: "请输入密码",
  523. "placeholder-style": "color: #ccc",
  524. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  525. }, null, 8, ["password"]), [
  526. [vue.vModelText, _ctx.password]
  527. ]),
  528. vue.createElementVNode("view", {
  529. class: "eye-icon",
  530. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  531. }, [
  532. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  533. key: 0,
  534. class: "svg-icon",
  535. viewBox: "0 0 24 24",
  536. fill: "none",
  537. xmlns: "http://www.w3.org/2000/svg"
  538. }, [
  539. vue.createElementVNode("path", {
  540. 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",
  541. fill: "#CCCCCC"
  542. })
  543. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  544. key: 1,
  545. class: "svg-icon",
  546. viewBox: "0 0 24 24",
  547. fill: "none",
  548. xmlns: "http://www.w3.org/2000/svg"
  549. }, [
  550. vue.createElementVNode("path", {
  551. d: "M12 7C7 7 2.73 10.11 1 14.5",
  552. stroke: "#CCCCCC",
  553. "stroke-width": "2",
  554. "stroke-linecap": "round"
  555. }),
  556. vue.createElementVNode("path", {
  557. d: "M23 14.5C21.27 10.11 17 7 12 7",
  558. stroke: "#CCCCCC",
  559. "stroke-width": "2",
  560. "stroke-linecap": "round"
  561. }),
  562. vue.createElementVNode("path", {
  563. d: "M12 7V4",
  564. stroke: "#CCCCCC",
  565. "stroke-width": "2",
  566. "stroke-linecap": "round"
  567. }),
  568. vue.createElementVNode("path", {
  569. d: "M16 8L18 5",
  570. stroke: "#CCCCCC",
  571. "stroke-width": "2",
  572. "stroke-linecap": "round"
  573. }),
  574. vue.createElementVNode("path", {
  575. d: "M8 8L6 5",
  576. stroke: "#CCCCCC",
  577. "stroke-width": "2",
  578. "stroke-linecap": "round"
  579. }),
  580. vue.createElementVNode("path", {
  581. d: "M20 10L22 8",
  582. stroke: "#CCCCCC",
  583. "stroke-width": "2",
  584. "stroke-linecap": "round"
  585. }),
  586. vue.createElementVNode("path", {
  587. d: "M4 10L2 8",
  588. stroke: "#CCCCCC",
  589. "stroke-width": "2",
  590. "stroke-linecap": "round"
  591. })
  592. ]))
  593. ])
  594. ]),
  595. vue.createElementVNode("button", {
  596. class: "login-btn",
  597. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  598. }, "登 录"),
  599. vue.createElementVNode("view", { class: "agreement" }, [
  600. vue.createElementVNode(
  601. "view",
  602. {
  603. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  604. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  605. },
  606. [
  607. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  608. key: 0,
  609. class: "check-mark"
  610. }, "✓")) : vue.createCommentVNode("v-if", true)
  611. ],
  612. 2
  613. /* CLASS */
  614. ),
  615. vue.createElementVNode("text", { class: "agree-text" }, [
  616. vue.createTextVNode(" 我已经阅读并同意 "),
  617. vue.createElementVNode("text", {
  618. class: "link",
  619. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  620. }, "《用户服务协议》"),
  621. vue.createTextVNode(" 和 "),
  622. vue.createElementVNode("text", {
  623. class: "link",
  624. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  625. }, "《隐私政策》")
  626. ])
  627. ])
  628. ]),
  629. vue.createElementVNode("view", {
  630. class: "footer-recruit",
  631. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  632. }, [
  633. vue.createElementVNode("view", { class: "recruit-badge" }, [
  634. (vue.openBlock(), vue.createElementBlock("svg", {
  635. class: "svg-icon flag-icon",
  636. viewBox: "0 0 24 24",
  637. fill: "none",
  638. xmlns: "http://www.w3.org/2000/svg",
  639. style: { "width": "30rpx", "height": "30rpx" }
  640. }, [
  641. vue.createElementVNode("path", {
  642. d: "M4 14V4H18L17 9L18 14H4Z",
  643. stroke: "#FF5722",
  644. "stroke-width": "2",
  645. "stroke-linejoin": "round"
  646. }),
  647. vue.createElementVNode("path", {
  648. d: "M4 22V14",
  649. stroke: "#FF5722",
  650. "stroke-width": "2",
  651. "stroke-linecap": "round"
  652. })
  653. ])),
  654. vue.createElementVNode("text", null, " 宠宝履约者招募")
  655. ])
  656. ]),
  657. vue.createVNode(_component_agreement, {
  658. visible: _ctx.showAgreementModal,
  659. title: _ctx.agreementTitle,
  660. content: _ctx.agreementContent,
  661. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  662. }, null, 8, ["visible", "title", "content"])
  663. ])
  664. ]);
  665. }
  666. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  667. const logic$8 = {
  668. data() {
  669. return {
  670. statusBarHeight: 20
  671. // 默认状态栏高度
  672. };
  673. },
  674. onLoad() {
  675. const sysInfo = uni.getSystemInfoSync();
  676. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  677. },
  678. methods: {
  679. goBack() {
  680. const pages = getCurrentPages();
  681. if (pages.length > 1) {
  682. uni.navigateBack();
  683. } else {
  684. uni.reLaunch({
  685. url: "/pages/login/login"
  686. });
  687. }
  688. },
  689. goToForm() {
  690. uni.navigateTo({
  691. url: "/pages/recruit/form"
  692. });
  693. }
  694. }
  695. };
  696. const _sfc_main$C = logic$8;
  697. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  698. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  699. vue.createElementVNode(
  700. "view",
  701. {
  702. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  703. },
  704. null,
  705. 4
  706. /* STYLE */
  707. ),
  708. vue.createElementVNode("view", { class: "nav-bar" }, [
  709. vue.createElementVNode("view", {
  710. class: "back-icon",
  711. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  712. }, "‹")
  713. ]),
  714. vue.createElementVNode("view", { class: "header-area" }, [
  715. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  716. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  717. ]),
  718. vue.createElementVNode("view", { class: "content-card" }, [
  719. vue.createElementVNode("view", { class: "benefit-item" }, [
  720. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  721. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  722. ]),
  723. vue.createElementVNode("view", { class: "info" }, [
  724. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  725. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  726. ])
  727. ]),
  728. vue.createElementVNode("view", { class: "benefit-item" }, [
  729. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  730. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  731. ]),
  732. vue.createElementVNode("view", { class: "info" }, [
  733. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  734. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  735. ])
  736. ]),
  737. vue.createElementVNode("view", { class: "benefit-item" }, [
  738. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  739. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  740. ]),
  741. vue.createElementVNode("view", { class: "info" }, [
  742. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  743. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  744. ])
  745. ])
  746. ]),
  747. vue.createElementVNode("view", { class: "footer-area" }, [
  748. vue.createElementVNode("button", {
  749. class: "join-btn",
  750. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  751. }, "我要加入"),
  752. vue.createElementVNode("view", { class: "faq" }, [
  753. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  754. vue.createTextVNode(" 常见问题 ")
  755. ])
  756. ])
  757. ]);
  758. }
  759. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  760. function submitAudit(data) {
  761. return request({
  762. url: "/fulfiller/app/audit/submit",
  763. method: "POST",
  764. needToken: false,
  765. data
  766. });
  767. }
  768. function getServiceTypes() {
  769. return request({
  770. url: "/fulfiller/app/service/list",
  771. method: "GET",
  772. needToken: false
  773. });
  774. }
  775. function getAreaChildren(parentId = 0) {
  776. return request({
  777. url: "/fulfiller/app/area/children",
  778. method: "GET",
  779. needToken: false,
  780. data: { parentId }
  781. });
  782. }
  783. function uploadFile(filePath) {
  784. return new Promise((resolve, reject) => {
  785. const token = uni.getStorageSync("fulfiller_token");
  786. uni.uploadFile({
  787. url: BASE_URL + "/fulfiller/app/upload",
  788. filePath,
  789. name: "file",
  790. timeout: 6e5,
  791. header: {
  792. "clientid": CLIENT_ID,
  793. "X-Platform-Code": PLATFORM_CODE,
  794. "Authorization": token ? `Bearer ${token}` : ""
  795. },
  796. success: (res) => {
  797. try {
  798. const data = JSON.parse(res.data);
  799. if (data.code === 200) {
  800. resolve(data);
  801. } else {
  802. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  803. reject(data);
  804. }
  805. } catch (e) {
  806. reject(e);
  807. }
  808. },
  809. fail: (err) => {
  810. uni.showToast({ title: "上传失败", icon: "none" });
  811. reject(err);
  812. }
  813. });
  814. });
  815. }
  816. function listAllService() {
  817. return request({
  818. url: "/service/list/listAll",
  819. method: "GET"
  820. });
  821. }
  822. const logic$7 = {
  823. data() {
  824. return {
  825. formData: {
  826. mobile: "",
  827. code: "",
  828. name: "",
  829. gender: 1,
  830. // 1男 2女
  831. birthday: "",
  832. password: "",
  833. serviceType: [],
  834. city: "",
  835. station: "",
  836. stationId: null
  837. },
  838. showPwd: false,
  839. isAgreed: false,
  840. serviceTypes: [],
  841. // 验证码倒计时
  842. countDown: 0,
  843. timer: null,
  844. // 日期选择器相关
  845. showPicker: false,
  846. years: [],
  847. months: [],
  848. days: [],
  849. pickerValue: [0, 0, 0],
  850. tempYear: 0,
  851. tempMonth: 0,
  852. tempDay: 0,
  853. // 城市选择器相关(从后端加载)
  854. showCityPicker: false,
  855. selectStep: 0,
  856. selectedPathway: [],
  857. currentList: [],
  858. selectedCityId: null,
  859. // 站点选择器相关(从后端加载)
  860. showStationPicker: false,
  861. stationList: [],
  862. // 协议弹窗
  863. showPrivacy: false,
  864. agreementTitle: "",
  865. // 协议标题
  866. agreementContent: "",
  867. // 协议内容
  868. currentAgreementId: ""
  869. // 当前协议ID
  870. };
  871. },
  872. created() {
  873. this.initDateData();
  874. this.loadServiceTypes();
  875. },
  876. beforeDestroy() {
  877. if (this.timer)
  878. clearInterval(this.timer);
  879. },
  880. methods: {
  881. initDateData() {
  882. const now = /* @__PURE__ */ new Date();
  883. const currentYear = now.getFullYear();
  884. for (let i = 1980; i <= currentYear + 5; i++) {
  885. this.years.push(i);
  886. }
  887. for (let i = 1; i <= 12; i++) {
  888. this.months.push(i);
  889. }
  890. for (let i = 1; i <= 31; i++) {
  891. this.days.push(i);
  892. }
  893. },
  894. // 打开选择器
  895. openPicker() {
  896. const dateStr = this.formData.birthday || "2000-01-01";
  897. const [y, m, d] = dateStr.split("-").map(Number);
  898. const yIndex = this.years.indexOf(y);
  899. const mIndex = this.months.indexOf(m);
  900. const dIndex = this.days.indexOf(d);
  901. this.pickerValue = [
  902. yIndex > -1 ? yIndex : 0,
  903. mIndex > -1 ? mIndex : 0,
  904. dIndex > -1 ? dIndex : 0
  905. ];
  906. this.tempYear = this.years[this.pickerValue[0]];
  907. this.tempMonth = this.months[this.pickerValue[1]];
  908. this.tempDay = this.days[this.pickerValue[2]];
  909. this.showPicker = true;
  910. },
  911. closePicker() {
  912. this.showPicker = false;
  913. },
  914. onPickerChange(e) {
  915. const val = e.detail.value;
  916. this.tempYear = this.years[val[0]];
  917. this.tempMonth = this.months[val[1]];
  918. this.tempDay = this.days[val[2]];
  919. },
  920. confirmPicker() {
  921. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  922. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  923. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  924. this.closePicker();
  925. },
  926. async loadServiceTypes() {
  927. try {
  928. const res = await listAllService();
  929. this.serviceTypes = (res.data || []).map((item) => ({
  930. id: item.id,
  931. name: item.name
  932. }));
  933. } catch (err) {
  934. formatAppLog("error", "at pages/recruit/logic.js:136", "加载服务类型失败:", err);
  935. this.serviceTypes = [];
  936. }
  937. },
  938. toggleService(item) {
  939. const idx = this.formData.serviceType.indexOf(item.id);
  940. if (idx > -1) {
  941. this.formData.serviceType.splice(idx, 1);
  942. } else {
  943. this.formData.serviceType.push(item.id);
  944. }
  945. },
  946. // 验证码
  947. /* async getVerifyCode() {
  948. if (this.countDown > 0) return;
  949. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  950. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  951. return;
  952. }
  953. try {
  954. const res = await sendSmsCode(this.formData.mobile);
  955. this.countDown = 60;
  956. this.timer = setInterval(() => {
  957. this.countDown--;
  958. if (this.countDown <= 0) clearInterval(this.timer);
  959. }, 1000);
  960. // TODO 【生产环境必须删除】开发模式自动填入验证码
  961. const devCode = res.data;
  962. if (devCode) {
  963. this.formData.code = devCode;
  964. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  965. } else {
  966. uni.showToast({ title: '验证码已发送', icon: 'none' });
  967. }
  968. } catch (err) {
  969. __f__('error','at pages/recruit/logic.js:173','发送验证码失败:', err);
  970. }
  971. }, */
  972. // 城市选择器 logic(从后端加载)
  973. async openCityPicker() {
  974. this.showCityPicker = true;
  975. if (this.selectedPathway.length === 0) {
  976. await this.resetCityPicker();
  977. }
  978. },
  979. async resetCityPicker() {
  980. this.selectStep = 0;
  981. this.selectedPathway = [];
  982. await this.loadAreaChildren(0);
  983. },
  984. closeCityPicker() {
  985. this.showCityPicker = false;
  986. },
  987. async loadAreaChildren(parentId) {
  988. try {
  989. const res = await getAreaChildren(parentId);
  990. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  991. id: item.id,
  992. name: item.name,
  993. type: item.type,
  994. parentId: item.parentId
  995. }));
  996. } catch (err) {
  997. formatAppLog("error", "at pages/recruit/logic.js:205", "加载区域数据失败:", err);
  998. this.currentList = [];
  999. }
  1000. },
  1001. async selectCityItem(item) {
  1002. this.selectedPathway[this.selectStep] = item;
  1003. if (item.type === 0) {
  1004. this.selectStep++;
  1005. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1006. await this.loadAreaChildren(item.id);
  1007. if (this.currentList.length === 0) {
  1008. this.selectedCityId = item.id;
  1009. this.confirmCity();
  1010. }
  1011. } else {
  1012. this.selectedCityId = item.id;
  1013. this.confirmCity();
  1014. }
  1015. },
  1016. async jumpToStep(step) {
  1017. this.selectStep = step;
  1018. if (step === 0) {
  1019. await this.loadAreaChildren(0);
  1020. } else {
  1021. const parent = this.selectedPathway[step - 1];
  1022. if (parent) {
  1023. await this.loadAreaChildren(parent.id);
  1024. }
  1025. }
  1026. },
  1027. confirmCity() {
  1028. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1029. this.formData.city = fullPath;
  1030. this.formData.station = "";
  1031. this.formData.stationId = null;
  1032. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1033. if (lastSelected) {
  1034. this.loadStations(lastSelected.id);
  1035. }
  1036. this.closeCityPicker();
  1037. },
  1038. // 站点选择器(从后端加载,只取type=2的站点)
  1039. async loadStations(parentId) {
  1040. try {
  1041. const res = await getAreaChildren(parentId);
  1042. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1043. id: item.id,
  1044. name: item.name
  1045. }));
  1046. } catch (err) {
  1047. formatAppLog("error", "at pages/recruit/logic.js:264", "加载站点数据失败:", err);
  1048. this.stationList = [];
  1049. }
  1050. },
  1051. openStationPicker() {
  1052. if (this.stationList.length === 0) {
  1053. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1054. return;
  1055. }
  1056. this.showStationPicker = true;
  1057. },
  1058. closeStationPicker() {
  1059. this.showStationPicker = false;
  1060. },
  1061. selectStation(item) {
  1062. this.formData.station = item.name;
  1063. this.formData.stationId = item.id;
  1064. this.closeStationPicker();
  1065. },
  1066. async openPrivacy() {
  1067. try {
  1068. uni.showLoading({ title: "加载中..." });
  1069. const res = await getAgreement(3);
  1070. if (res.code === 200 && res.data) {
  1071. this.agreementTitle = res.data.title;
  1072. this.agreementContent = res.data.content;
  1073. this.showPrivacy = true;
  1074. } else {
  1075. uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
  1076. }
  1077. } catch (err) {
  1078. formatAppLog("error", "at pages/recruit/logic.js:296", "获取协议详情失败:", err);
  1079. } finally {
  1080. uni.hideLoading();
  1081. }
  1082. },
  1083. goToAuth() {
  1084. if (!this.isAgreed) {
  1085. uni.showToast({ title: "请勾选协议", icon: "none" });
  1086. return;
  1087. }
  1088. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1089. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1090. return;
  1091. }
  1092. if (!this.formData.name) {
  1093. uni.showToast({ title: "请输入姓名", icon: "none" });
  1094. return;
  1095. }
  1096. if (this.formData.serviceType.length === 0) {
  1097. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1098. return;
  1099. }
  1100. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1101. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1102. const services = JSON.stringify(selectedServices);
  1103. uni.navigateTo({
  1104. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1105. });
  1106. }
  1107. }
  1108. };
  1109. const _sfc_main$B = {
  1110. ...logic$7,
  1111. components: {
  1112. Agreement
  1113. }
  1114. };
  1115. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  1116. const _component_agreement = vue.resolveComponent("agreement");
  1117. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1118. vue.createElementVNode("view", { class: "card" }, [
  1119. vue.createElementVNode("view", { class: "form-item" }, [
  1120. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1121. vue.createElementVNode("view", { class: "input-box" }, [
  1122. vue.createElementVNode("view", { class: "prefix-area" }, [
  1123. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1124. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1125. ]),
  1126. vue.withDirectives(vue.createElementVNode(
  1127. "input",
  1128. {
  1129. class: "input",
  1130. type: "number",
  1131. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1132. },
  1133. null,
  1134. 512
  1135. /* NEED_PATCH */
  1136. ), [
  1137. [vue.vModelText, _ctx.formData.mobile]
  1138. ])
  1139. ])
  1140. ]),
  1141. vue.createElementVNode("view", { class: "form-item" }, [
  1142. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1143. vue.createElementVNode("view", { class: "input-box" }, [
  1144. vue.withDirectives(vue.createElementVNode(
  1145. "input",
  1146. {
  1147. class: "input",
  1148. type: "text",
  1149. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1150. },
  1151. null,
  1152. 512
  1153. /* NEED_PATCH */
  1154. ), [
  1155. [vue.vModelText, _ctx.formData.name]
  1156. ])
  1157. ])
  1158. ]),
  1159. vue.createElementVNode("view", { class: "form-item" }, [
  1160. vue.createElementVNode("text", { class: "label" }, "性别"),
  1161. vue.createElementVNode("view", { class: "gender-group" }, [
  1162. vue.createElementVNode("view", {
  1163. class: "radio-item",
  1164. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1165. }, [
  1166. vue.createElementVNode(
  1167. "text",
  1168. {
  1169. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1170. },
  1171. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1172. 3
  1173. /* TEXT, CLASS */
  1174. ),
  1175. vue.createElementVNode(
  1176. "text",
  1177. {
  1178. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1179. },
  1180. " 男",
  1181. 2
  1182. /* CLASS */
  1183. )
  1184. ]),
  1185. vue.createElementVNode("view", {
  1186. class: "radio-item",
  1187. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1188. }, [
  1189. vue.createElementVNode(
  1190. "text",
  1191. {
  1192. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1193. },
  1194. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1195. 3
  1196. /* TEXT, CLASS */
  1197. ),
  1198. vue.createElementVNode(
  1199. "text",
  1200. {
  1201. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1202. },
  1203. " 女",
  1204. 2
  1205. /* CLASS */
  1206. )
  1207. ])
  1208. ])
  1209. ]),
  1210. vue.createElementVNode("view", { class: "form-item" }, [
  1211. vue.createElementVNode("text", { class: "label" }, "生日"),
  1212. vue.createElementVNode("view", {
  1213. class: "input-box",
  1214. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1215. }, [
  1216. vue.createElementVNode(
  1217. "text",
  1218. null,
  1219. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1220. 1
  1221. /* TEXT */
  1222. ),
  1223. (vue.openBlock(), vue.createElementBlock("svg", {
  1224. class: "arrow-right",
  1225. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1226. viewBox: "0 0 1024 1024",
  1227. version: "1.1",
  1228. xmlns: "http://www.w3.org/2000/svg"
  1229. }, [
  1230. vue.createElementVNode("path", {
  1231. 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",
  1232. fill: "#CCCCCC"
  1233. })
  1234. ]))
  1235. ])
  1236. ]),
  1237. vue.createElementVNode("view", { class: "form-item" }, [
  1238. vue.createElementVNode("text", { class: "label" }, "密码"),
  1239. vue.createElementVNode("view", { class: "input-box" }, [
  1240. vue.withDirectives(vue.createElementVNode("input", {
  1241. class: "input",
  1242. password: !_ctx.showPwd,
  1243. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1244. placeholder: "设置登录密码"
  1245. }, null, 8, ["password"]), [
  1246. [vue.vModelText, _ctx.formData.password]
  1247. ]),
  1248. vue.createElementVNode("view", {
  1249. class: "monkey-icon",
  1250. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1251. }, [
  1252. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1253. key: 0,
  1254. class: "svg-icon",
  1255. viewBox: "0 0 24 24",
  1256. fill: "none",
  1257. xmlns: "http://www.w3.org/2000/svg"
  1258. }, [
  1259. vue.createElementVNode("path", {
  1260. 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",
  1261. fill: "#CCCCCC"
  1262. })
  1263. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1264. key: 1,
  1265. class: "svg-icon",
  1266. viewBox: "0 0 24 24",
  1267. fill: "none",
  1268. xmlns: "http://www.w3.org/2000/svg"
  1269. }, [
  1270. vue.createElementVNode("path", {
  1271. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1272. stroke: "#CCCCCC",
  1273. "stroke-width": "2",
  1274. "stroke-linecap": "round"
  1275. }),
  1276. vue.createElementVNode("path", {
  1277. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1278. stroke: "#CCCCCC",
  1279. "stroke-width": "2",
  1280. "stroke-linecap": "round"
  1281. }),
  1282. vue.createElementVNode("path", {
  1283. d: "M12 7V4",
  1284. stroke: "#CCCCCC",
  1285. "stroke-width": "2",
  1286. "stroke-linecap": "round"
  1287. }),
  1288. vue.createElementVNode("path", {
  1289. d: "M16 8L18 5",
  1290. stroke: "#CCCCCC",
  1291. "stroke-width": "2",
  1292. "stroke-linecap": "round"
  1293. }),
  1294. vue.createElementVNode("path", {
  1295. d: "M8 8L6 5",
  1296. stroke: "#CCCCCC",
  1297. "stroke-width": "2",
  1298. "stroke-linecap": "round"
  1299. }),
  1300. vue.createElementVNode("path", {
  1301. d: "M20 10L22 8",
  1302. stroke: "#CCCCCC",
  1303. "stroke-width": "2",
  1304. "stroke-linecap": "round"
  1305. }),
  1306. vue.createElementVNode("path", {
  1307. d: "M4 10L2 8",
  1308. stroke: "#CCCCCC",
  1309. "stroke-width": "2",
  1310. "stroke-linecap": "round"
  1311. })
  1312. ]))
  1313. ])
  1314. ])
  1315. ])
  1316. ]),
  1317. vue.createElementVNode("view", { class: "card" }, [
  1318. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1319. vue.createElementVNode("view", { class: "service-types" }, [
  1320. (vue.openBlock(true), vue.createElementBlock(
  1321. vue.Fragment,
  1322. null,
  1323. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1324. return vue.openBlock(), vue.createElementBlock("view", {
  1325. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1326. key: item.id,
  1327. onClick: ($event) => _ctx.toggleService(item)
  1328. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1329. }),
  1330. 128
  1331. /* KEYED_FRAGMENT */
  1332. ))
  1333. ]),
  1334. vue.createElementVNode("view", { class: "form-item" }, [
  1335. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1336. vue.createElementVNode("view", {
  1337. class: "input-box",
  1338. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1339. }, [
  1340. vue.createElementVNode(
  1341. "text",
  1342. {
  1343. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1344. },
  1345. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1346. 5
  1347. /* TEXT, STYLE */
  1348. ),
  1349. (vue.openBlock(), vue.createElementBlock("svg", {
  1350. class: "arrow-right",
  1351. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1352. viewBox: "0 0 1024 1024",
  1353. version: "1.1",
  1354. xmlns: "http://www.w3.org/2000/svg"
  1355. }, [
  1356. vue.createElementVNode("path", {
  1357. 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",
  1358. fill: "#CCCCCC"
  1359. })
  1360. ]))
  1361. ])
  1362. ]),
  1363. vue.createElementVNode("view", { class: "form-item" }, [
  1364. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1365. vue.createElementVNode("view", {
  1366. class: "input-box",
  1367. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1368. }, [
  1369. vue.createElementVNode(
  1370. "text",
  1371. {
  1372. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1373. },
  1374. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1375. 5
  1376. /* TEXT, STYLE */
  1377. ),
  1378. (vue.openBlock(), vue.createElementBlock("svg", {
  1379. class: "arrow-right",
  1380. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1381. viewBox: "0 0 1024 1024",
  1382. version: "1.1",
  1383. xmlns: "http://www.w3.org/2000/svg"
  1384. }, [
  1385. vue.createElementVNode("path", {
  1386. 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",
  1387. fill: "#CCCCCC"
  1388. })
  1389. ]))
  1390. ])
  1391. ])
  1392. ]),
  1393. vue.createElementVNode(
  1394. "view",
  1395. {
  1396. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1397. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1398. },
  1399. [
  1400. vue.createElementVNode("view", {
  1401. class: "picker-content",
  1402. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  1403. }, ["stop"]))
  1404. }, [
  1405. vue.createElementVNode("view", { class: "picker-header" }, [
  1406. vue.createElementVNode("text", {
  1407. class: "picker-btn-cancel",
  1408. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1409. }, "取消"),
  1410. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1411. vue.createElementVNode("text", {
  1412. class: "picker-btn-confirm",
  1413. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1414. }, "确定")
  1415. ]),
  1416. vue.createElementVNode("view", { class: "picker-body" }, [
  1417. vue.createElementVNode("view", { class: "timeline-area" }, [
  1418. (vue.openBlock(true), vue.createElementBlock(
  1419. vue.Fragment,
  1420. null,
  1421. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1422. return vue.openBlock(), vue.createElementBlock("view", {
  1423. class: "timeline-item",
  1424. key: index,
  1425. onClick: ($event) => _ctx.jumpToStep(index)
  1426. }, [
  1427. vue.createElementVNode("view", { class: "timeline-dot" }),
  1428. vue.createElementVNode(
  1429. "text",
  1430. null,
  1431. vue.toDisplayString(item.name),
  1432. 1
  1433. /* TEXT */
  1434. )
  1435. ], 8, ["onClick"]);
  1436. }),
  1437. 128
  1438. /* KEYED_FRAGMENT */
  1439. )),
  1440. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1441. key: 0,
  1442. class: "timeline-item active"
  1443. }, [
  1444. vue.createElementVNode("view", { class: "timeline-dot" }),
  1445. vue.createElementVNode("text", null, "请选择")
  1446. ])) : vue.createCommentVNode("v-if", true)
  1447. ]),
  1448. vue.createElementVNode("scroll-view", {
  1449. "scroll-y": "",
  1450. class: "list-area"
  1451. }, [
  1452. (vue.openBlock(true), vue.createElementBlock(
  1453. vue.Fragment,
  1454. null,
  1455. vue.renderList(_ctx.currentList, (item, index) => {
  1456. return vue.openBlock(), vue.createElementBlock("view", {
  1457. class: "list-item",
  1458. key: item.id,
  1459. onClick: ($event) => _ctx.selectCityItem(item)
  1460. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1461. }),
  1462. 128
  1463. /* KEYED_FRAGMENT */
  1464. )),
  1465. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1466. key: 0,
  1467. style: { "padding": "20rpx", "color": "#999" }
  1468. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1469. ])
  1470. ])
  1471. ])
  1472. ],
  1473. 2
  1474. /* CLASS */
  1475. ),
  1476. vue.createElementVNode(
  1477. "view",
  1478. {
  1479. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1480. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1481. },
  1482. [
  1483. vue.createElementVNode("view", {
  1484. class: "picker-content",
  1485. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  1486. }, ["stop"]))
  1487. }, [
  1488. vue.createElementVNode("view", {
  1489. class: "picker-header",
  1490. style: { "justify-content": "center", "position": "relative" }
  1491. }, [
  1492. vue.createElementVNode("text", {
  1493. class: "picker-btn-cancel",
  1494. style: { "position": "absolute", "left": "30rpx" },
  1495. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1496. }, "取消"),
  1497. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1498. ]),
  1499. vue.createElementVNode("scroll-view", {
  1500. "scroll-y": "",
  1501. class: "picker-list"
  1502. }, [
  1503. (vue.openBlock(true), vue.createElementBlock(
  1504. vue.Fragment,
  1505. null,
  1506. vue.renderList(_ctx.stationList, (item, index) => {
  1507. return vue.openBlock(), vue.createElementBlock("view", {
  1508. class: "station-item",
  1509. key: index,
  1510. onClick: ($event) => _ctx.selectStation(item)
  1511. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1512. }),
  1513. 128
  1514. /* KEYED_FRAGMENT */
  1515. ))
  1516. ])
  1517. ])
  1518. ],
  1519. 2
  1520. /* CLASS */
  1521. ),
  1522. vue.createElementVNode("view", { class: "footer-actions" }, [
  1523. vue.createElementVNode("view", { class: "agreement-row" }, [
  1524. vue.createElementVNode(
  1525. "view",
  1526. {
  1527. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1528. onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1529. },
  1530. [
  1531. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1532. key: 0,
  1533. class: "check-mark"
  1534. }, "✓")) : vue.createCommentVNode("v-if", true)
  1535. ],
  1536. 2
  1537. /* CLASS */
  1538. ),
  1539. vue.createElementVNode("text", { class: "agree-text" }, [
  1540. vue.createTextVNode("我已阅读并同意 "),
  1541. vue.createElementVNode("text", {
  1542. style: { "color": "#2979ff" },
  1543. onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1544. }, "《宠宝履约者说明》")
  1545. ])
  1546. ]),
  1547. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1548. vue.createElementVNode("button", {
  1549. class: "submit-btn",
  1550. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1551. }, "下一步,实名认证")
  1552. ])
  1553. ]),
  1554. vue.createElementVNode(
  1555. "view",
  1556. {
  1557. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1558. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1559. },
  1560. [
  1561. vue.createElementVNode("view", {
  1562. class: "picker-content",
  1563. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  1564. }, ["stop"]))
  1565. }, [
  1566. vue.createElementVNode("view", { class: "picker-header" }, [
  1567. vue.createElementVNode("text", {
  1568. class: "picker-btn-cancel",
  1569. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1570. }, "取消"),
  1571. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1572. vue.createElementVNode("text", {
  1573. class: "picker-btn-confirm",
  1574. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1575. }, "确定")
  1576. ]),
  1577. vue.createElementVNode("picker-view", {
  1578. class: "picker-view",
  1579. "indicator-style": "height: 50px;",
  1580. value: _ctx.pickerValue,
  1581. onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1582. }, [
  1583. vue.createElementVNode("picker-view-column", null, [
  1584. (vue.openBlock(true), vue.createElementBlock(
  1585. vue.Fragment,
  1586. null,
  1587. vue.renderList(_ctx.years, (item, index) => {
  1588. return vue.openBlock(), vue.createElementBlock(
  1589. "view",
  1590. {
  1591. class: "picker-item",
  1592. key: index
  1593. },
  1594. vue.toDisplayString(item) + "年",
  1595. 1
  1596. /* TEXT */
  1597. );
  1598. }),
  1599. 128
  1600. /* KEYED_FRAGMENT */
  1601. ))
  1602. ]),
  1603. vue.createElementVNode("picker-view-column", null, [
  1604. (vue.openBlock(true), vue.createElementBlock(
  1605. vue.Fragment,
  1606. null,
  1607. vue.renderList(_ctx.months, (item, index) => {
  1608. return vue.openBlock(), vue.createElementBlock(
  1609. "view",
  1610. {
  1611. class: "picker-item",
  1612. key: index
  1613. },
  1614. vue.toDisplayString(item) + "月",
  1615. 1
  1616. /* TEXT */
  1617. );
  1618. }),
  1619. 128
  1620. /* KEYED_FRAGMENT */
  1621. ))
  1622. ]),
  1623. vue.createElementVNode("picker-view-column", null, [
  1624. (vue.openBlock(true), vue.createElementBlock(
  1625. vue.Fragment,
  1626. null,
  1627. vue.renderList(_ctx.days, (item, index) => {
  1628. return vue.openBlock(), vue.createElementBlock(
  1629. "view",
  1630. {
  1631. class: "picker-item",
  1632. key: index
  1633. },
  1634. vue.toDisplayString(item) + "日",
  1635. 1
  1636. /* TEXT */
  1637. );
  1638. }),
  1639. 128
  1640. /* KEYED_FRAGMENT */
  1641. ))
  1642. ])
  1643. ], 40, ["value"])
  1644. ])
  1645. ],
  1646. 2
  1647. /* CLASS */
  1648. ),
  1649. vue.createVNode(_component_agreement, {
  1650. visible: _ctx.showPrivacy,
  1651. title: _ctx.agreementTitle,
  1652. content: _ctx.agreementContent,
  1653. onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
  1654. }, null, 8, ["visible", "title", "content"])
  1655. ]);
  1656. }
  1657. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1658. const logic$6 = {
  1659. data() {
  1660. return {
  1661. formData: {
  1662. idType: "居民身份证",
  1663. name: "",
  1664. idNumber: "",
  1665. expiryDate: ""
  1666. },
  1667. idCardFront: "",
  1668. // 身份证正面本地预览路径
  1669. idCardBack: "",
  1670. // 身份证反面本地预览路径
  1671. idCardFrontOssId: "",
  1672. // 身份证正面 OSS ID
  1673. idCardBackOssId: "",
  1674. // 身份证反面 OSS ID
  1675. showPicker: false,
  1676. pickerValue: [0, 0, 0],
  1677. // YYYY-MM-DD
  1678. years: [],
  1679. months: [],
  1680. days: [],
  1681. tempYear: 0,
  1682. tempMonth: 0,
  1683. tempDay: 0,
  1684. serviceType: [],
  1685. // 接收上一页的服务类型
  1686. isChoosingImage: false
  1687. // 标志位:是否正在选择图片中,防止 onShow 重置数据
  1688. };
  1689. },
  1690. onLoad(options) {
  1691. if (options.services) {
  1692. try {
  1693. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1694. } catch (e) {
  1695. formatAppLog("error", "at pages/recruit/auth_logic.js:33", "Parse services failed", e);
  1696. }
  1697. }
  1698. this.initDateData();
  1699. },
  1700. onShow() {
  1701. if (this.isChoosingImage) {
  1702. this.isChoosingImage = false;
  1703. return;
  1704. }
  1705. this.resetFormData();
  1706. },
  1707. methods: {
  1708. // --- 日期选择器逻辑 ---
  1709. initDateData() {
  1710. const date = /* @__PURE__ */ new Date();
  1711. const year = date.getFullYear();
  1712. for (let i = year; i <= year + 50; i++) {
  1713. this.years.push(i);
  1714. }
  1715. for (let i = 1; i <= 12; i++) {
  1716. this.months.push(i);
  1717. }
  1718. for (let i = 1; i <= 31; i++) {
  1719. this.days.push(i);
  1720. }
  1721. },
  1722. openPicker() {
  1723. const date = /* @__PURE__ */ new Date();
  1724. const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
  1725. const [y, m, d] = dateStr.split("-").map(Number);
  1726. let yIndex = this.years.indexOf(y);
  1727. let mIndex = this.months.indexOf(m);
  1728. let dIndex = this.days.indexOf(d);
  1729. this.pickerValue = [
  1730. yIndex > -1 ? yIndex : 0,
  1731. mIndex > -1 ? mIndex : 0,
  1732. dIndex > -1 ? dIndex : 0
  1733. ];
  1734. this.tempYear = this.years[this.pickerValue[0]];
  1735. this.tempMonth = this.months[this.pickerValue[1]];
  1736. this.tempDay = this.days[this.pickerValue[2]];
  1737. this.showPicker = true;
  1738. },
  1739. closePicker() {
  1740. this.showPicker = false;
  1741. },
  1742. onPickerChange(e) {
  1743. const val = e.detail.value;
  1744. this.tempYear = this.years[val[0]];
  1745. this.tempMonth = this.months[val[1]];
  1746. this.tempDay = this.days[val[2]];
  1747. },
  1748. confirmPicker() {
  1749. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1750. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1751. this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
  1752. this.closePicker();
  1753. },
  1754. // --- 数据持久化(防止返回上一级丢失) ---
  1755. restoreAuthData() {
  1756. try {
  1757. const saved = uni.getStorageSync("recruit_auth_data");
  1758. if (saved) {
  1759. const d = JSON.parse(saved);
  1760. this.formData.name = d.name || "";
  1761. this.formData.idNumber = d.idNumber || "";
  1762. this.formData.expiryDate = d.expiryDate || "";
  1763. this.idCardFront = d.idCardFront || "";
  1764. this.idCardBack = d.idCardBack || "";
  1765. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1766. this.idCardBackOssId = d.idCardBackOssId || "";
  1767. }
  1768. } catch (e) {
  1769. formatAppLog("error", "at pages/recruit/auth_logic.js:115", "恢复认证数据失败", e);
  1770. }
  1771. },
  1772. saveAuthData() {
  1773. try {
  1774. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1775. name: this.formData.name,
  1776. idNumber: this.formData.idNumber,
  1777. expiryDate: this.formData.expiryDate,
  1778. idCardFront: this.idCardFront,
  1779. idCardBack: this.idCardBack,
  1780. idCardFrontOssId: this.idCardFrontOssId,
  1781. idCardBackOssId: this.idCardBackOssId
  1782. }));
  1783. } catch (e) {
  1784. formatAppLog("error", "at pages/recruit/auth_logic.js:130", "保存认证数据失败", e);
  1785. }
  1786. },
  1787. // --- 重置表单数据 ---
  1788. resetFormData() {
  1789. this.formData.name = "";
  1790. this.formData.idNumber = "";
  1791. this.formData.expiryDate = "";
  1792. this.idCardFront = "";
  1793. this.idCardBack = "";
  1794. this.idCardFrontOssId = "";
  1795. this.idCardBackOssId = "";
  1796. try {
  1797. uni.removeStorageSync("recruit_auth_data");
  1798. } catch (e) {
  1799. formatAppLog("error", "at pages/recruit/auth_logic.js:147", "清除缓存失败", e);
  1800. }
  1801. },
  1802. // --- 图片上传(选择后自动上传到OSS) ---
  1803. chooseImage(side) {
  1804. this.isChoosingImage = true;
  1805. uni.chooseImage({
  1806. count: 1,
  1807. sizeType: ["compressed"],
  1808. sourceType: ["album", "camera"],
  1809. success: async (res) => {
  1810. const tempPath = res.tempFilePaths[0];
  1811. if (side === "front") {
  1812. this.idCardFront = tempPath;
  1813. } else {
  1814. this.idCardBack = tempPath;
  1815. }
  1816. try {
  1817. uni.showLoading({ title: "上传中..." });
  1818. const uploadRes = await uploadFile(tempPath);
  1819. if (side === "front") {
  1820. this.idCardFrontOssId = uploadRes.data.ossId;
  1821. } else {
  1822. this.idCardBackOssId = uploadRes.data.ossId;
  1823. }
  1824. uni.hideLoading();
  1825. this.saveAuthData();
  1826. } catch (err) {
  1827. uni.hideLoading();
  1828. formatAppLog("error", "at pages/recruit/auth_logic.js:178", "上传身份证图片失败:", err);
  1829. }
  1830. }
  1831. });
  1832. },
  1833. // --- 提交 ---
  1834. goToQualifications() {
  1835. this.saveAuthData();
  1836. try {
  1837. const stored = uni.getStorageSync("recruit_form_data");
  1838. if (stored) {
  1839. const data = JSON.parse(stored);
  1840. data.realName = this.formData.name;
  1841. data.idNumber = this.formData.idNumber;
  1842. data.expiryDate = this.formData.expiryDate;
  1843. data.idCardFrontOssId = this.idCardFrontOssId;
  1844. data.idCardBackOssId = this.idCardBackOssId;
  1845. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1846. }
  1847. } catch (e) {
  1848. formatAppLog("error", "at pages/recruit/auth_logic.js:215", "保存认证数据失败", e);
  1849. }
  1850. const services = JSON.stringify(this.serviceType);
  1851. uni.navigateTo({
  1852. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1853. });
  1854. }
  1855. }
  1856. };
  1857. const _sfc_main$A = logic$6;
  1858. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1859. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1860. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1861. vue.createElementVNode("view", { class: "form-card" }, [
  1862. vue.createElementVNode("view", { class: "form-item" }, [
  1863. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1864. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1865. ]),
  1866. vue.createElementVNode("view", { class: "form-item" }, [
  1867. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1868. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1869. vue.withDirectives(vue.createElementVNode(
  1870. "input",
  1871. {
  1872. class: "input-area",
  1873. type: "text",
  1874. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1875. placeholder: "证件姓名",
  1876. "placeholder-class": "input-placeholder"
  1877. },
  1878. null,
  1879. 512
  1880. /* NEED_PATCH */
  1881. ), [
  1882. [vue.vModelText, _ctx.formData.name]
  1883. ])
  1884. ])
  1885. ]),
  1886. vue.createElementVNode("view", { class: "form-item" }, [
  1887. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1888. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1889. vue.withDirectives(vue.createElementVNode(
  1890. "input",
  1891. {
  1892. class: "input-area",
  1893. type: "idcard",
  1894. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1895. placeholder: "身份证号",
  1896. "placeholder-class": "input-placeholder"
  1897. },
  1898. null,
  1899. 512
  1900. /* NEED_PATCH */
  1901. ), [
  1902. [vue.vModelText, _ctx.formData.idNumber]
  1903. ])
  1904. ])
  1905. ]),
  1906. vue.createElementVNode("view", { class: "form-item" }, [
  1907. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1908. vue.createElementVNode("view", {
  1909. class: "gray-input-box",
  1910. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1911. }, [
  1912. vue.createElementVNode(
  1913. "text",
  1914. {
  1915. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1916. },
  1917. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1918. 3
  1919. /* TEXT, CLASS */
  1920. ),
  1921. (vue.openBlock(), vue.createElementBlock("svg", {
  1922. class: "arrow-right",
  1923. viewBox: "0 0 1024 1024",
  1924. version: "1.1",
  1925. xmlns: "http://www.w3.org/2000/svg"
  1926. }, [
  1927. vue.createElementVNode("path", {
  1928. 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",
  1929. fill: "#CCCCCC"
  1930. })
  1931. ]))
  1932. ])
  1933. ])
  1934. ]),
  1935. vue.createElementVNode("view", { class: "upload-card" }, [
  1936. vue.createElementVNode("view", {
  1937. class: "upload-box",
  1938. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  1939. }, [
  1940. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  1941. key: 0,
  1942. src: _ctx.idCardFront,
  1943. class: "preview-img",
  1944. mode: "aspectFill"
  1945. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1946. vue.Fragment,
  1947. { key: 1 },
  1948. [
  1949. (vue.openBlock(), vue.createElementBlock("svg", {
  1950. class: "camera-icon",
  1951. viewBox: "0 0 24 24",
  1952. fill: "none",
  1953. xmlns: "http://www.w3.org/2000/svg"
  1954. }, [
  1955. vue.createElementVNode("path", {
  1956. 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",
  1957. fill: "#E0E0E0"
  1958. }),
  1959. vue.createElementVNode("circle", {
  1960. cx: "12",
  1961. cy: "12",
  1962. r: "3",
  1963. stroke: "#CCCCCC",
  1964. "stroke-width": "2"
  1965. }),
  1966. vue.createElementVNode("path", {
  1967. 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",
  1968. fill: "#CCCCCC"
  1969. })
  1970. ])),
  1971. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1972. ],
  1973. 64
  1974. /* STABLE_FRAGMENT */
  1975. ))
  1976. ]),
  1977. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  1978. ]),
  1979. vue.createElementVNode("view", { class: "upload-card" }, [
  1980. vue.createElementVNode("view", {
  1981. class: "upload-box",
  1982. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  1983. }, [
  1984. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  1985. key: 0,
  1986. src: _ctx.idCardBack,
  1987. class: "preview-img",
  1988. mode: "aspectFill"
  1989. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1990. vue.Fragment,
  1991. { key: 1 },
  1992. [
  1993. (vue.openBlock(), vue.createElementBlock("svg", {
  1994. class: "camera-icon",
  1995. viewBox: "0 0 24 24",
  1996. fill: "none",
  1997. xmlns: "http://www.w3.org/2000/svg"
  1998. }, [
  1999. vue.createElementVNode("path", {
  2000. 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",
  2001. fill: "#CCCCCC"
  2002. })
  2003. ])),
  2004. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2005. ],
  2006. 64
  2007. /* STABLE_FRAGMENT */
  2008. ))
  2009. ]),
  2010. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  2011. ]),
  2012. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  2013. vue.createElementVNode("button", {
  2014. class: "next-btn",
  2015. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  2016. }, "下一步,完善资质")
  2017. ]),
  2018. vue.createElementVNode(
  2019. "view",
  2020. {
  2021. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  2022. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2023. },
  2024. [
  2025. vue.createElementVNode("view", {
  2026. class: "picker-content",
  2027. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  2028. }, ["stop"]))
  2029. }, [
  2030. vue.createElementVNode("view", { class: "picker-header" }, [
  2031. vue.createElementVNode("text", {
  2032. class: "picker-btn-cancel",
  2033. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2034. }, "取消"),
  2035. vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
  2036. vue.createElementVNode("text", {
  2037. class: "picker-btn-confirm",
  2038. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  2039. }, "确定")
  2040. ]),
  2041. vue.createElementVNode("picker-view", {
  2042. class: "picker-view",
  2043. "indicator-style": "height: 50px;",
  2044. value: _ctx.pickerValue,
  2045. onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  2046. }, [
  2047. vue.createElementVNode("picker-view-column", null, [
  2048. (vue.openBlock(true), vue.createElementBlock(
  2049. vue.Fragment,
  2050. null,
  2051. vue.renderList(_ctx.years, (item, index) => {
  2052. return vue.openBlock(), vue.createElementBlock(
  2053. "view",
  2054. {
  2055. class: "picker-item",
  2056. key: index
  2057. },
  2058. vue.toDisplayString(item) + "年",
  2059. 1
  2060. /* TEXT */
  2061. );
  2062. }),
  2063. 128
  2064. /* KEYED_FRAGMENT */
  2065. ))
  2066. ]),
  2067. vue.createElementVNode("picker-view-column", null, [
  2068. (vue.openBlock(true), vue.createElementBlock(
  2069. vue.Fragment,
  2070. null,
  2071. vue.renderList(_ctx.months, (item, index) => {
  2072. return vue.openBlock(), vue.createElementBlock(
  2073. "view",
  2074. {
  2075. class: "picker-item",
  2076. key: index
  2077. },
  2078. vue.toDisplayString(item) + "月",
  2079. 1
  2080. /* TEXT */
  2081. );
  2082. }),
  2083. 128
  2084. /* KEYED_FRAGMENT */
  2085. ))
  2086. ]),
  2087. vue.createElementVNode("picker-view-column", null, [
  2088. (vue.openBlock(true), vue.createElementBlock(
  2089. vue.Fragment,
  2090. null,
  2091. vue.renderList(_ctx.days, (item, index) => {
  2092. return vue.openBlock(), vue.createElementBlock(
  2093. "view",
  2094. {
  2095. class: "picker-item",
  2096. key: index
  2097. },
  2098. vue.toDisplayString(item) + "日",
  2099. 1
  2100. /* TEXT */
  2101. );
  2102. }),
  2103. 128
  2104. /* KEYED_FRAGMENT */
  2105. ))
  2106. ])
  2107. ], 40, ["value"])
  2108. ])
  2109. ],
  2110. 2
  2111. /* CLASS */
  2112. )
  2113. ]);
  2114. }
  2115. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2116. const logic$5 = {
  2117. data() {
  2118. return {
  2119. serviceTypes: [],
  2120. // 从上一页传递过来的服务类型列表
  2121. qualifications: {},
  2122. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2123. qualOssIds: {}
  2124. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2125. };
  2126. },
  2127. onLoad(options) {
  2128. if (options.services) {
  2129. try {
  2130. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2131. this.serviceTypes.forEach((item) => {
  2132. this.qualifications[item.name] = [];
  2133. this.qualOssIds[item.name] = [];
  2134. });
  2135. } catch (e) {
  2136. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2137. }
  2138. }
  2139. },
  2140. methods: {
  2141. chooseImage(serviceName) {
  2142. uni.chooseImage({
  2143. count: 9,
  2144. sizeType: ["compressed"],
  2145. sourceType: ["album", "camera"],
  2146. success: async (res) => {
  2147. if (!this.qualifications[serviceName]) {
  2148. this.qualifications[serviceName] = [];
  2149. this.qualOssIds[serviceName] = [];
  2150. }
  2151. for (const tempPath of res.tempFilePaths) {
  2152. this.qualifications[serviceName].push(tempPath);
  2153. this.$forceUpdate();
  2154. try {
  2155. const uploadRes = await uploadFile(tempPath);
  2156. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2157. } catch (err) {
  2158. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  2159. }
  2160. }
  2161. }
  2162. });
  2163. },
  2164. deleteImage(serviceName, index) {
  2165. this.qualifications[serviceName].splice(index, 1);
  2166. if (this.qualOssIds[serviceName]) {
  2167. this.qualOssIds[serviceName].splice(index, 1);
  2168. }
  2169. this.$forceUpdate();
  2170. },
  2171. goBackToForm() {
  2172. const pages = getCurrentPages();
  2173. if (pages.length > 2) {
  2174. uni.navigateBack({
  2175. delta: 2
  2176. });
  2177. } else {
  2178. uni.reLaunch({
  2179. url: "/pages/recruit/form"
  2180. });
  2181. }
  2182. },
  2183. async submit() {
  2184. let recruitData = {};
  2185. try {
  2186. const stored = uni.getStorageSync("recruit_form_data");
  2187. if (stored) {
  2188. recruitData = JSON.parse(stored);
  2189. }
  2190. } catch (e) {
  2191. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2192. }
  2193. const allQualOssIds = [];
  2194. Object.values(this.qualOssIds).forEach((ids) => {
  2195. allQualOssIds.push(...ids);
  2196. });
  2197. const auditData = {
  2198. name: recruitData.name || "",
  2199. phone: recruitData.mobile || "",
  2200. password: recruitData.password || "",
  2201. gender: recruitData.gender === 1 ? "0" : "1",
  2202. birthday: recruitData.birthday || "",
  2203. serviceTypes: (recruitData.serviceType || []).join(","),
  2204. // 逗号分隔的服务类型ID
  2205. city: recruitData.city || "",
  2206. stationId: recruitData.stationId || null,
  2207. realName: recruitData.realName || "",
  2208. idCard: recruitData.idNumber || "",
  2209. idValidDate: recruitData.expiryDate || "",
  2210. idCardFront: recruitData.idCardFrontOssId || null,
  2211. idCardBack: recruitData.idCardBackOssId || null,
  2212. qualifications: allQualOssIds.join(",")
  2213. // 逗号分隔的资质图片OSS ID
  2214. };
  2215. uni.showLoading({ title: "提交中..." });
  2216. try {
  2217. await submitAudit(auditData);
  2218. uni.hideLoading();
  2219. uni.reLaunch({
  2220. url: "/pages/recruit/success"
  2221. });
  2222. } catch (err) {
  2223. uni.hideLoading();
  2224. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2225. }
  2226. }
  2227. }
  2228. };
  2229. const _sfc_main$z = logic$5;
  2230. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  2231. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2232. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2233. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2234. key: 0,
  2235. class: "empty-state"
  2236. }, [
  2237. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2238. vue.createElementVNode("button", {
  2239. class: "back-btn",
  2240. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2241. }, "返回选择")
  2242. ])) : vue.createCommentVNode("v-if", true),
  2243. (vue.openBlock(true), vue.createElementBlock(
  2244. vue.Fragment,
  2245. null,
  2246. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2247. return vue.openBlock(), vue.createElementBlock("view", {
  2248. class: "qual-card",
  2249. key: item.id
  2250. }, [
  2251. vue.createElementVNode(
  2252. "view",
  2253. { class: "card-title" },
  2254. vue.toDisplayString(item.name) + "服务资质",
  2255. 1
  2256. /* TEXT */
  2257. ),
  2258. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2259. (vue.openBlock(true), vue.createElementBlock(
  2260. vue.Fragment,
  2261. null,
  2262. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2263. return vue.openBlock(), vue.createElementBlock("view", {
  2264. class: "img-item",
  2265. key: imgIndex
  2266. }, [
  2267. vue.createElementVNode("image", {
  2268. src: img,
  2269. class: "preview-img",
  2270. mode: "aspectFill",
  2271. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2272. }, null, 8, ["src", "onClick"]),
  2273. vue.createElementVNode("view", {
  2274. class: "delete-btn",
  2275. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2276. }, "×", 8, ["onClick"])
  2277. ]);
  2278. }),
  2279. 128
  2280. /* KEYED_FRAGMENT */
  2281. )),
  2282. vue.createElementVNode("view", {
  2283. class: "upload-box",
  2284. onClick: ($event) => _ctx.chooseImage(item.name)
  2285. }, [
  2286. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2287. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2288. ], 8, ["onClick"])
  2289. ])
  2290. ]);
  2291. }),
  2292. 128
  2293. /* KEYED_FRAGMENT */
  2294. )),
  2295. vue.createElementVNode("view", { class: "footer-actions" }, [
  2296. vue.createElementVNode("button", {
  2297. class: "submit-btn",
  2298. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2299. }, "立即提交")
  2300. ])
  2301. ]);
  2302. }
  2303. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2304. const logic$4 = {
  2305. data() {
  2306. return {
  2307. station: "",
  2308. name: "",
  2309. phone: ""
  2310. };
  2311. },
  2312. onShow() {
  2313. this.loadSuccessData();
  2314. },
  2315. methods: {
  2316. loadSuccessData() {
  2317. try {
  2318. const stored = uni.getStorageSync("recruit_form_data");
  2319. if (stored) {
  2320. const data = JSON.parse(stored);
  2321. this.station = data.station || "未设置";
  2322. this.name = data.name || "未设置";
  2323. this.phone = data.mobile || "未设置";
  2324. }
  2325. } catch (e) {
  2326. formatAppLog("error", "at pages/recruit/success_logic.js:23", "加载成功页数据失败", e);
  2327. }
  2328. },
  2329. goHome() {
  2330. uni.removeStorageSync("recruit_form_data");
  2331. uni.reLaunch({
  2332. url: "/pages/login/login"
  2333. });
  2334. }
  2335. }
  2336. };
  2337. const _sfc_main$y = logic$4;
  2338. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2339. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2340. vue.createElementVNode("view", { class: "icon-area" }, [
  2341. (vue.openBlock(), vue.createElementBlock("svg", {
  2342. class: "success-icon",
  2343. viewBox: "0 0 1024 1024",
  2344. version: "1.1",
  2345. xmlns: "http://www.w3.org/2000/svg"
  2346. }, [
  2347. vue.createElementVNode("path", {
  2348. 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",
  2349. fill: "#64D01D"
  2350. }),
  2351. vue.createElementVNode("path", {
  2352. 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",
  2353. fill: "#64D01D"
  2354. })
  2355. ])),
  2356. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2357. ]),
  2358. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2359. vue.createElementVNode("view", { class: "info-card" }, [
  2360. vue.createElementVNode("view", { class: "info-item" }, [
  2361. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2362. vue.createElementVNode(
  2363. "text",
  2364. { class: "value" },
  2365. vue.toDisplayString(_ctx.station),
  2366. 1
  2367. /* TEXT */
  2368. )
  2369. ]),
  2370. vue.createElementVNode("view", { class: "info-item" }, [
  2371. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2372. vue.createElementVNode(
  2373. "text",
  2374. { class: "value" },
  2375. vue.toDisplayString(_ctx.name),
  2376. 1
  2377. /* TEXT */
  2378. )
  2379. ]),
  2380. vue.createElementVNode("view", { class: "info-item" }, [
  2381. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2382. vue.createElementVNode(
  2383. "text",
  2384. { class: "value" },
  2385. vue.toDisplayString(_ctx.phone),
  2386. 1
  2387. /* TEXT */
  2388. )
  2389. ])
  2390. ]),
  2391. vue.createElementVNode("view", {
  2392. class: "footer-btn",
  2393. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2394. }, "我知道了")
  2395. ]);
  2396. }
  2397. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2398. const _sfc_main$x = {
  2399. data() {
  2400. return {
  2401. mobile: "",
  2402. code: "",
  2403. countDown: 0,
  2404. timer: null
  2405. };
  2406. },
  2407. computed: {
  2408. mobileMask() {
  2409. if (!this.mobile)
  2410. return "";
  2411. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2412. }
  2413. },
  2414. onLoad(options) {
  2415. if (options.mobile) {
  2416. this.mobile = options.mobile;
  2417. } else {
  2418. this.mobile = "13412346783";
  2419. }
  2420. },
  2421. methods: {
  2422. getVerifyCode() {
  2423. if (this.countDown > 0)
  2424. return;
  2425. this.countDown = 60;
  2426. this.timer = setInterval(() => {
  2427. this.countDown--;
  2428. if (this.countDown <= 0) {
  2429. clearInterval(this.timer);
  2430. }
  2431. }, 1e3);
  2432. uni.showToast({ title: "验证码已发送", icon: "none" });
  2433. },
  2434. nextStep() {
  2435. if (!this.code) {
  2436. uni.showToast({ title: "请输入验证码", icon: "none" });
  2437. return;
  2438. }
  2439. uni.navigateTo({
  2440. url: "/pages/login/reset-pwd-set"
  2441. });
  2442. }
  2443. }
  2444. };
  2445. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2446. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2447. vue.createElementVNode("view", { class: "content" }, [
  2448. vue.createElementVNode(
  2449. "view",
  2450. { class: "tip-text" },
  2451. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2452. 1
  2453. /* TEXT */
  2454. ),
  2455. vue.createElementVNode("view", { class: "input-group" }, [
  2456. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2457. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2458. vue.withDirectives(vue.createElementVNode(
  2459. "input",
  2460. {
  2461. class: "code-input",
  2462. type: "number",
  2463. maxlength: "6",
  2464. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2465. },
  2466. null,
  2467. 512
  2468. /* NEED_PATCH */
  2469. ), [
  2470. [vue.vModelText, $data.code]
  2471. ]),
  2472. vue.createElementVNode("view", {
  2473. class: "get-code-btn",
  2474. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2475. }, [
  2476. vue.createElementVNode(
  2477. "text",
  2478. { class: "btn-text" },
  2479. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2480. 1
  2481. /* TEXT */
  2482. )
  2483. ])
  2484. ])
  2485. ]),
  2486. vue.createElementVNode("button", {
  2487. class: "next-btn",
  2488. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2489. }, "下一步")
  2490. ])
  2491. ]);
  2492. }
  2493. 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"]]);
  2494. const _sfc_main$w = {
  2495. data() {
  2496. return {
  2497. pwd1: "",
  2498. pwd2: ""
  2499. };
  2500. },
  2501. methods: {
  2502. confirmReset() {
  2503. if (!this.pwd1 || !this.pwd2) {
  2504. uni.showToast({ title: "请输入密码", icon: "none" });
  2505. return;
  2506. }
  2507. if (this.pwd1 !== this.pwd2) {
  2508. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2509. return;
  2510. }
  2511. uni.showToast({ title: "重置成功", icon: "success" });
  2512. setTimeout(() => {
  2513. uni.navigateBack({
  2514. delta: 2
  2515. // 返回到登录页
  2516. });
  2517. }, 1500);
  2518. }
  2519. }
  2520. };
  2521. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2522. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2523. vue.createElementVNode("view", { class: "content" }, [
  2524. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2525. vue.createElementVNode("view", { class: "input-form" }, [
  2526. vue.createElementVNode("view", { class: "input-row" }, [
  2527. vue.withDirectives(vue.createElementVNode(
  2528. "input",
  2529. {
  2530. class: "pwd-input",
  2531. type: "text",
  2532. password: "",
  2533. placeholder: "限12-20位字母和数字组合",
  2534. "placeholder-style": "color:#ccc",
  2535. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2536. },
  2537. null,
  2538. 512
  2539. /* NEED_PATCH */
  2540. ), [
  2541. [vue.vModelText, $data.pwd1]
  2542. ])
  2543. ]),
  2544. vue.createElementVNode("view", { class: "divider" }),
  2545. vue.createElementVNode("view", { class: "input-row" }, [
  2546. vue.withDirectives(vue.createElementVNode(
  2547. "input",
  2548. {
  2549. class: "pwd-input",
  2550. type: "text",
  2551. password: "",
  2552. placeholder: "限12-20位字母和数字组合",
  2553. "placeholder-style": "color:#ccc",
  2554. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2555. },
  2556. null,
  2557. 512
  2558. /* NEED_PATCH */
  2559. ), [
  2560. [vue.vModelText, $data.pwd2]
  2561. ])
  2562. ]),
  2563. vue.createElementVNode("view", { class: "divider" })
  2564. ]),
  2565. vue.createElementVNode("button", {
  2566. class: "confirm-btn",
  2567. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2568. }, "确定")
  2569. ])
  2570. ]);
  2571. }
  2572. 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"]]);
  2573. function cancelOrderApi(data) {
  2574. return request({
  2575. url: "/order/subOrder/cancel",
  2576. method: "PUT",
  2577. data
  2578. });
  2579. }
  2580. function rejectOrderApi(data) {
  2581. return request({
  2582. url: "/order/subOrder/reject",
  2583. method: "PUT",
  2584. data
  2585. });
  2586. }
  2587. function getPendingOrders(params) {
  2588. return request({
  2589. url: "/order/subOrder/listPendingAccept",
  2590. method: "GET",
  2591. data: params
  2592. });
  2593. }
  2594. function acceptOrder(orderId) {
  2595. return request({
  2596. url: "/order/subOrder/accept",
  2597. method: "PUT",
  2598. data: { orderId }
  2599. });
  2600. }
  2601. function getOrderCount() {
  2602. return request({
  2603. url: "/order/subOrder/count",
  2604. method: "GET"
  2605. });
  2606. }
  2607. function getStatisticOrders(params) {
  2608. return request({
  2609. url: "/order/subOrder/listOnStatistic",
  2610. method: "GET",
  2611. data: params
  2612. });
  2613. }
  2614. function getMyOrders(params) {
  2615. return request({
  2616. url: "/order/subOrder/listOnMyOrder",
  2617. method: "GET",
  2618. data: params
  2619. });
  2620. }
  2621. function getOrderInfo(id) {
  2622. return request({
  2623. url: `/order/subOrder/getInfo?id=${id}`,
  2624. method: "GET"
  2625. });
  2626. }
  2627. function clockIn(data) {
  2628. return request({
  2629. url: "/order/subOrder/clockIn",
  2630. method: "PUT",
  2631. data
  2632. });
  2633. }
  2634. function submitNursingSummary(data) {
  2635. return request({
  2636. url: "/order/subOrder/nursingSummary",
  2637. method: "PUT",
  2638. data
  2639. });
  2640. }
  2641. function getAreaStationList() {
  2642. return request({
  2643. url: "/system/areaStation/list",
  2644. method: "GET"
  2645. });
  2646. }
  2647. const _sfc_main$v = {
  2648. __name: "index",
  2649. props: {
  2650. currentPath: {
  2651. type: String,
  2652. required: true
  2653. }
  2654. },
  2655. setup(__props, { expose: __expose }) {
  2656. __expose();
  2657. const props = __props;
  2658. const list = vue.ref([
  2659. {
  2660. pagePath: "pages/home/index",
  2661. text: "任务中心",
  2662. iconPath: "/static/tabbar/home.svg",
  2663. selectedIconPath: "/static/tabbar/home-active.svg"
  2664. },
  2665. {
  2666. pagePath: "pages/orders/index",
  2667. text: "我的订单",
  2668. iconPath: "/static/tabbar/order.svg",
  2669. selectedIconPath: "/static/tabbar/order-active.svg"
  2670. },
  2671. {
  2672. pagePath: "pages/mine/index",
  2673. text: "我的",
  2674. iconPath: "/static/tabbar/mine.svg",
  2675. selectedIconPath: "/static/tabbar/mine-active.svg"
  2676. }
  2677. ]);
  2678. const switchTab = (path) => {
  2679. if (props.currentPath === path)
  2680. return;
  2681. uni.switchTab({
  2682. url: "/" + path
  2683. });
  2684. };
  2685. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2686. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2687. return __returned__;
  2688. }
  2689. };
  2690. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2691. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2692. vue.createElementVNode("view", { class: "tabbar-border" }),
  2693. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2694. (vue.openBlock(true), vue.createElementBlock(
  2695. vue.Fragment,
  2696. null,
  2697. vue.renderList($setup.list, (item, index) => {
  2698. return vue.openBlock(), vue.createElementBlock("view", {
  2699. class: "tabbar-item",
  2700. key: index,
  2701. onClick: ($event) => $setup.switchTab(item.pagePath)
  2702. }, [
  2703. vue.createElementVNode("image", {
  2704. class: "tabbar-icon",
  2705. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2706. }, null, 8, ["src"]),
  2707. vue.createElementVNode(
  2708. "view",
  2709. {
  2710. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2711. },
  2712. vue.toDisplayString(item.text),
  2713. 3
  2714. /* TEXT, CLASS */
  2715. )
  2716. ], 8, ["onClick"]);
  2717. }),
  2718. 128
  2719. /* KEYED_FRAGMENT */
  2720. ))
  2721. ])
  2722. ]);
  2723. }
  2724. 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"]]);
  2725. const logic$3 = {
  2726. components: {
  2727. customTabbar
  2728. },
  2729. data() {
  2730. return {
  2731. taskList: [],
  2732. currentFilter: "default",
  2733. // default, distance, time
  2734. filterCondition: "筛选条件",
  2735. sortDistance: "asc",
  2736. // asc, desc
  2737. sortTime: "asc",
  2738. scrollTop: 0,
  2739. // Track scroll position
  2740. isFilterShow: false,
  2741. tempFilter: {
  2742. service: null,
  2743. distance: "全部",
  2744. amount: "全部"
  2745. },
  2746. activeFilter: {
  2747. service: null,
  2748. distance: "全部",
  2749. amount: "全部"
  2750. },
  2751. workStatus: "resting",
  2752. // resting | busy | disabled
  2753. showConfirmModal: false,
  2754. showPetModal: false,
  2755. currentPetInfo: {},
  2756. showRejectModal: false,
  2757. rejectReason: "",
  2758. currentOrder: null,
  2759. showAcceptConfirmModal: false,
  2760. showNavModal: false,
  2761. navTargetItem: null,
  2762. navTargetPointType: "",
  2763. profile: null,
  2764. profileLoading: false,
  2765. serviceList: [],
  2766. orderStats: {
  2767. total: 0,
  2768. reject: 0,
  2769. completed: 0,
  2770. price: 0
  2771. }
  2772. };
  2773. },
  2774. onPageScroll(e) {
  2775. this.scrollTop = e.scrollTop;
  2776. },
  2777. async onLoad() {
  2778. this.checkWorkStatus();
  2779. await this.loadServiceList();
  2780. this.loadTaskList();
  2781. },
  2782. onShow() {
  2783. uni.hideTabBar();
  2784. this.checkWorkStatus();
  2785. if (isLoggedIn()) {
  2786. this.loadProfile();
  2787. this.loadOrderStats();
  2788. this.loadTaskList();
  2789. this.loadServiceList();
  2790. }
  2791. },
  2792. async onPullDownRefresh() {
  2793. this.checkWorkStatus();
  2794. try {
  2795. await this.loadServiceList();
  2796. const tasks = [
  2797. this.loadTaskList()
  2798. ];
  2799. if (isLoggedIn()) {
  2800. tasks.push(this.loadProfile());
  2801. tasks.push(this.loadOrderStats());
  2802. }
  2803. await Promise.all(tasks);
  2804. } catch (err) {
  2805. formatAppLog("error", "at pages/home/logic.js:90", "刷新异常:", err);
  2806. } finally {
  2807. uni.stopPullDownRefresh();
  2808. uni.showToast({ title: "刷新成功", icon: "success" });
  2809. }
  2810. },
  2811. methods: {
  2812. async loadProfile() {
  2813. if (this.profileLoading)
  2814. return;
  2815. this.profileLoading = true;
  2816. try {
  2817. const res = await getMyProfile();
  2818. const data = res.data || null;
  2819. if (data) {
  2820. if (data.status) {
  2821. this.workStatus = data.status;
  2822. uni.setStorageSync("workStatus", data.status);
  2823. }
  2824. if (data.stationId) {
  2825. try {
  2826. const stationRes = await getAreaStationList();
  2827. const list = stationRes.data || [];
  2828. const currentStation = list.find((i) => i.id === data.stationId);
  2829. if (currentStation) {
  2830. let node = currentStation;
  2831. while (node && node.parentId !== 0) {
  2832. let parent = list.find((i) => i.id === node.parentId);
  2833. if (parent) {
  2834. node = parent;
  2835. } else {
  2836. break;
  2837. }
  2838. }
  2839. data.cityName = node.name;
  2840. }
  2841. } catch (e) {
  2842. formatAppLog("error", "at pages/home/logic.js:132", "溯源城市失败:", e);
  2843. }
  2844. }
  2845. }
  2846. this.profile = data;
  2847. } catch (err) {
  2848. formatAppLog("error", "at pages/home/logic.js:139", "获取个人信息失败:", err);
  2849. } finally {
  2850. this.profileLoading = false;
  2851. }
  2852. },
  2853. async loadServiceList() {
  2854. try {
  2855. const res = await listAllService();
  2856. this.serviceList = res.data || [];
  2857. } catch (err) {
  2858. formatAppLog("error", "at pages/home/logic.js:149", "获取服务类型失败:", err);
  2859. }
  2860. },
  2861. async loadOrderStats() {
  2862. try {
  2863. const res = await getOrderCount();
  2864. this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
  2865. } catch (err) {
  2866. formatAppLog("error", "at pages/home/logic.js:157", "获取订单统计失败:", err);
  2867. }
  2868. },
  2869. checkWorkStatus() {
  2870. const status = uni.getStorageSync("workStatus");
  2871. if (status) {
  2872. this.workStatus = status;
  2873. } else {
  2874. this.workStatus = "resting";
  2875. uni.setStorageSync("workStatus", "resting");
  2876. }
  2877. },
  2878. toggleFilter() {
  2879. if (this.workStatus === "resting")
  2880. return;
  2881. this.isFilterShow = !this.isFilterShow;
  2882. },
  2883. goToWorkStatus() {
  2884. uni.navigateTo({
  2885. url: "/pages/home/work-status"
  2886. });
  2887. },
  2888. startWork() {
  2889. this.showConfirmModal = true;
  2890. },
  2891. confirmStartWork() {
  2892. this.workStatus = "busy";
  2893. uni.setStorageSync("workStatus", "busy");
  2894. this.loadTaskList();
  2895. this.showConfirmModal = false;
  2896. uni.showToast({ title: "已开始接单", icon: "success" });
  2897. },
  2898. closeConfirmModal() {
  2899. this.showConfirmModal = false;
  2900. },
  2901. showPetProfile(item) {
  2902. this.currentPetInfo = item;
  2903. this.showPetModal = true;
  2904. },
  2905. closePetProfile() {
  2906. this.showPetModal = false;
  2907. },
  2908. openRejectModal(item) {
  2909. this.currentOrder = item;
  2910. this.rejectReason = "";
  2911. this.showRejectModal = true;
  2912. },
  2913. closeRejectModal() {
  2914. this.showRejectModal = false;
  2915. this.currentOrder = null;
  2916. },
  2917. async confirmReject() {
  2918. var _a;
  2919. if (!this.rejectReason.trim()) {
  2920. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2921. return;
  2922. }
  2923. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2924. return;
  2925. try {
  2926. uni.showLoading({ title: "提交中...", mask: true });
  2927. await rejectOrderApi({
  2928. orderId: this.currentOrder.id,
  2929. rejectReason: this.rejectReason
  2930. });
  2931. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2932. this.showRejectModal = false;
  2933. this.currentOrder = null;
  2934. this.loadTaskList();
  2935. this.loadOrderStats();
  2936. } catch (err) {
  2937. formatAppLog("error", "at pages/home/logic.js:226", "拒绝接单失败:", err);
  2938. uni.showToast({ title: "操作失败", icon: "none" });
  2939. } finally {
  2940. uni.hideLoading();
  2941. }
  2942. },
  2943. openAcceptModal(item) {
  2944. this.currentOrder = item;
  2945. this.showAcceptConfirmModal = true;
  2946. },
  2947. closeAcceptModal() {
  2948. this.showAcceptConfirmModal = false;
  2949. this.currentOrder = null;
  2950. },
  2951. async confirmAccept() {
  2952. var _a;
  2953. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2954. return;
  2955. try {
  2956. await acceptOrder(this.currentOrder.id);
  2957. uni.showToast({ title: "接单成功", icon: "success" });
  2958. this.showAcceptConfirmModal = false;
  2959. this.currentOrder = null;
  2960. this.loadTaskList();
  2961. this.loadProfile();
  2962. this.loadOrderStats();
  2963. } catch (err) {
  2964. formatAppLog("error", "at pages/home/logic.js:251", "接单失败:", err);
  2965. uni.showToast({ title: "接单失败", icon: "none" });
  2966. }
  2967. },
  2968. openNavigation(item, pointType) {
  2969. this.navTargetItem = item;
  2970. this.navTargetPointType = pointType;
  2971. this.showNavModal = true;
  2972. },
  2973. closeNavModal() {
  2974. this.showNavModal = false;
  2975. },
  2976. chooseMap(mapType) {
  2977. let item = this.navTargetItem;
  2978. let pointType = this.navTargetPointType;
  2979. let name = pointType === "start" ? item.fromAddress || "起点" : item.toAddress || "终点";
  2980. let address = pointType === "start" ? item.fromAddress || "起点地址" : item.toAddress || "终点地址";
  2981. let latitude = pointType === "start" ? Number(item.fromLat) : Number(item.toLat);
  2982. let longitude = pointType === "start" ? Number(item.fromLng) : Number(item.toLng);
  2983. this.showNavModal = false;
  2984. const navigateTo = (lat, lng, addrName, addrDesc) => {
  2985. uni.openLocation({
  2986. latitude: lat,
  2987. longitude: lng,
  2988. name: addrName,
  2989. address: addrDesc || "无法获取详细地址",
  2990. success: function() {
  2991. formatAppLog("log", "at pages/home/logic.js:282", "打开导航成功: " + mapType);
  2992. },
  2993. fail: function(err) {
  2994. formatAppLog("error", "at pages/home/logic.js:285", "打开导航失败:", err);
  2995. uni.showToast({ title: "打开地图失败", icon: "none" });
  2996. }
  2997. });
  2998. };
  2999. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  3000. navigateTo(latitude, longitude, name, address);
  3001. } else {
  3002. uni.showLoading({ title: "获取当前位置...", mask: true });
  3003. uni.getLocation({
  3004. type: "gcj02",
  3005. success: (res) => {
  3006. uni.hideLoading();
  3007. navigateTo(res.latitude, res.longitude, name, address);
  3008. },
  3009. fail: (err) => {
  3010. uni.hideLoading();
  3011. formatAppLog("error", "at pages/home/logic.js:306", "获取地理位置失败:", err);
  3012. uni.showToast({ title: "无法获取当前位置信息", icon: "none" });
  3013. }
  3014. });
  3015. }
  3016. },
  3017. selectService(type) {
  3018. this.tempFilter.service = type;
  3019. },
  3020. selectDistance(type) {
  3021. this.tempFilter.distance = type;
  3022. },
  3023. selectAmount(type) {
  3024. this.tempFilter.amount = type;
  3025. },
  3026. resetFilter() {
  3027. this.tempFilter = {
  3028. service: null,
  3029. distance: "全部",
  3030. amount: "全部"
  3031. };
  3032. },
  3033. confirmFilter() {
  3034. this.activeFilter = { ...this.tempFilter };
  3035. this.isFilterShow = false;
  3036. this.loadTaskList();
  3037. },
  3038. closeFilter() {
  3039. this.isFilterShow = false;
  3040. },
  3041. goToDetail(item) {
  3042. formatAppLog("log", "at pages/home/logic.js:337", "Go to detail", item);
  3043. },
  3044. async loadTaskList() {
  3045. try {
  3046. const params = {
  3047. service: this.activeFilter.service,
  3048. minPrice: this.getMinPrice(),
  3049. maxPrice: this.getMaxPrice(),
  3050. pageNum: 1,
  3051. pageSize: 20
  3052. };
  3053. const res = await getPendingOrders(params);
  3054. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  3055. } catch (err) {
  3056. formatAppLog("error", "at pages/home/logic.js:351", "获取订单列表失败:", err);
  3057. uni.showToast({ title: "加载失败", icon: "none" });
  3058. this.taskList = [];
  3059. }
  3060. },
  3061. getMinPrice() {
  3062. const amount = this.activeFilter.amount;
  3063. if (amount === "100以下")
  3064. return 0;
  3065. if (amount === "100-200")
  3066. return 1e4;
  3067. if (amount === "200-500")
  3068. return 2e4;
  3069. if (amount === "500以上")
  3070. return 5e4;
  3071. return void 0;
  3072. },
  3073. getMaxPrice() {
  3074. const amount = this.activeFilter.amount;
  3075. if (amount === "100以下")
  3076. return 1e4;
  3077. if (amount === "100-200")
  3078. return 2e4;
  3079. if (amount === "200-500")
  3080. return 5e4;
  3081. return void 0;
  3082. },
  3083. transformOrder(item) {
  3084. const service = this.serviceList.find((s) => s.id === item.service);
  3085. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3086. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3087. const mode = (service == null ? void 0 : service.mode) || 0;
  3088. const isRoundTrip = mode === 1;
  3089. return {
  3090. id: item.id,
  3091. type: isRoundTrip ? 1 : item.service,
  3092. typeText: serviceText,
  3093. typeIcon: serviceIcon,
  3094. price: (item.price / 100).toFixed(2),
  3095. timeLabel: "服务时间",
  3096. time: item.serviceTime,
  3097. petAvatar: item.petAvatar || "/static/dog.png",
  3098. petAvatarUrl: item.petAvatarUrl || "",
  3099. petName: item.petName,
  3100. petBreed: item.breed,
  3101. petGender: "M",
  3102. petAge: "",
  3103. petWeight: "",
  3104. petPersonality: "",
  3105. petHobby: "",
  3106. petRemark: "",
  3107. petTags: [],
  3108. petLogs: [],
  3109. startLocation: item.fromAddress || "暂无起点",
  3110. startAddress: item.fromAddress || "",
  3111. fromAddress: item.fromAddress || "",
  3112. fromLat: item.fromLat,
  3113. fromLng: item.fromLng,
  3114. startDistance: "0km",
  3115. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  3116. endAddress: item.toAddress || "",
  3117. toAddress: item.toAddress || "",
  3118. toLat: item.toLat,
  3119. toLng: item.toLng,
  3120. endDistance: "0km",
  3121. serviceContent: "",
  3122. remark: item.remark || ""
  3123. };
  3124. },
  3125. setFilter(type) {
  3126. this.currentFilter = type;
  3127. if (type === "distance") {
  3128. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  3129. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  3130. } else if (type === "time") {
  3131. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  3132. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  3133. }
  3134. },
  3135. showFilterDropdown() {
  3136. this.toggleFilter();
  3137. }
  3138. }
  3139. };
  3140. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  3141. const _sfc_main$u = {
  3142. ...logic$3
  3143. };
  3144. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  3145. var _a, _b, _c;
  3146. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  3147. return vue.openBlock(), vue.createElementBlock(
  3148. vue.Fragment,
  3149. null,
  3150. [
  3151. vue.createElementVNode("view", { class: "container" }, [
  3152. vue.createElementVNode(
  3153. "view",
  3154. {
  3155. class: "custom-nav-bar",
  3156. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3157. },
  3158. [
  3159. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3160. ],
  3161. 4
  3162. /* STYLE */
  3163. ),
  3164. vue.createElementVNode("view", { class: "nav-bg" }, [
  3165. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3166. vue.createElementVNode("view", { class: "bg-circle-right" })
  3167. ]),
  3168. vue.createElementVNode("view", { class: "header-section" }, [
  3169. vue.createElementVNode("view", { class: "user-info" }, [
  3170. vue.createElementVNode("image", {
  3171. class: "avatar",
  3172. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3173. mode: "aspectFill"
  3174. }, null, 8, ["src"]),
  3175. vue.createElementVNode("view", { class: "info-content" }, [
  3176. vue.createElementVNode("view", { class: "top-row" }, [
  3177. vue.createElementVNode(
  3178. "text",
  3179. { class: "name" },
  3180. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3181. 1
  3182. /* TEXT */
  3183. ),
  3184. vue.createElementVNode(
  3185. "view",
  3186. {
  3187. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus !== "busy" }]),
  3188. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3189. },
  3190. [
  3191. vue.createElementVNode(
  3192. "view",
  3193. {
  3194. class: vue.normalizeClass(["status-dot-bg", { "busy": _ctx.workStatus === "busy", "disabled": _ctx.workStatus === "disabled" }])
  3195. },
  3196. [
  3197. _ctx.workStatus === "busy" ? (vue.openBlock(), vue.createElementBlock("text", {
  3198. key: 0,
  3199. class: "check-mark"
  3200. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3201. key: 1,
  3202. class: "check-mark",
  3203. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3204. }, "✕"))
  3205. ],
  3206. 2
  3207. /* CLASS */
  3208. ),
  3209. vue.createElementVNode(
  3210. "text",
  3211. { class: "status-text" },
  3212. vue.toDisplayString(_ctx.workStatus === "busy" ? "接单中" : _ctx.workStatus === "resting" ? "正在休息" : "已禁用"),
  3213. 1
  3214. /* TEXT */
  3215. ),
  3216. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3217. ],
  3218. 2
  3219. /* CLASS */
  3220. )
  3221. ]),
  3222. vue.createElementVNode("view", { class: "bottom-row" }, [
  3223. vue.createElementVNode(
  3224. "text",
  3225. { class: "city-label" },
  3226. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3227. 1
  3228. /* TEXT */
  3229. ),
  3230. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3231. ])
  3232. ])
  3233. ]),
  3234. vue.createElementVNode("view", { class: "stats-card" }, [
  3235. vue.createElementVNode("view", { class: "stat-item" }, [
  3236. vue.createElementVNode(
  3237. "text",
  3238. { class: "num" },
  3239. vue.toDisplayString(_ctx.orderStats.total),
  3240. 1
  3241. /* TEXT */
  3242. ),
  3243. vue.createElementVNode("text", { class: "label" }, "全部订单")
  3244. ]),
  3245. vue.createElementVNode("view", { class: "divider" }),
  3246. vue.createElementVNode("view", { class: "stat-item" }, [
  3247. vue.createElementVNode(
  3248. "text",
  3249. { class: "num" },
  3250. vue.toDisplayString(_ctx.orderStats.reject),
  3251. 1
  3252. /* TEXT */
  3253. ),
  3254. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3255. ]),
  3256. vue.createElementVNode("view", { class: "divider" }),
  3257. vue.createElementVNode("view", { class: "stat-item" }, [
  3258. vue.createElementVNode(
  3259. "text",
  3260. { class: "num" },
  3261. vue.toDisplayString(_ctx.orderStats.completed),
  3262. 1
  3263. /* TEXT */
  3264. ),
  3265. vue.createElementVNode("text", { class: "label" }, "完成订单")
  3266. ]),
  3267. vue.createElementVNode("view", { class: "divider" }),
  3268. vue.createElementVNode("view", { class: "stat-item" }, [
  3269. vue.createElementVNode(
  3270. "text",
  3271. { class: "num" },
  3272. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  3273. 1
  3274. /* TEXT */
  3275. ),
  3276. vue.createElementVNode("text", { class: "label" }, "服务总得")
  3277. ])
  3278. ])
  3279. ]),
  3280. vue.createElementVNode("view", { class: "task-header" }, [
  3281. vue.createElementVNode(
  3282. "view",
  3283. {
  3284. class: "header-inner",
  3285. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3286. },
  3287. [
  3288. vue.createElementVNode("view", { class: "left-title" }, [
  3289. vue.createElementVNode("view", { class: "orange-bar" }),
  3290. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3291. vue.createElementVNode(
  3292. "text",
  3293. { class: "count" },
  3294. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3295. 1
  3296. /* TEXT */
  3297. )
  3298. ]),
  3299. vue.createElementVNode("view", { class: "filter-options" }, [
  3300. vue.createElementVNode("view", {
  3301. class: "dropdown",
  3302. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3303. }, [
  3304. vue.createElementVNode("text", null, "筛选条件"),
  3305. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3306. ])
  3307. ])
  3308. ],
  3309. 4
  3310. /* STYLE */
  3311. ),
  3312. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3313. key: 0,
  3314. class: "filter-mask",
  3315. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3316. })) : vue.createCommentVNode("v-if", true),
  3317. vue.createElementVNode(
  3318. "view",
  3319. {
  3320. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3321. },
  3322. [
  3323. vue.createElementVNode("view", { class: "filter-section" }, [
  3324. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3325. vue.createElementVNode("view", { class: "options-grid" }, [
  3326. vue.createElementVNode(
  3327. "view",
  3328. {
  3329. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3330. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3331. },
  3332. "全部",
  3333. 2
  3334. /* CLASS */
  3335. ),
  3336. (vue.openBlock(true), vue.createElementBlock(
  3337. vue.Fragment,
  3338. null,
  3339. vue.renderList(_ctx.serviceList, (item) => {
  3340. return vue.openBlock(), vue.createElementBlock("view", {
  3341. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3342. key: item.id,
  3343. onClick: ($event) => _ctx.selectService(item.id)
  3344. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3345. }),
  3346. 128
  3347. /* KEYED_FRAGMENT */
  3348. ))
  3349. ])
  3350. ]),
  3351. vue.createElementVNode("view", { class: "filter-section" }, [
  3352. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3353. vue.createElementVNode("view", { class: "options-grid" }, [
  3354. vue.createElementVNode(
  3355. "view",
  3356. {
  3357. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3358. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3359. },
  3360. "全部",
  3361. 2
  3362. /* CLASS */
  3363. ),
  3364. vue.createElementVNode(
  3365. "view",
  3366. {
  3367. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3368. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3369. },
  3370. "100以下",
  3371. 2
  3372. /* CLASS */
  3373. ),
  3374. vue.createElementVNode(
  3375. "view",
  3376. {
  3377. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3378. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3379. },
  3380. "100-200",
  3381. 2
  3382. /* CLASS */
  3383. ),
  3384. vue.createElementVNode(
  3385. "view",
  3386. {
  3387. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3388. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3389. },
  3390. "200-500",
  3391. 2
  3392. /* CLASS */
  3393. ),
  3394. vue.createElementVNode(
  3395. "view",
  3396. {
  3397. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3398. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3399. },
  3400. "500以上",
  3401. 2
  3402. /* CLASS */
  3403. )
  3404. ])
  3405. ]),
  3406. vue.createElementVNode("view", { class: "filter-actions" }, [
  3407. vue.createElementVNode("button", {
  3408. class: "action-btn reset",
  3409. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3410. }, "重置"),
  3411. vue.createElementVNode("button", {
  3412. class: "action-btn confirm",
  3413. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3414. }, "确认")
  3415. ])
  3416. ],
  3417. 2
  3418. /* CLASS */
  3419. )
  3420. ]),
  3421. vue.createElementVNode("view", { class: "task-list-container" }, [
  3422. vue.createElementVNode("view", { class: "task-list" }, [
  3423. (vue.openBlock(true), vue.createElementBlock(
  3424. vue.Fragment,
  3425. null,
  3426. vue.renderList(_ctx.taskList, (item) => {
  3427. return vue.openBlock(), vue.createElementBlock("view", {
  3428. class: "task-card",
  3429. key: item.id,
  3430. onClick: ($event) => _ctx.goToDetail(item)
  3431. }, [
  3432. vue.createElementVNode("view", { class: "card-header" }, [
  3433. vue.createElementVNode("view", { class: "type-badge" }, [
  3434. vue.createElementVNode("image", {
  3435. class: "type-icon",
  3436. src: item.typeIcon
  3437. }, null, 8, ["src"]),
  3438. vue.createElementVNode(
  3439. "text",
  3440. { class: "type-text" },
  3441. vue.toDisplayString(item.typeText),
  3442. 1
  3443. /* TEXT */
  3444. )
  3445. ]),
  3446. vue.createElementVNode(
  3447. "text",
  3448. { class: "price" },
  3449. "¥" + vue.toDisplayString(item.price),
  3450. 1
  3451. /* TEXT */
  3452. )
  3453. ]),
  3454. vue.createElementVNode("view", { class: "card-body" }, [
  3455. vue.createElementVNode("view", { class: "time-row" }, [
  3456. vue.createElementVNode(
  3457. "text",
  3458. { class: "label" },
  3459. vue.toDisplayString(item.timeLabel) + ":",
  3460. 1
  3461. /* TEXT */
  3462. ),
  3463. vue.createElementVNode(
  3464. "text",
  3465. { class: "value" },
  3466. vue.toDisplayString(item.time),
  3467. 1
  3468. /* TEXT */
  3469. )
  3470. ]),
  3471. vue.createElementVNode("view", { class: "pet-card" }, [
  3472. vue.createElementVNode("image", {
  3473. class: "pet-avatar",
  3474. src: item.petAvatarUrl || item.petAvatar,
  3475. mode: "aspectFill"
  3476. }, null, 8, ["src"]),
  3477. vue.createElementVNode("view", { class: "pet-info" }, [
  3478. vue.createElementVNode(
  3479. "text",
  3480. { class: "pet-name" },
  3481. vue.toDisplayString(item.petName),
  3482. 1
  3483. /* TEXT */
  3484. ),
  3485. vue.createElementVNode(
  3486. "text",
  3487. { class: "pet-breed" },
  3488. "品种: " + vue.toDisplayString(item.petBreed),
  3489. 1
  3490. /* TEXT */
  3491. )
  3492. ])
  3493. ]),
  3494. vue.createElementVNode("view", { class: "route-info" }, [
  3495. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3496. vue.Fragment,
  3497. { key: 0 },
  3498. [
  3499. vue.createElementVNode("view", {
  3500. class: "route-item",
  3501. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3502. }, [
  3503. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  3504. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3505. vue.createElementVNode("view", { class: "address-box" }, [
  3506. vue.createElementVNode(
  3507. "text",
  3508. { class: "addr-title" },
  3509. vue.toDisplayString(item.startLocation),
  3510. 1
  3511. /* TEXT */
  3512. ),
  3513. vue.createElementVNode(
  3514. "text",
  3515. { class: "addr-desc" },
  3516. vue.toDisplayString(item.startAddress),
  3517. 1
  3518. /* TEXT */
  3519. )
  3520. ]),
  3521. vue.createElementVNode("image", {
  3522. class: "nav-arrow",
  3523. src: _imports_3$2,
  3524. style: { "flex-shrink": "0", "align-self": "center" }
  3525. })
  3526. ], 8, ["onClick"]),
  3527. vue.createElementVNode("view", {
  3528. class: "route-item",
  3529. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3530. }, [
  3531. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  3532. vue.createElementVNode("view", { class: "address-box" }, [
  3533. vue.createElementVNode(
  3534. "text",
  3535. { class: "addr-title" },
  3536. vue.toDisplayString(item.endLocation),
  3537. 1
  3538. /* TEXT */
  3539. ),
  3540. vue.createElementVNode(
  3541. "text",
  3542. { class: "addr-desc" },
  3543. vue.toDisplayString(item.endAddress),
  3544. 1
  3545. /* TEXT */
  3546. )
  3547. ]),
  3548. vue.createElementVNode("image", {
  3549. class: "nav-arrow",
  3550. src: _imports_3$2,
  3551. style: { "flex-shrink": "0", "align-self": "center" }
  3552. })
  3553. ], 8, ["onClick"])
  3554. ],
  3555. 64
  3556. /* STABLE_FRAGMENT */
  3557. )) : (vue.openBlock(), vue.createElementBlock(
  3558. vue.Fragment,
  3559. { key: 1 },
  3560. [
  3561. vue.createElementVNode("view", {
  3562. class: "route-item",
  3563. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3564. }, [
  3565. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3566. vue.createElementVNode("view", { class: "address-box" }, [
  3567. vue.createElementVNode(
  3568. "text",
  3569. { class: "addr-title" },
  3570. vue.toDisplayString(item.endLocation),
  3571. 1
  3572. /* TEXT */
  3573. ),
  3574. vue.createElementVNode(
  3575. "text",
  3576. { class: "addr-desc" },
  3577. vue.toDisplayString(item.endAddress),
  3578. 1
  3579. /* TEXT */
  3580. )
  3581. ]),
  3582. vue.createElementVNode("image", {
  3583. class: "nav-arrow",
  3584. src: _imports_3$2,
  3585. style: { "flex-shrink": "0", "align-self": "center" }
  3586. })
  3587. ], 8, ["onClick"]),
  3588. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3589. key: 0,
  3590. class: "service-content"
  3591. }, [
  3592. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3593. vue.createElementVNode(
  3594. "text",
  3595. null,
  3596. vue.toDisplayString(item.serviceContent),
  3597. 1
  3598. /* TEXT */
  3599. )
  3600. ])) : vue.createCommentVNode("v-if", true)
  3601. ],
  3602. 64
  3603. /* STABLE_FRAGMENT */
  3604. ))
  3605. ]),
  3606. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3607. key: 0,
  3608. class: "remark-box"
  3609. }, [
  3610. vue.createElementVNode(
  3611. "text",
  3612. null,
  3613. "备注:" + vue.toDisplayString(item.remark),
  3614. 1
  3615. /* TEXT */
  3616. )
  3617. ])) : vue.createCommentVNode("v-if", true)
  3618. ]),
  3619. vue.createElementVNode("view", { class: "action-btns" }, [
  3620. vue.createElementVNode("button", {
  3621. class: "btn reject",
  3622. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3623. }, "拒绝", 8, ["onClick"]),
  3624. vue.createElementVNode("button", {
  3625. class: "btn accept",
  3626. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3627. }, "接单", 8, ["onClick"])
  3628. ])
  3629. ], 8, ["onClick"]);
  3630. }),
  3631. 128
  3632. /* KEYED_FRAGMENT */
  3633. )),
  3634. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3635. ])
  3636. ]),
  3637. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3638. key: 0,
  3639. class: "modal-mask"
  3640. }, [
  3641. vue.createElementVNode("view", { class: "custom-modal" }, [
  3642. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3643. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3644. vue.createElementVNode("view", { class: "modal-btns" }, [
  3645. vue.createElementVNode("button", {
  3646. class: "modal-btn cancel",
  3647. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3648. }, "取消"),
  3649. vue.createElementVNode("button", {
  3650. class: "modal-btn confirm",
  3651. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3652. }, "确定")
  3653. ])
  3654. ])
  3655. ])) : vue.createCommentVNode("v-if", true),
  3656. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3657. key: 1,
  3658. class: "pet-modal-mask",
  3659. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3660. }, [
  3661. vue.createElementVNode("view", {
  3662. class: "pet-modal-content",
  3663. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3664. }, ["stop"]))
  3665. }, [
  3666. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3667. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3668. vue.createElementVNode("view", {
  3669. class: "close-icon-btn",
  3670. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3671. }, "×")
  3672. ]),
  3673. vue.createElementVNode("scroll-view", {
  3674. "scroll-y": "",
  3675. class: "pet-modal-scroll"
  3676. }, [
  3677. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3678. vue.createElementVNode("image", {
  3679. class: "pm-avatar",
  3680. src: _ctx.currentPetInfo.petAvatar,
  3681. mode: "aspectFill"
  3682. }, null, 8, ["src"]),
  3683. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3684. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3685. vue.createElementVNode(
  3686. "text",
  3687. { class: "pm-name" },
  3688. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3689. 1
  3690. /* TEXT */
  3691. ),
  3692. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3693. key: 0,
  3694. class: "pm-gender"
  3695. }, [
  3696. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3697. vue.createElementVNode("text", null, "公")
  3698. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3699. key: 1,
  3700. class: "pm-gender female"
  3701. }, [
  3702. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3703. vue.createElementVNode("text", null, "母")
  3704. ])) : vue.createCommentVNode("v-if", true)
  3705. ]),
  3706. vue.createElementVNode(
  3707. "text",
  3708. { class: "pm-breed" },
  3709. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3710. 1
  3711. /* TEXT */
  3712. )
  3713. ])
  3714. ]),
  3715. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3716. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3717. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3718. vue.createElementVNode(
  3719. "text",
  3720. { class: "pm-val" },
  3721. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3722. 1
  3723. /* TEXT */
  3724. )
  3725. ]),
  3726. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3727. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3728. vue.createElementVNode(
  3729. "text",
  3730. { class: "pm-val" },
  3731. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3732. 1
  3733. /* TEXT */
  3734. )
  3735. ]),
  3736. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3737. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3738. vue.createElementVNode(
  3739. "text",
  3740. { class: "pm-val" },
  3741. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3742. 1
  3743. /* TEXT */
  3744. )
  3745. ]),
  3746. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3747. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3748. vue.createElementVNode(
  3749. "text",
  3750. { class: "pm-val" },
  3751. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3752. 1
  3753. /* TEXT */
  3754. )
  3755. ]),
  3756. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3757. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3758. vue.createElementVNode(
  3759. "text",
  3760. { class: "pm-val" },
  3761. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3762. 1
  3763. /* TEXT */
  3764. )
  3765. ])
  3766. ]),
  3767. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3768. key: 0,
  3769. class: "pm-tags"
  3770. }, [
  3771. (vue.openBlock(true), vue.createElementBlock(
  3772. vue.Fragment,
  3773. null,
  3774. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3775. return vue.openBlock(), vue.createElementBlock(
  3776. "view",
  3777. {
  3778. class: "pm-tag",
  3779. key: index
  3780. },
  3781. vue.toDisplayString(tag),
  3782. 1
  3783. /* TEXT */
  3784. );
  3785. }),
  3786. 128
  3787. /* KEYED_FRAGMENT */
  3788. ))
  3789. ])) : vue.createCommentVNode("v-if", true),
  3790. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3791. vue.createElementVNode("view", { class: "orange-bar" }),
  3792. vue.createElementVNode("text", null, "备注日志")
  3793. ]),
  3794. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3795. (vue.openBlock(true), vue.createElementBlock(
  3796. vue.Fragment,
  3797. null,
  3798. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3799. return vue.openBlock(), vue.createElementBlock("view", {
  3800. class: "pm-log-item",
  3801. key: lIndex
  3802. }, [
  3803. vue.createElementVNode(
  3804. "text",
  3805. { class: "pm-log-date" },
  3806. vue.toDisplayString(log.date),
  3807. 1
  3808. /* TEXT */
  3809. ),
  3810. vue.createElementVNode(
  3811. "text",
  3812. { class: "pm-log-text" },
  3813. vue.toDisplayString(log.content),
  3814. 1
  3815. /* TEXT */
  3816. ),
  3817. vue.createElementVNode(
  3818. "text",
  3819. { class: "pm-log-recorder" },
  3820. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3821. 1
  3822. /* TEXT */
  3823. )
  3824. ]);
  3825. }),
  3826. 128
  3827. /* KEYED_FRAGMENT */
  3828. ))
  3829. ]),
  3830. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3831. vue.createElementVNode("button", {
  3832. class: "pm-bottom-close",
  3833. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3834. }, "关闭"),
  3835. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3836. ])
  3837. ])
  3838. ])) : vue.createCommentVNode("v-if", true)
  3839. ]),
  3840. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3841. key: 0,
  3842. class: "modal-mask"
  3843. }, [
  3844. vue.createElementVNode("view", { class: "custom-modal" }, [
  3845. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3846. vue.withDirectives(vue.createElementVNode(
  3847. "textarea",
  3848. {
  3849. class: "reject-textarea",
  3850. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3851. placeholder: "请输入拒绝理由(必填)",
  3852. maxlength: "100"
  3853. },
  3854. null,
  3855. 512
  3856. /* NEED_PATCH */
  3857. ), [
  3858. [vue.vModelText, _ctx.rejectReason]
  3859. ]),
  3860. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3861. vue.createElementVNode("button", {
  3862. class: "modal-btn cancel",
  3863. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3864. }, "取消"),
  3865. vue.createElementVNode("button", {
  3866. class: "modal-btn confirm",
  3867. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3868. }, "提交")
  3869. ])
  3870. ])
  3871. ])) : vue.createCommentVNode("v-if", true),
  3872. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3873. key: 1,
  3874. class: "modal-mask"
  3875. }, [
  3876. vue.createElementVNode("view", { class: "custom-modal" }, [
  3877. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3878. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3879. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3880. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3881. ]),
  3882. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3883. vue.createElementVNode("button", {
  3884. class: "modal-btn cancel",
  3885. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3886. }, "再想想"),
  3887. vue.createElementVNode("button", {
  3888. class: "modal-btn confirm",
  3889. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3890. }, "确认接单")
  3891. ])
  3892. ])
  3893. ])) : vue.createCommentVNode("v-if", true),
  3894. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3895. key: 2,
  3896. class: "nav-modal-mask",
  3897. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3898. }, [
  3899. vue.createElementVNode("view", {
  3900. class: "nav-action-sheet",
  3901. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3902. }, ["stop"]))
  3903. }, [
  3904. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3905. vue.createElementVNode("view", {
  3906. class: "nav-sheet-item",
  3907. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3908. }, "高德地图"),
  3909. vue.createElementVNode("view", {
  3910. class: "nav-sheet-item",
  3911. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3912. }, "腾讯地图"),
  3913. vue.createElementVNode("view", {
  3914. class: "nav-sheet-item",
  3915. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3916. }, "百度地图"),
  3917. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3918. vue.createElementVNode("view", {
  3919. class: "nav-sheet-item cancel",
  3920. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3921. }, "取消")
  3922. ])
  3923. ])) : vue.createCommentVNode("v-if", true),
  3924. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3925. ],
  3926. 64
  3927. /* STABLE_FRAGMENT */
  3928. );
  3929. }
  3930. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3931. const _sfc_main$t = {
  3932. data() {
  3933. return {
  3934. status: "resting",
  3935. // resting | busy | disabled
  3936. loading: false
  3937. };
  3938. },
  3939. onShow() {
  3940. const savedStatus = uni.getStorageSync("workStatus");
  3941. if (savedStatus) {
  3942. this.status = savedStatus;
  3943. }
  3944. this.fetchLatestProfile();
  3945. },
  3946. methods: {
  3947. async fetchLatestProfile() {
  3948. try {
  3949. const res = await getMyProfile();
  3950. if (res.data && res.data.status) {
  3951. this.status = res.data.status;
  3952. uni.setStorageSync("workStatus", this.status);
  3953. }
  3954. } catch (err) {
  3955. formatAppLog("error", "at pages/home/work-status.vue:64", "获取状态失败:", err);
  3956. }
  3957. },
  3958. async toggleStatus() {
  3959. if (this.loading)
  3960. return;
  3961. const targetStatus = this.status === "busy" ? "resting" : "busy";
  3962. const actionText = targetStatus === "busy" ? "恢复接单" : "停止接单";
  3963. try {
  3964. uni.showLoading({ title: "处理中...", mask: true });
  3965. this.loading = true;
  3966. await updateStatus(targetStatus);
  3967. await this.fetchLatestProfile();
  3968. uni.hideLoading();
  3969. uni.showToast({ title: actionText + "成功", icon: "success" });
  3970. } catch (err) {
  3971. uni.hideLoading();
  3972. formatAppLog("error", "at pages/home/work-status.vue:88", "切换状态失败:", err);
  3973. uni.showToast({ title: "操作失败,请重试", icon: "none" });
  3974. } finally {
  3975. this.loading = false;
  3976. }
  3977. }
  3978. }
  3979. };
  3980. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  3981. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3982. vue.createElementVNode("view", { class: "signboard-container" }, [
  3983. vue.createElementVNode("view", { class: "rope" }),
  3984. vue.createElementVNode("view", { class: "nail" }),
  3985. vue.createElementVNode(
  3986. "view",
  3987. {
  3988. class: vue.normalizeClass(["board", { "resting": $data.status !== "busy" }])
  3989. },
  3990. [
  3991. vue.createElementVNode("view", { class: "screw top-left" }),
  3992. vue.createElementVNode("view", { class: "screw top-right" }),
  3993. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3994. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3995. vue.createElementVNode("view", { class: "board-inner" }, [
  3996. vue.createElementVNode(
  3997. "text",
  3998. { class: "status-text" },
  3999. vue.toDisplayString($data.status === "busy" ? "接单中" : "休息中"),
  4000. 1
  4001. /* TEXT */
  4002. )
  4003. ])
  4004. ],
  4005. 2
  4006. /* CLASS */
  4007. )
  4008. ]),
  4009. vue.createElementVNode("view", { class: "status-desc" }, [
  4010. vue.createElementVNode(
  4011. "text",
  4012. null,
  4013. vue.toDisplayString($data.status === "busy" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  4014. 1
  4015. /* TEXT */
  4016. )
  4017. ]),
  4018. vue.createElementVNode("view", { class: "action-area" }, [
  4019. vue.createElementVNode(
  4020. "button",
  4021. {
  4022. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "busy", "start": $data.status !== "busy" }]),
  4023. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  4024. },
  4025. vue.toDisplayString($data.status === "busy" ? "停止接单" : "开始接单"),
  4026. 3
  4027. /* TEXT, CLASS */
  4028. ),
  4029. vue.createElementVNode("view", { class: "tips" }, [
  4030. $data.status === "busy" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  4031. ])
  4032. ])
  4033. ]);
  4034. }
  4035. 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"]]);
  4036. const logic$2 = {
  4037. components: {
  4038. customTabbar
  4039. },
  4040. data() {
  4041. return {
  4042. currentTab: 0,
  4043. tabs: ["待接送/服务", "配送/服务中", "已完成", "已取消"],
  4044. typeFilterOptions: ["全部类型"],
  4045. currentTypeFilterIdx: 0,
  4046. activeDropdown: 0,
  4047. hasTimeFilter: false,
  4048. currentMonth: "2026年2月",
  4049. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  4050. calendarDays: [],
  4051. selectedDateRange: [],
  4052. allOrderList: [],
  4053. serviceList: [],
  4054. searchContent: "",
  4055. startServiceTime: "",
  4056. endServiceTime: "",
  4057. showPetModal: false,
  4058. currentPetInfo: {},
  4059. showNavModal: false,
  4060. navTargetItem: null,
  4061. navTargetPointType: "",
  4062. activeCallItem: null,
  4063. showRemarkInput: false,
  4064. remarkText: ""
  4065. };
  4066. },
  4067. created() {
  4068. this.initCalendar();
  4069. },
  4070. async onLoad() {
  4071. await this.loadServiceList();
  4072. await this.loadOrders();
  4073. },
  4074. onShow() {
  4075. uni.hideTabBar();
  4076. this.loadOrders();
  4077. },
  4078. async onPullDownRefresh() {
  4079. try {
  4080. await this.loadServiceList();
  4081. await this.loadOrders();
  4082. } finally {
  4083. uni.stopPullDownRefresh();
  4084. }
  4085. },
  4086. watch: {
  4087. currentTab() {
  4088. this.loadOrders();
  4089. },
  4090. currentTypeFilterIdx() {
  4091. this.loadOrders();
  4092. },
  4093. searchContent() {
  4094. this.loadOrders();
  4095. }
  4096. },
  4097. computed: {
  4098. orderList() {
  4099. return this.allOrderList;
  4100. }
  4101. },
  4102. methods: {
  4103. async loadServiceList() {
  4104. try {
  4105. const res = await listAllService();
  4106. this.serviceList = res.data || [];
  4107. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  4108. } catch (err) {
  4109. formatAppLog("error", "at pages/orders/logic.js:81", "获取服务类型失败:", err);
  4110. }
  4111. },
  4112. async loadOrders() {
  4113. var _a;
  4114. try {
  4115. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  4116. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  4117. const params = {
  4118. status: statusMap[this.currentTab],
  4119. content: this.searchContent || void 0,
  4120. service: serviceId,
  4121. startServiceTime: this.startServiceTime || void 0,
  4122. endServiceTime: this.endServiceTime || void 0
  4123. };
  4124. formatAppLog("log", "at pages/orders/logic.js:95", "订单列表请求参数:", params);
  4125. const res = await getMyOrders(params);
  4126. formatAppLog("log", "at pages/orders/logic.js:97", "订单列表响应:", res);
  4127. const orders = res.rows || [];
  4128. formatAppLog("log", "at pages/orders/logic.js:99", "订单数量:", orders.length);
  4129. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  4130. } catch (err) {
  4131. formatAppLog("error", "at pages/orders/logic.js:102", "获取订单列表失败:", err);
  4132. this.allOrderList = [];
  4133. }
  4134. },
  4135. transformOrder(order, tabIndex) {
  4136. const service = this.serviceList.find((s) => s.id === order.service);
  4137. const serviceText = (service == null ? void 0 : service.name) || "未知";
  4138. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  4139. const mode = (service == null ? void 0 : service.mode) || 0;
  4140. const isRoundTrip = mode === 1;
  4141. let statusText = "接单";
  4142. if (tabIndex === 0) {
  4143. statusText = "接单";
  4144. } else if (tabIndex === 1) {
  4145. statusText = isRoundTrip ? "出发" : "开始";
  4146. } else if (tabIndex === 2) {
  4147. statusText = "已完成";
  4148. } else if (tabIndex === 3) {
  4149. statusText = "已拒绝";
  4150. }
  4151. return {
  4152. id: order.id,
  4153. status: order.status,
  4154. // 保存原始 status 用于判断权限
  4155. type: isRoundTrip ? 1 : 2,
  4156. typeText: serviceText,
  4157. typeIcon: serviceIcon,
  4158. statusText,
  4159. price: (order.price / 100).toFixed(2),
  4160. timeLabel: "服务时间",
  4161. time: order.serviceTime || "",
  4162. petAvatar: order.petAvatar || "/static/dog.png",
  4163. petAvatarUrl: order.petAvatarUrl || "",
  4164. petName: order.petName || "",
  4165. petBreed: order.breed || "",
  4166. startLocation: order.fromAddress || "暂无起点",
  4167. startAddress: order.fromAddress || "",
  4168. fromAddress: order.fromAddress || "",
  4169. fromLat: order.fromLat,
  4170. fromLng: order.fromLng,
  4171. startDistance: "0km",
  4172. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  4173. endAddress: order.toAddress || "",
  4174. toAddress: order.toAddress || "",
  4175. toLat: order.toLat,
  4176. toLng: order.toLng,
  4177. customerPhone: order.customerPhone || "",
  4178. endDistance: "0km",
  4179. serviceContent: order.remark || "",
  4180. remark: order.remark || ""
  4181. };
  4182. },
  4183. getDisplayStatus(item) {
  4184. if (item.statusText === "已完成")
  4185. return "已完成";
  4186. if (item.statusText === "已拒绝")
  4187. return "已拒绝";
  4188. if (item.statusText === "接单") {
  4189. return item.type === 1 ? "待接送" : "待服务";
  4190. }
  4191. return item.type === 1 ? "配送中" : "服务中";
  4192. },
  4193. getStatusClass(item) {
  4194. let display = this.getDisplayStatus(item);
  4195. if (display === "已完成")
  4196. return "finish";
  4197. if (display === "已拒绝")
  4198. return "reject";
  4199. if (display === "配送中" || display === "服务中")
  4200. return "processing";
  4201. return "highlight";
  4202. },
  4203. goToDetail(item) {
  4204. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4205. },
  4206. showPetProfile(item) {
  4207. this.currentPetInfo = {
  4208. ...item,
  4209. petGender: "M",
  4210. petAge: "2岁",
  4211. petWeight: "15kg",
  4212. petPersonality: "活泼亲人,精力旺盛",
  4213. petHobby: "喜欢追飞盘,爱吃肉干",
  4214. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4215. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4216. petLogs: [
  4217. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4218. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4219. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4220. ]
  4221. };
  4222. this.showPetModal = true;
  4223. },
  4224. closePetProfile() {
  4225. this.showPetModal = false;
  4226. },
  4227. openNavigation(item, pointType) {
  4228. this.navTargetItem = item;
  4229. this.navTargetPointType = pointType;
  4230. this.showNavModal = true;
  4231. },
  4232. closeNavModal() {
  4233. this.showNavModal = false;
  4234. },
  4235. chooseMap(mapType) {
  4236. let item = this.navTargetItem;
  4237. let pointType = this.navTargetPointType;
  4238. let name = pointType === "start" ? item.fromAddress || "起点" : item.toAddress || "终点";
  4239. let address = pointType === "start" ? item.fromAddress || "起点地址" : item.toAddress || "终点地址";
  4240. let latitude = pointType === "start" ? Number(item.fromLat) : Number(item.toLat);
  4241. let longitude = pointType === "start" ? Number(item.fromLng) : Number(item.toLng);
  4242. this.showNavModal = false;
  4243. const navigateTo = (lat, lng, addrName, addrDesc) => {
  4244. uni.openLocation({
  4245. latitude: lat,
  4246. longitude: lng,
  4247. name: addrName,
  4248. address: addrDesc || "无法获取详细地址",
  4249. success: function() {
  4250. formatAppLog("log", "at pages/orders/logic.js:221", "打开导航成功: " + mapType);
  4251. },
  4252. fail: function(err) {
  4253. formatAppLog("error", "at pages/orders/logic.js:224", "打开导航失败:", err);
  4254. uni.showToast({ title: "打开地图失败", icon: "none" });
  4255. }
  4256. });
  4257. };
  4258. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  4259. navigateTo(latitude, longitude, name, address);
  4260. } else {
  4261. uni.showLoading({ title: "获取当前位置...", mask: true });
  4262. uni.getLocation({
  4263. type: "gcj02",
  4264. success: (res) => {
  4265. uni.hideLoading();
  4266. navigateTo(res.latitude, res.longitude, name, address);
  4267. },
  4268. fail: (err) => {
  4269. uni.hideLoading();
  4270. formatAppLog("error", "at pages/orders/logic.js:245", "获取地理位置失败:", err);
  4271. uni.showToast({ title: "无法获取当前位置信息", icon: "none" });
  4272. }
  4273. });
  4274. }
  4275. },
  4276. toggleCallMenu(item) {
  4277. if (this.activeCallItem === item) {
  4278. this.activeCallItem = null;
  4279. } else {
  4280. this.activeCallItem = item;
  4281. }
  4282. },
  4283. closeCallMenu() {
  4284. this.activeCallItem = null;
  4285. },
  4286. doCall(type, item) {
  4287. let phoneNum = "";
  4288. const targetItem = item || this.activeCallItem;
  4289. if (type === "merchant") {
  4290. phoneNum = "18900008451";
  4291. } else if (type === "customer") {
  4292. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4293. }
  4294. if (phoneNum) {
  4295. uni.makePhoneCall({ phoneNumber: phoneNum });
  4296. }
  4297. this.activeCallItem = null;
  4298. },
  4299. reportAbnormal(item) {
  4300. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4301. },
  4302. toggleDropdown(idx) {
  4303. if (this.activeDropdown === idx) {
  4304. this.activeDropdown = 0;
  4305. } else {
  4306. this.activeDropdown = idx;
  4307. }
  4308. },
  4309. closeDropdown() {
  4310. this.activeDropdown = 0;
  4311. },
  4312. selectType(index) {
  4313. this.currentTypeFilterIdx = index;
  4314. this.closeDropdown();
  4315. },
  4316. initCalendar() {
  4317. let days = [];
  4318. for (let i = 1; i <= 28; i++) {
  4319. days.push(i);
  4320. }
  4321. this.calendarDays = days;
  4322. this.selectedDateRange = [2, 4];
  4323. },
  4324. prevMonth() {
  4325. uni.showToast({ title: "上个月", icon: "none" });
  4326. },
  4327. nextMonth() {
  4328. uni.showToast({ title: "下个月", icon: "none" });
  4329. },
  4330. selectDateItem(day) {
  4331. if (this.selectedDateRange.length === 2) {
  4332. this.selectedDateRange = [day];
  4333. } else if (this.selectedDateRange.length === 1) {
  4334. let start = this.selectedDateRange[0];
  4335. if (day > start) {
  4336. this.selectedDateRange = [start, day];
  4337. } else if (day < start) {
  4338. this.selectedDateRange = [day, start];
  4339. } else {
  4340. this.selectedDateRange = [];
  4341. }
  4342. } else {
  4343. this.selectedDateRange = [day];
  4344. }
  4345. },
  4346. getDateClass(day) {
  4347. if (this.selectedDateRange.length === 0)
  4348. return "";
  4349. if (this.selectedDateRange.length === 1) {
  4350. return day === this.selectedDateRange[0] ? "is-start" : "";
  4351. }
  4352. let start = this.selectedDateRange[0];
  4353. let end = this.selectedDateRange[1];
  4354. if (day === start)
  4355. return "is-start";
  4356. if (day === end)
  4357. return "is-end";
  4358. if (day > start && day < end)
  4359. return "is-between";
  4360. return "";
  4361. },
  4362. resetTimeFilter() {
  4363. this.hasTimeFilter = false;
  4364. this.selectedDateRange = [];
  4365. this.startServiceTime = "";
  4366. this.endServiceTime = "";
  4367. this.closeDropdown();
  4368. this.loadOrders();
  4369. },
  4370. confirmTimeFilter() {
  4371. if (this.selectedDateRange.length === 0) {
  4372. uni.showToast({ title: "请先选择日期", icon: "none" });
  4373. return;
  4374. }
  4375. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4376. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4377. const pad = (n) => String(n).padStart(2, "0");
  4378. if (this.selectedDateRange.length === 2) {
  4379. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4380. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4381. } else {
  4382. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4383. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4384. }
  4385. this.hasTimeFilter = true;
  4386. this.closeDropdown();
  4387. this.loadOrders();
  4388. },
  4389. getMainActionText(item) {
  4390. return "查看详情";
  4391. },
  4392. mainAction(item) {
  4393. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4394. },
  4395. openRemarkInput() {
  4396. this.remarkText = "";
  4397. this.showRemarkInput = true;
  4398. },
  4399. closeRemarkInput() {
  4400. this.showRemarkInput = false;
  4401. this.remarkText = "";
  4402. },
  4403. submitRemark() {
  4404. const text = this.remarkText.trim();
  4405. if (!text) {
  4406. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4407. return;
  4408. }
  4409. const now = /* @__PURE__ */ new Date();
  4410. 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")}`;
  4411. if (!this.currentPetInfo.petLogs) {
  4412. this.$set(this.currentPetInfo, "petLogs", []);
  4413. }
  4414. this.currentPetInfo.petLogs.unshift({
  4415. date: dateStr,
  4416. content: text,
  4417. recorder: "我"
  4418. });
  4419. uni.showToast({ title: "备注已添加", icon: "success" });
  4420. this.closeRemarkInput();
  4421. },
  4422. /**
  4423. * 取消订单处理逻辑
  4424. * @param {Object} item - 订单项
  4425. */
  4426. handleCancelOrder(item) {
  4427. uni.showModal({
  4428. title: "提示",
  4429. content: "确认是否取消这个订单?",
  4430. success: async (res) => {
  4431. if (res.confirm) {
  4432. try {
  4433. uni.showLoading({ title: "取消中...", mask: true });
  4434. await cancelOrderApi({ orderId: item.id });
  4435. uni.showToast({ title: "订单已取消", icon: "success" });
  4436. setTimeout(() => {
  4437. this.loadOrders();
  4438. }, 1500);
  4439. } catch (err) {
  4440. formatAppLog("error", "at pages/orders/logic.js:409", "取消订单失败:", err);
  4441. uni.showToast({ title: "取消失败", icon: "none" });
  4442. } finally {
  4443. uni.hideLoading();
  4444. }
  4445. }
  4446. }
  4447. });
  4448. }
  4449. }
  4450. };
  4451. const _sfc_main$s = {
  4452. ...logic$2
  4453. };
  4454. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  4455. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4456. return vue.openBlock(), vue.createElementBlock(
  4457. vue.Fragment,
  4458. null,
  4459. [
  4460. vue.createElementVNode("view", { class: "container" }, [
  4461. vue.createElementVNode("view", { class: "sticky-header" }, [
  4462. vue.createElementVNode("view", { class: "status-tabs" }, [
  4463. (vue.openBlock(true), vue.createElementBlock(
  4464. vue.Fragment,
  4465. null,
  4466. vue.renderList(_ctx.tabs, (tab, index) => {
  4467. return vue.openBlock(), vue.createElementBlock("view", {
  4468. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4469. key: index,
  4470. onClick: ($event) => _ctx.currentTab = index
  4471. }, [
  4472. vue.createElementVNode(
  4473. "text",
  4474. null,
  4475. vue.toDisplayString(tab),
  4476. 1
  4477. /* TEXT */
  4478. ),
  4479. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4480. key: 0,
  4481. class: "indicator"
  4482. })) : vue.createCommentVNode("v-if", true)
  4483. ], 10, ["onClick"]);
  4484. }),
  4485. 128
  4486. /* KEYED_FRAGMENT */
  4487. ))
  4488. ]),
  4489. vue.createElementVNode("view", { class: "search-bar" }, [
  4490. vue.createElementVNode("view", { class: "search-input-box" }, [
  4491. vue.withDirectives(vue.createElementVNode(
  4492. "input",
  4493. {
  4494. class: "search-input",
  4495. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4496. placeholder: "搜索地址/电话/姓名",
  4497. "placeholder-class": "ph-style"
  4498. },
  4499. null,
  4500. 512
  4501. /* NEED_PATCH */
  4502. ), [
  4503. [vue.vModelText, _ctx.searchContent]
  4504. ])
  4505. ])
  4506. ]),
  4507. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4508. vue.createElementVNode("view", { class: "filter-bar" }, [
  4509. vue.createElementVNode(
  4510. "view",
  4511. {
  4512. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4513. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4514. },
  4515. [
  4516. vue.createElementVNode(
  4517. "text",
  4518. {
  4519. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4520. },
  4521. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4522. 3
  4523. /* TEXT, CLASS */
  4524. ),
  4525. vue.createElementVNode(
  4526. "view",
  4527. {
  4528. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4529. },
  4530. null,
  4531. 2
  4532. /* CLASS */
  4533. )
  4534. ],
  4535. 2
  4536. /* CLASS */
  4537. ),
  4538. vue.createElementVNode(
  4539. "view",
  4540. {
  4541. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4542. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4543. },
  4544. [
  4545. vue.createElementVNode(
  4546. "text",
  4547. {
  4548. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4549. },
  4550. "服务时间",
  4551. 2
  4552. /* CLASS */
  4553. ),
  4554. vue.createElementVNode(
  4555. "view",
  4556. {
  4557. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4558. },
  4559. null,
  4560. 2
  4561. /* CLASS */
  4562. )
  4563. ],
  4564. 2
  4565. /* CLASS */
  4566. )
  4567. ]),
  4568. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4569. key: 0,
  4570. class: "dropdown-mask",
  4571. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4572. })) : vue.createCommentVNode("v-if", true),
  4573. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4574. key: 1,
  4575. class: "dropdown-panel"
  4576. }, [
  4577. (vue.openBlock(true), vue.createElementBlock(
  4578. vue.Fragment,
  4579. null,
  4580. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4581. return vue.openBlock(), vue.createElementBlock("view", {
  4582. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4583. key: index,
  4584. onClick: ($event) => _ctx.selectType(index)
  4585. }, [
  4586. vue.createElementVNode(
  4587. "text",
  4588. null,
  4589. vue.toDisplayString(item),
  4590. 1
  4591. /* TEXT */
  4592. )
  4593. ], 10, ["onClick"]);
  4594. }),
  4595. 128
  4596. /* KEYED_FRAGMENT */
  4597. ))
  4598. ])) : vue.createCommentVNode("v-if", true),
  4599. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4600. key: 2,
  4601. class: "dropdown-panel calendar-panel"
  4602. }, [
  4603. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4604. vue.createElementVNode("view", { class: "cal-header" }, [
  4605. vue.createElementVNode("text", {
  4606. class: "cal-nav-btn",
  4607. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4608. }, "‹"),
  4609. vue.createElementVNode(
  4610. "text",
  4611. { class: "cal-title" },
  4612. vue.toDisplayString(_ctx.currentMonth),
  4613. 1
  4614. /* TEXT */
  4615. ),
  4616. vue.createElementVNode("text", {
  4617. class: "cal-nav-btn",
  4618. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4619. }, "›")
  4620. ]),
  4621. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4622. (vue.openBlock(true), vue.createElementBlock(
  4623. vue.Fragment,
  4624. null,
  4625. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4626. return vue.openBlock(), vue.createElementBlock(
  4627. "text",
  4628. {
  4629. key: idx,
  4630. class: "wk-item"
  4631. },
  4632. vue.toDisplayString(wk),
  4633. 1
  4634. /* TEXT */
  4635. );
  4636. }),
  4637. 128
  4638. /* KEYED_FRAGMENT */
  4639. ))
  4640. ]),
  4641. vue.createElementVNode("view", { class: "cal-body" }, [
  4642. (vue.openBlock(true), vue.createElementBlock(
  4643. vue.Fragment,
  4644. null,
  4645. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4646. return vue.openBlock(), vue.createElementBlock("view", {
  4647. key: idx,
  4648. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4649. onClick: ($event) => _ctx.selectDateItem(day)
  4650. }, [
  4651. vue.createElementVNode(
  4652. "view",
  4653. { class: "cal-day-text" },
  4654. vue.toDisplayString(day),
  4655. 1
  4656. /* TEXT */
  4657. )
  4658. ], 10, ["onClick"]);
  4659. }),
  4660. 128
  4661. /* KEYED_FRAGMENT */
  4662. ))
  4663. ])
  4664. ]),
  4665. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4666. vue.createElementVNode("button", {
  4667. class: "cal-btn reset",
  4668. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4669. }, "重置"),
  4670. vue.createElementVNode("button", {
  4671. class: "cal-btn confirm",
  4672. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4673. }, "确定")
  4674. ])
  4675. ])) : vue.createCommentVNode("v-if", true)
  4676. ])
  4677. ]),
  4678. vue.createElementVNode("view", { class: "order-list" }, [
  4679. (vue.openBlock(true), vue.createElementBlock(
  4680. vue.Fragment,
  4681. null,
  4682. vue.renderList(_ctx.orderList, (item, index) => {
  4683. return vue.openBlock(), vue.createElementBlock("view", {
  4684. class: "order-card",
  4685. key: index,
  4686. onClick: ($event) => _ctx.goToDetail(item)
  4687. }, [
  4688. vue.createElementVNode("view", { class: "card-header" }, [
  4689. vue.createElementVNode("view", { class: "type-badge" }, [
  4690. vue.createElementVNode("image", {
  4691. class: "type-icon",
  4692. src: item.typeIcon
  4693. }, null, 8, ["src"]),
  4694. vue.createElementVNode(
  4695. "text",
  4696. { class: "type-text" },
  4697. vue.toDisplayString(item.typeText),
  4698. 1
  4699. /* TEXT */
  4700. )
  4701. ]),
  4702. vue.createElementVNode(
  4703. "text",
  4704. {
  4705. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4706. },
  4707. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4708. 3
  4709. /* TEXT, CLASS */
  4710. )
  4711. ]),
  4712. vue.createElementVNode("view", { class: "card-body" }, [
  4713. vue.createElementVNode("view", { class: "time-row" }, [
  4714. vue.createElementVNode("view", { class: "time-col" }, [
  4715. vue.createElementVNode(
  4716. "text",
  4717. { class: "label" },
  4718. vue.toDisplayString(item.timeLabel) + ":",
  4719. 1
  4720. /* TEXT */
  4721. ),
  4722. vue.createElementVNode(
  4723. "text",
  4724. { class: "value" },
  4725. vue.toDisplayString(item.time),
  4726. 1
  4727. /* TEXT */
  4728. )
  4729. ]),
  4730. vue.createElementVNode(
  4731. "text",
  4732. { class: "price" },
  4733. "¥" + vue.toDisplayString(item.price),
  4734. 1
  4735. /* TEXT */
  4736. )
  4737. ]),
  4738. vue.createElementVNode("view", { class: "pet-card" }, [
  4739. vue.createElementVNode("image", {
  4740. class: "pet-avatar",
  4741. src: item.petAvatarUrl || item.petAvatar,
  4742. mode: "aspectFill"
  4743. }, null, 8, ["src"]),
  4744. vue.createElementVNode("view", { class: "pet-info" }, [
  4745. vue.createElementVNode(
  4746. "text",
  4747. { class: "pet-name" },
  4748. vue.toDisplayString(item.petName),
  4749. 1
  4750. /* TEXT */
  4751. ),
  4752. vue.createElementVNode(
  4753. "text",
  4754. { class: "pet-breed" },
  4755. "品种: " + vue.toDisplayString(item.petBreed),
  4756. 1
  4757. /* TEXT */
  4758. )
  4759. ])
  4760. ]),
  4761. vue.createElementVNode("view", { class: "route-info" }, [
  4762. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4763. vue.Fragment,
  4764. { key: 0 },
  4765. [
  4766. vue.createElementVNode("view", {
  4767. class: "route-item",
  4768. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4769. }, [
  4770. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  4771. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4772. vue.createElementVNode("view", { class: "address-box" }, [
  4773. vue.createElementVNode(
  4774. "text",
  4775. { class: "addr-title" },
  4776. vue.toDisplayString(item.startLocation),
  4777. 1
  4778. /* TEXT */
  4779. ),
  4780. vue.createElementVNode(
  4781. "text",
  4782. { class: "addr-desc" },
  4783. vue.toDisplayString(item.startAddress),
  4784. 1
  4785. /* TEXT */
  4786. )
  4787. ]),
  4788. vue.createElementVNode("image", {
  4789. class: "nav-arrow",
  4790. src: _imports_3$2,
  4791. style: { "flex-shrink": "0", "align-self": "center" }
  4792. })
  4793. ], 8, ["onClick"]),
  4794. vue.createElementVNode("view", {
  4795. class: "route-item",
  4796. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4797. }, [
  4798. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  4799. vue.createElementVNode("view", { class: "address-box" }, [
  4800. vue.createElementVNode(
  4801. "text",
  4802. { class: "addr-title" },
  4803. vue.toDisplayString(item.endLocation),
  4804. 1
  4805. /* TEXT */
  4806. ),
  4807. vue.createElementVNode(
  4808. "text",
  4809. { class: "addr-desc" },
  4810. vue.toDisplayString(item.endAddress),
  4811. 1
  4812. /* TEXT */
  4813. )
  4814. ]),
  4815. vue.createElementVNode("image", {
  4816. class: "nav-arrow",
  4817. src: _imports_3$2,
  4818. style: { "flex-shrink": "0", "align-self": "center" }
  4819. })
  4820. ], 8, ["onClick"])
  4821. ],
  4822. 64
  4823. /* STABLE_FRAGMENT */
  4824. )) : (vue.openBlock(), vue.createElementBlock(
  4825. vue.Fragment,
  4826. { key: 1 },
  4827. [
  4828. vue.createElementVNode("view", {
  4829. class: "route-item",
  4830. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4831. }, [
  4832. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4833. vue.createElementVNode("view", { class: "address-box" }, [
  4834. vue.createElementVNode(
  4835. "text",
  4836. { class: "addr-title" },
  4837. vue.toDisplayString(item.endLocation),
  4838. 1
  4839. /* TEXT */
  4840. ),
  4841. vue.createElementVNode(
  4842. "text",
  4843. { class: "addr-desc" },
  4844. vue.toDisplayString(item.endAddress),
  4845. 1
  4846. /* TEXT */
  4847. )
  4848. ]),
  4849. vue.createElementVNode("image", {
  4850. class: "nav-arrow",
  4851. src: _imports_3$2,
  4852. style: { "flex-shrink": "0", "align-self": "center" }
  4853. })
  4854. ], 8, ["onClick"]),
  4855. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4856. key: 0,
  4857. class: "service-content"
  4858. }, [
  4859. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4860. vue.createElementVNode(
  4861. "text",
  4862. null,
  4863. vue.toDisplayString(item.serviceContent),
  4864. 1
  4865. /* TEXT */
  4866. )
  4867. ])) : vue.createCommentVNode("v-if", true)
  4868. ],
  4869. 64
  4870. /* STABLE_FRAGMENT */
  4871. ))
  4872. ]),
  4873. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4874. key: 0,
  4875. class: "remark-box"
  4876. }, [
  4877. vue.createElementVNode(
  4878. "text",
  4879. null,
  4880. "备注:" + vue.toDisplayString(item.remark),
  4881. 1
  4882. /* TEXT */
  4883. )
  4884. ])) : vue.createCommentVNode("v-if", true)
  4885. ]),
  4886. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4887. key: 0,
  4888. class: "action-btns"
  4889. }, [
  4890. vue.createElementVNode("view", { class: "action-left" }, [
  4891. vue.createElementVNode("button", {
  4892. class: "btn normal",
  4893. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4894. }, "拨号", 8, ["onClick"])
  4895. ]),
  4896. vue.createElementVNode("view", { class: "action-right" }, [
  4897. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4898. key: 0,
  4899. class: "btn normal danger",
  4900. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4901. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4902. vue.createElementVNode("button", {
  4903. class: "btn normal",
  4904. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4905. }, "异常上报", 8, ["onClick"]),
  4906. vue.createElementVNode("button", {
  4907. class: "btn primary",
  4908. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4909. }, "打卡", 8, ["onClick"])
  4910. ])
  4911. ])) : vue.createCommentVNode("v-if", true)
  4912. ], 8, ["onClick"]);
  4913. }),
  4914. 128
  4915. /* KEYED_FRAGMENT */
  4916. )),
  4917. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4918. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4919. ]),
  4920. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4921. key: 0,
  4922. class: "call-mask",
  4923. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4924. })) : vue.createCommentVNode("v-if", true)
  4925. ]),
  4926. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4927. key: 0,
  4928. class: "pet-modal-mask",
  4929. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4930. }, [
  4931. vue.createElementVNode("view", {
  4932. class: "pet-modal-content",
  4933. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4934. }, ["stop"]))
  4935. }, [
  4936. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4937. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4938. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4939. vue.createElementVNode("view", {
  4940. class: "pm-remark-btn",
  4941. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4942. }, "备注"),
  4943. vue.createElementVNode("view", {
  4944. class: "close-icon-btn",
  4945. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4946. }, "×")
  4947. ])
  4948. ]),
  4949. vue.createElementVNode("scroll-view", {
  4950. "scroll-y": "",
  4951. class: "pet-modal-scroll"
  4952. }, [
  4953. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4954. vue.createElementVNode("image", {
  4955. class: "pm-avatar",
  4956. src: _ctx.currentPetInfo.petAvatar,
  4957. mode: "aspectFill"
  4958. }, null, 8, ["src"]),
  4959. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4960. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4961. vue.createElementVNode(
  4962. "text",
  4963. { class: "pm-name" },
  4964. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4965. 1
  4966. /* TEXT */
  4967. ),
  4968. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4969. key: 0,
  4970. class: "pm-gender"
  4971. }, [
  4972. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4973. vue.createElementVNode("text", null, "公")
  4974. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4975. key: 1,
  4976. class: "pm-gender female"
  4977. }, [
  4978. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4979. vue.createElementVNode("text", null, "母")
  4980. ])) : vue.createCommentVNode("v-if", true)
  4981. ]),
  4982. vue.createElementVNode(
  4983. "text",
  4984. { class: "pm-breed" },
  4985. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4986. 1
  4987. /* TEXT */
  4988. )
  4989. ])
  4990. ]),
  4991. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4992. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4993. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4994. vue.createElementVNode(
  4995. "text",
  4996. { class: "pm-val" },
  4997. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4998. 1
  4999. /* TEXT */
  5000. )
  5001. ]),
  5002. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  5003. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  5004. vue.createElementVNode(
  5005. "text",
  5006. { class: "pm-val" },
  5007. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  5008. 1
  5009. /* TEXT */
  5010. )
  5011. ]),
  5012. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5013. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  5014. vue.createElementVNode(
  5015. "text",
  5016. { class: "pm-val" },
  5017. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  5018. 1
  5019. /* TEXT */
  5020. )
  5021. ]),
  5022. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5023. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  5024. vue.createElementVNode(
  5025. "text",
  5026. { class: "pm-val" },
  5027. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  5028. 1
  5029. /* TEXT */
  5030. )
  5031. ]),
  5032. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  5033. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  5034. vue.createElementVNode(
  5035. "text",
  5036. { class: "pm-val" },
  5037. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  5038. 1
  5039. /* TEXT */
  5040. )
  5041. ])
  5042. ]),
  5043. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  5044. key: 0,
  5045. class: "pm-tags"
  5046. }, [
  5047. (vue.openBlock(true), vue.createElementBlock(
  5048. vue.Fragment,
  5049. null,
  5050. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  5051. return vue.openBlock(), vue.createElementBlock(
  5052. "view",
  5053. {
  5054. class: "pm-tag",
  5055. key: index
  5056. },
  5057. vue.toDisplayString(tag),
  5058. 1
  5059. /* TEXT */
  5060. );
  5061. }),
  5062. 128
  5063. /* KEYED_FRAGMENT */
  5064. ))
  5065. ])) : vue.createCommentVNode("v-if", true),
  5066. vue.createElementVNode("view", { class: "pm-section-title" }, [
  5067. vue.createElementVNode("view", { class: "orange-bar" }),
  5068. vue.createElementVNode("text", null, "备注日志")
  5069. ]),
  5070. vue.createElementVNode("view", { class: "pm-log-list" }, [
  5071. (vue.openBlock(true), vue.createElementBlock(
  5072. vue.Fragment,
  5073. null,
  5074. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  5075. return vue.openBlock(), vue.createElementBlock("view", {
  5076. class: "pm-log-item",
  5077. key: lIndex
  5078. }, [
  5079. vue.createElementVNode(
  5080. "text",
  5081. { class: "pm-log-date" },
  5082. vue.toDisplayString(log.date),
  5083. 1
  5084. /* TEXT */
  5085. ),
  5086. vue.createElementVNode(
  5087. "text",
  5088. { class: "pm-log-text" },
  5089. vue.toDisplayString(log.content),
  5090. 1
  5091. /* TEXT */
  5092. ),
  5093. vue.createElementVNode(
  5094. "text",
  5095. { class: "pm-log-recorder" },
  5096. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  5097. 1
  5098. /* TEXT */
  5099. )
  5100. ]);
  5101. }),
  5102. 128
  5103. /* KEYED_FRAGMENT */
  5104. ))
  5105. ]),
  5106. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  5107. ])
  5108. ])
  5109. ])) : vue.createCommentVNode("v-if", true),
  5110. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  5111. key: 1,
  5112. class: "remark-mask",
  5113. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5114. }, [
  5115. vue.createElementVNode("view", {
  5116. class: "remark-sheet",
  5117. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  5118. }, ["stop"]))
  5119. }, [
  5120. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  5121. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  5122. vue.createElementVNode("view", {
  5123. class: "close-icon-btn",
  5124. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5125. }, "×")
  5126. ]),
  5127. vue.withDirectives(vue.createElementVNode(
  5128. "textarea",
  5129. {
  5130. class: "remark-textarea",
  5131. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  5132. placeholder: "请输入备注内容...",
  5133. maxlength: "500",
  5134. "auto-height": ""
  5135. },
  5136. null,
  5137. 512
  5138. /* NEED_PATCH */
  5139. ), [
  5140. [vue.vModelText, _ctx.remarkText]
  5141. ]),
  5142. vue.createElementVNode("view", {
  5143. class: "remark-submit-btn",
  5144. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  5145. }, "提交备注")
  5146. ])
  5147. ])) : vue.createCommentVNode("v-if", true),
  5148. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  5149. key: 2,
  5150. class: "nav-modal-mask",
  5151. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5152. }, [
  5153. vue.createElementVNode("view", {
  5154. class: "nav-action-sheet",
  5155. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  5156. }, ["stop"]))
  5157. }, [
  5158. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  5159. vue.createElementVNode("view", {
  5160. class: "nav-sheet-item",
  5161. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  5162. }, "高德地图"),
  5163. vue.createElementVNode("view", {
  5164. class: "nav-sheet-item",
  5165. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  5166. }, "腾讯地图"),
  5167. vue.createElementVNode("view", {
  5168. class: "nav-sheet-item",
  5169. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  5170. }, "百度地图"),
  5171. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  5172. vue.createElementVNode("view", {
  5173. class: "nav-sheet-item cancel",
  5174. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5175. }, "取消")
  5176. ])
  5177. ])) : vue.createCommentVNode("v-if", true),
  5178. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  5179. ],
  5180. 64
  5181. /* STABLE_FRAGMENT */
  5182. );
  5183. }
  5184. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  5185. function getOrderStats() {
  5186. return request({
  5187. url: "/order/subOrderLog/count",
  5188. method: "GET"
  5189. });
  5190. }
  5191. function getOrderLogs(orderId) {
  5192. return request({
  5193. url: `/order/subOrderLog/list?orderId=${orderId}`,
  5194. method: "GET"
  5195. });
  5196. }
  5197. function uploadAnamaly(data) {
  5198. return request({
  5199. url: "/fulfiller/anamaly/upload",
  5200. method: "POST",
  5201. data
  5202. });
  5203. }
  5204. function getAnomalyList(orderId) {
  5205. return request({
  5206. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  5207. method: "GET"
  5208. });
  5209. }
  5210. function getDictDataByType(dictType) {
  5211. return request({
  5212. url: `/system/dict/data/type/${dictType}`,
  5213. method: "GET"
  5214. });
  5215. }
  5216. function getPetDetail(id) {
  5217. return request({
  5218. url: `/archieves/pet/${id}`,
  5219. method: "GET"
  5220. });
  5221. }
  5222. function submitPetRemark(data) {
  5223. return request({
  5224. url: "/archieves/pet/remark",
  5225. method: "POST",
  5226. data
  5227. });
  5228. }
  5229. function listChangeLog(params) {
  5230. return request({
  5231. url: "/archieves/changeLog/listAll",
  5232. method: "GET",
  5233. data: params
  5234. });
  5235. }
  5236. const logic$1 = {
  5237. data() {
  5238. return {
  5239. orderId: null,
  5240. pageLoading: true,
  5241. // 页面数据加载中
  5242. orderType: 1,
  5243. orderStatus: 2,
  5244. serviceId: null,
  5245. // 当前订单的服务类型ID
  5246. serviceMode: null,
  5247. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  5248. petId: null,
  5249. // 当前订单关联的宠物ID
  5250. petDetail: null,
  5251. // 宠物档案详情
  5252. // 从后端 clockInRemark 解析出的打卡步骤列表
  5253. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5254. clockInSteps: [],
  5255. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5256. currentClockIn: null,
  5257. currentStep: 0,
  5258. orderDetail: {
  5259. type: 1,
  5260. price: "0.00",
  5261. timeLabel: "服务时间",
  5262. time: "",
  5263. petAvatar: "/static/dog.png",
  5264. petName: "",
  5265. petBreed: "",
  5266. serviceTag: "",
  5267. startLocation: "",
  5268. startAddress: "",
  5269. endAddress: "",
  5270. customerPhone: "",
  5271. serviceContent: "",
  5272. remark: "",
  5273. orderNo: "",
  5274. createTime: "",
  5275. serviceName: "",
  5276. // 服务类型名称
  5277. progressLogs: [],
  5278. nursingSummary: ""
  5279. // 宠护小结
  5280. },
  5281. serviceList: [],
  5282. showPetModal: false,
  5283. currentPetInfo: {},
  5284. showNavModal: false,
  5285. navTargetPointType: "",
  5286. showUploadModal: false,
  5287. modalMediaList: [],
  5288. modalRemark: "",
  5289. showSumModal: false,
  5290. sumContent: "",
  5291. sumDate: "",
  5292. sumSigner: "未知",
  5293. showPetRemarkInput: false,
  5294. petRemarkText: "",
  5295. showAnomalyModal: false,
  5296. anomalyList: [],
  5297. anomalyTypeDict: [],
  5298. // 媒体预览相关
  5299. videoPlayerShow: false,
  5300. videoPlayerUrl: ""
  5301. };
  5302. },
  5303. computed: {
  5304. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5305. steps() {
  5306. if (this.clockInSteps.length > 0) {
  5307. return this.clockInSteps.map((s) => s.title);
  5308. }
  5309. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5310. },
  5311. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5312. progressSteps() {
  5313. return ["已接单", ...this.steps, "订单完成"];
  5314. },
  5315. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5316. progressIndex() {
  5317. return this.currentStep + 1;
  5318. },
  5319. displayStatusText() {
  5320. if (this.currentStep >= this.steps.length)
  5321. return "已完成";
  5322. if (this.currentStep > 0) {
  5323. return this.orderType === 1 ? "配送中" : "服务中";
  5324. }
  5325. return this.orderType === 1 ? "待接送" : "待服务";
  5326. },
  5327. currentStatusText() {
  5328. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5329. },
  5330. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5331. currentTaskTitle() {
  5332. if (this.currentStep >= this.steps.length)
  5333. return "订单已完成";
  5334. if (this.currentClockIn) {
  5335. return this.currentClockIn.title;
  5336. }
  5337. return this.steps[this.currentStep] || "打卡";
  5338. },
  5339. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5340. currentTaskDesc() {
  5341. if (this.currentStep >= this.steps.length)
  5342. return "感谢您的服务,请注意休息";
  5343. if (this.currentClockIn && this.currentClockIn.remark) {
  5344. return this.currentClockIn.remark;
  5345. }
  5346. return "请按要求提交照片或视频及备注";
  5347. }
  5348. },
  5349. async onLoad(options) {
  5350. if (options.id) {
  5351. this.orderId = options.id;
  5352. }
  5353. this.pageLoading = true;
  5354. try {
  5355. await this.loadAnomalyTypeDict();
  5356. await this.loadServiceList();
  5357. await this.loadOrderDetail();
  5358. } finally {
  5359. this.pageLoading = false;
  5360. }
  5361. },
  5362. methods: {
  5363. async loadServiceList() {
  5364. try {
  5365. const res = await listAllService();
  5366. this.serviceList = res.data || [];
  5367. } catch (err) {
  5368. formatAppLog("error", "at pages/orders/detail-logic.js:155", "获取服务类型失败:", err);
  5369. }
  5370. },
  5371. /**
  5372. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5373. */
  5374. /**
  5375. * 基于已加载的 serviceList 进行前端匹配,解析 clockInRemark 为打卡步骤
  5376. */
  5377. loadServiceDetail(serviceId) {
  5378. formatAppLog("log", "at pages/orders/detail-logic.js:165", "前端匹配服务详情, ID:", serviceId);
  5379. const serviceInfo = (this.serviceList || []).find((s) => s.id === serviceId);
  5380. formatAppLog("log", "at pages/orders/detail-logic.js:167", "匹配到的服务信息:", serviceInfo);
  5381. if (serviceInfo) {
  5382. this.serviceMode = serviceInfo.mode;
  5383. this.orderDetail.serviceName = serviceInfo.name;
  5384. formatAppLog("log", "at pages/orders/detail-logic.js:171", "当前服务模式(mode):", this.serviceMode);
  5385. if (serviceInfo.clockInRemark) {
  5386. try {
  5387. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5388. if (Array.isArray(parsed) && parsed.length > 0) {
  5389. this.clockInSteps = parsed;
  5390. formatAppLog("log", "at pages/orders/detail-logic.js:177", "解析打卡步骤:", this.clockInSteps);
  5391. }
  5392. } catch (parseErr) {
  5393. formatAppLog("error", "at pages/orders/detail-logic.js:180", "解析 clockInRemark 失败:", parseErr);
  5394. }
  5395. }
  5396. }
  5397. },
  5398. async loadOrderDetail() {
  5399. if (!this.orderId) {
  5400. formatAppLog("log", "at pages/orders/detail-logic.js:187", "订单ID缺失");
  5401. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5402. return;
  5403. }
  5404. try {
  5405. formatAppLog("log", "at pages/orders/detail-logic.js:192", "请求订单详情,ID:", this.orderId);
  5406. const res = await getOrderInfo(this.orderId);
  5407. formatAppLog("log", "at pages/orders/detail-logic.js:194", "订单详情响应:", res);
  5408. const order = res.data;
  5409. if (!order) {
  5410. formatAppLog("log", "at pages/orders/detail-logic.js:197", "订单数据为空");
  5411. uni.showToast({ title: "订单不存在", icon: "none" });
  5412. return;
  5413. }
  5414. formatAppLog("log", "at pages/orders/detail-logic.js:201", "订单数据:", order);
  5415. this.serviceId = order.service;
  5416. this.petId = order.usrPet || null;
  5417. this.transformOrderData(order);
  5418. formatAppLog("log", "at pages/orders/detail-logic.js:205", "解析出的 serviceId:", this.serviceId);
  5419. if (this.serviceId) {
  5420. this.loadServiceDetail(this.serviceId);
  5421. } else {
  5422. formatAppLog("warn", "at pages/orders/detail-logic.js:211", "订单中未找到 service 字段,无法加载服务步骤");
  5423. }
  5424. if (this.petId) {
  5425. await this.loadPetDetail(this.petId);
  5426. }
  5427. await this.loadOrderLogs();
  5428. } catch (err) {
  5429. formatAppLog("error", "at pages/orders/detail-logic.js:222", "获取订单详情失败:", err);
  5430. uni.showToast({ title: "加载失败", icon: "none" });
  5431. }
  5432. },
  5433. async loadOrderLogs() {
  5434. try {
  5435. const res = await getOrderLogs(this.orderId);
  5436. const logs = res.data || [];
  5437. formatAppLog("log", "at pages/orders/detail-logic.js:230", "订单日志:", logs);
  5438. const progressLogs = logs.filter((log) => log.logType === 1);
  5439. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5440. status: log.title || "",
  5441. time: log.createTime || "",
  5442. medias: log.photoUrls || [],
  5443. remark: log.content || ""
  5444. }));
  5445. 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());
  5446. if (validLogs.length > 0) {
  5447. const latestLog = validLogs[0];
  5448. const latestStep = latestLog.step;
  5449. formatAppLog("log", "at pages/orders/detail-logic.js:249", "最新打卡日志 step:", latestStep);
  5450. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5451. if (stepIndex >= 0) {
  5452. this.currentStep = stepIndex + 1;
  5453. } else {
  5454. this.currentStep = Number(latestStep);
  5455. }
  5456. } else {
  5457. this.currentStep = 0;
  5458. }
  5459. this.updateCurrentClockIn();
  5460. formatAppLog("log", "at pages/orders/detail-logic.js:265", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5461. } catch (err) {
  5462. formatAppLog("error", "at pages/orders/detail-logic.js:267", "获取订单日志失败:", err);
  5463. }
  5464. },
  5465. /**
  5466. * 根据 currentStep 更新当前打卡信息
  5467. */
  5468. updateCurrentClockIn() {
  5469. if (this.currentStep < this.clockInSteps.length) {
  5470. this.currentClockIn = this.clockInSteps[this.currentStep];
  5471. } else {
  5472. this.currentClockIn = null;
  5473. }
  5474. },
  5475. transformOrderData(order) {
  5476. const mode = order.mode || 0;
  5477. const isRoundTrip = mode === 1;
  5478. this.orderType = isRoundTrip ? 1 : 2;
  5479. this.orderStatus = order.status || 2;
  5480. this.orderDetail = {
  5481. type: this.orderType,
  5482. price: (order.price / 100).toFixed(2),
  5483. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5484. time: order.serviceTime || "",
  5485. petAvatar: "/static/dog.png",
  5486. petName: order.petName || order.contact || "",
  5487. petBreed: order.breed || "",
  5488. serviceTag: order.groupPurchasePackageName || "",
  5489. startLocation: order.fromAddress || "暂无起点",
  5490. startAddress: order.fromAddress || "",
  5491. fromAddress: order.fromAddress || "",
  5492. fromLat: order.fromLat,
  5493. fromLng: order.fromLng,
  5494. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5495. endAddress: order.toAddress || "",
  5496. toAddress: order.toAddress || "",
  5497. toLat: order.toLat,
  5498. toLng: order.toLng,
  5499. customerPhone: order.contactPhoneNumber || "",
  5500. ownerName: order.contact || "",
  5501. // 宠主姓名(默认使用客户姓名)
  5502. serviceContent: "",
  5503. remark: "",
  5504. orderNo: order.code || "T" + order.id,
  5505. createTime: order.serviceTime || "",
  5506. nursingSummary: order.nursingSummary || "",
  5507. fulfillerName: order.fulfillerName || "",
  5508. // 履约者/护宠师姓名
  5509. progressLogs: [
  5510. { status: "您已接单", time: order.serviceTime || "" }
  5511. ]
  5512. };
  5513. if (this.orderDetail.fulfillerName) {
  5514. this.sumSigner = this.orderDetail.fulfillerName;
  5515. }
  5516. },
  5517. /**
  5518. * 根据宠物ID获取宠物档案详情
  5519. */
  5520. async loadPetDetail(petId) {
  5521. try {
  5522. const res = await getPetDetail(petId);
  5523. const pet = res.data;
  5524. if (pet) {
  5525. this.petDetail = pet;
  5526. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5527. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5528. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5529. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5530. formatAppLog("log", "at pages/orders/detail-logic.js:338", "宠物档案:", pet);
  5531. }
  5532. } catch (err) {
  5533. formatAppLog("error", "at pages/orders/detail-logic.js:341", "获取宠物档案失败:", err);
  5534. }
  5535. },
  5536. /**
  5537. * 加载异常记录列表
  5538. */
  5539. async loadAnomalyList() {
  5540. if (!this.orderId)
  5541. return;
  5542. try {
  5543. const res = await getAnomalyList(this.orderId);
  5544. const list = res.data || [];
  5545. this.anomalyList = list.map((item) => {
  5546. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5547. return {
  5548. ...item,
  5549. typeLabel: dict ? dict.label : item.type,
  5550. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5551. photoUrls: item.photoUrls || []
  5552. };
  5553. });
  5554. } catch (err) {
  5555. formatAppLog("error", "at pages/orders/detail-logic.js:364", "获取异常列表失败:", err);
  5556. }
  5557. },
  5558. async loadAnomalyTypeDict() {
  5559. try {
  5560. const res = await getDictDataByType("flf_anamaly_type");
  5561. this.anomalyTypeDict = res.data.map((item) => ({
  5562. label: item.dictLabel,
  5563. value: item.dictValue
  5564. }));
  5565. } catch (err) {
  5566. formatAppLog("error", "at pages/orders/detail-logic.js:375", "获取异常字典失败:", err);
  5567. }
  5568. },
  5569. openAnomalyModal() {
  5570. this.showAnomalyModal = true;
  5571. this.loadAnomalyList();
  5572. },
  5573. closeAnomalyModal() {
  5574. this.showAnomalyModal = false;
  5575. },
  5576. getAnomalyStatusLabel(status) {
  5577. const map = {
  5578. 0: "待审核",
  5579. 1: "已通过",
  5580. 2: "已驳回"
  5581. };
  5582. return map[status] || "未知";
  5583. },
  5584. updateStepByStatus() {
  5585. if (this.orderStatus === 2) {
  5586. this.currentStep = 0;
  5587. } else if (this.orderStatus === 3) {
  5588. this.currentStep = 1;
  5589. } else if (this.orderStatus === 4) {
  5590. this.currentStep = this.steps.length - 1;
  5591. } else {
  5592. this.currentStep = 0;
  5593. }
  5594. },
  5595. showPetProfile() {
  5596. const pet = this.petDetail;
  5597. if (pet) {
  5598. this.currentPetInfo = {
  5599. petAvatar: pet.avatarUrl || "/static/dog.png",
  5600. petName: pet.name || "",
  5601. petBreed: pet.breed || "",
  5602. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5603. petAge: pet.age ? pet.age + "岁" : "未知",
  5604. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5605. petPersonality: pet.personality || pet.cutePersonality || "无",
  5606. petHobby: "",
  5607. petRemark: pet.remark || "无",
  5608. petTags: (pet.tags || []).map((t) => t.name),
  5609. petLogs: [],
  5610. // 额外信息
  5611. petSize: pet.size || "",
  5612. petIsSterilized: pet.isSterilized,
  5613. petHealthStatus: pet.healthStatus || "",
  5614. petAllergies: pet.allergies || "",
  5615. petMedicalHistory: pet.medicalHistory || "",
  5616. petVaccineStatus: pet.vaccineStatus || "",
  5617. ownerName: pet.ownerName || "",
  5618. ownerPhone: pet.ownerPhone || ""
  5619. };
  5620. this.loadPetChangeLogs(pet.id);
  5621. } else {
  5622. this.currentPetInfo = {
  5623. ...this.orderDetail,
  5624. petGender: "",
  5625. petAge: "未知",
  5626. petWeight: "未知",
  5627. petPersonality: "无",
  5628. petHobby: "",
  5629. petRemark: "无",
  5630. petTags: [],
  5631. petLogs: []
  5632. };
  5633. }
  5634. this.showPetModal = true;
  5635. },
  5636. async loadPetChangeLogs(petId) {
  5637. if (!petId)
  5638. return;
  5639. try {
  5640. const res = await listChangeLog({
  5641. targetId: petId,
  5642. targetType: "pet"
  5643. });
  5644. const logs = res.data || [];
  5645. this.currentPetInfo.petLogs = logs.map((item) => ({
  5646. date: item.createTime || "",
  5647. content: item.content || "",
  5648. recorder: item.operatorName || "未知"
  5649. }));
  5650. } catch (err) {
  5651. formatAppLog("error", "at pages/orders/detail-logic.js:462", "获取宠物备注列表失败:", err);
  5652. }
  5653. },
  5654. closePetProfile() {
  5655. this.showPetModal = false;
  5656. },
  5657. openPetRemarkInput() {
  5658. this.petRemarkText = "";
  5659. this.showPetRemarkInput = true;
  5660. },
  5661. closePetRemarkInput() {
  5662. this.showPetRemarkInput = false;
  5663. },
  5664. async submitPetRemark() {
  5665. if (!this.petRemarkText.trim()) {
  5666. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5667. return;
  5668. }
  5669. if (!this.petId) {
  5670. uni.showToast({ title: "宠物信息缺失", icon: "none" });
  5671. return;
  5672. }
  5673. uni.showLoading({ title: "提交中...", mask: true });
  5674. try {
  5675. await submitPetRemark({
  5676. petId: this.petId,
  5677. content: this.petRemarkText
  5678. });
  5679. uni.hideLoading();
  5680. uni.showToast({ title: "备注已添加", icon: "success" });
  5681. this.closePetRemarkInput();
  5682. this.loadPetChangeLogs(this.petId);
  5683. } catch (err) {
  5684. uni.hideLoading();
  5685. formatAppLog("error", "at pages/orders/detail-logic.js:500", "提交宠物备注失败:", err);
  5686. }
  5687. },
  5688. goToAnomaly() {
  5689. uni.navigateTo({
  5690. url: "/pages/orders/anomaly?orderId=" + (this.orderId || "")
  5691. });
  5692. },
  5693. callPhone() {
  5694. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5695. uni.makePhoneCall({ phoneNumber: phoneNum });
  5696. },
  5697. openNavigation(type) {
  5698. this.navTargetPointType = type;
  5699. this.showNavModal = true;
  5700. },
  5701. closeNavModal() {
  5702. this.showNavModal = false;
  5703. },
  5704. chooseMap(mapType) {
  5705. let pointType = this.navTargetPointType;
  5706. let name = pointType === "start" ? this.orderDetail.fromAddress || "起点" : this.orderDetail.toAddress || "终点";
  5707. let address = pointType === "start" ? this.orderDetail.fromAddress || "起点地址" : this.orderDetail.toAddress || "终点地址";
  5708. let latitude = pointType === "start" ? Number(this.orderDetail.fromLat) : Number(this.orderDetail.toLat);
  5709. let longitude = pointType === "start" ? Number(this.orderDetail.fromLng) : Number(this.orderDetail.toLng);
  5710. this.showNavModal = false;
  5711. const navigateTo = (lat, lng, addrName, addrDesc) => {
  5712. uni.openLocation({
  5713. latitude: lat,
  5714. longitude: lng,
  5715. name: addrName,
  5716. address: addrDesc || "无法获取详细地址",
  5717. success: function() {
  5718. formatAppLog("log", "at pages/orders/detail-logic.js:538", "打开导航成功: " + mapType);
  5719. },
  5720. fail: function(err) {
  5721. formatAppLog("error", "at pages/orders/detail-logic.js:541", "打开导航失败:", err);
  5722. uni.showToast({ title: "打开地图失败", icon: "none" });
  5723. }
  5724. });
  5725. };
  5726. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  5727. navigateTo(latitude, longitude, name, address);
  5728. } else {
  5729. uni.showLoading({ title: "获取当前位置...", mask: true });
  5730. uni.getLocation({
  5731. type: "gcj02",
  5732. success: (res) => {
  5733. uni.hideLoading();
  5734. navigateTo(res.latitude, res.longitude, name, address);
  5735. },
  5736. fail: (err) => {
  5737. uni.hideLoading();
  5738. formatAppLog("error", "at pages/orders/detail-logic.js:562", "获取地理位置失败:", err);
  5739. uni.showToast({ title: "无法获取当前位置信息", icon: "none" });
  5740. }
  5741. });
  5742. }
  5743. },
  5744. openUploadModal() {
  5745. this.modalMediaList = [];
  5746. this.modalRemark = "";
  5747. this.showUploadModal = true;
  5748. },
  5749. closeUploadModal() {
  5750. this.showUploadModal = false;
  5751. },
  5752. handleConfirmUpload() {
  5753. formatAppLog("log", "at pages/orders/detail-logic.js:577", "handleConfirmUpload被调用");
  5754. this.confirmUploadModal();
  5755. },
  5756. async chooseModalMedia() {
  5757. formatAppLog("log", "at pages/orders/detail-logic.js:581", "chooseModalMedia被调用");
  5758. uni.chooseMedia({
  5759. count: 5 - this.modalMediaList.length,
  5760. mediaType: ["image", "video"],
  5761. sourceType: ["album", "camera"],
  5762. success: async (res) => {
  5763. formatAppLog("log", "at pages/orders/detail-logic.js:588", "选择媒体文件成功:", res.tempFiles);
  5764. uni.showLoading({ title: "上传中...", mask: true });
  5765. try {
  5766. for (const file of res.tempFiles) {
  5767. const filePath = file.tempFilePath;
  5768. const fileType = file.fileType;
  5769. formatAppLog("log", "at pages/orders/detail-logic.js:594", "开始上传文件:", filePath, "类型:", fileType);
  5770. const uploadRes = await uploadFile(filePath);
  5771. formatAppLog("log", "at pages/orders/detail-logic.js:597", "服务器响应:", uploadRes);
  5772. if (uploadRes.code === 200) {
  5773. this.modalMediaList.push({
  5774. url: uploadRes.data.url,
  5775. ossId: uploadRes.data.ossId,
  5776. localPath: filePath,
  5777. mediaType: fileType,
  5778. thumb: file.thumbTempFilePath
  5779. // 视频缩略图(如果有)
  5780. });
  5781. formatAppLog("log", "at pages/orders/detail-logic.js:607", "媒体文件添加成功");
  5782. }
  5783. }
  5784. uni.hideLoading();
  5785. uni.showToast({ title: "上传成功", icon: "success" });
  5786. } catch (err) {
  5787. uni.hideLoading();
  5788. formatAppLog("error", "at pages/orders/detail-logic.js:614", "上传失败详情:", err);
  5789. uni.showToast({ title: "上传失败", icon: "none" });
  5790. }
  5791. },
  5792. fail: (err) => {
  5793. formatAppLog("error", "at pages/orders/detail-logic.js:619", "选择媒体文件失败:", err);
  5794. }
  5795. });
  5796. },
  5797. removeModalMedia(index) {
  5798. this.modalMediaList.splice(index, 1);
  5799. },
  5800. getCurrentTime() {
  5801. const now = /* @__PURE__ */ new Date();
  5802. const y = now.getFullYear();
  5803. const m = String(now.getMonth() + 1).padStart(2, "0");
  5804. const d = String(now.getDate()).padStart(2, "0");
  5805. const h = String(now.getHours()).padStart(2, "0");
  5806. const min = String(now.getMinutes()).padStart(2, "0");
  5807. return `${y}/${m}/${d} ${h}:${min}`;
  5808. },
  5809. async confirmUploadModal() {
  5810. formatAppLog("log", "at pages/orders/detail-logic.js:637", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5811. if (this.modalMediaList.length === 0) {
  5812. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5813. return;
  5814. }
  5815. try {
  5816. uni.showLoading({ title: "提交中..." });
  5817. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5818. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5819. formatAppLog("log", "at pages/orders/detail-logic.js:648", "准备打卡,ossIds:", ossIds);
  5820. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5821. const clockInData = {
  5822. orderId: this.orderId,
  5823. photos: ossIds,
  5824. content: this.modalRemark || "",
  5825. step: clockInType,
  5826. title: this.currentTaskTitle,
  5827. startFlag: Number(clockInType) === 1,
  5828. endFlag: Number(this.currentStep) === this.steps.length - 1
  5829. };
  5830. formatAppLog("log", "at pages/orders/detail-logic.js:663", "打卡数据:", clockInData);
  5831. await clockIn(clockInData);
  5832. uni.hideLoading();
  5833. this.closeUploadModal();
  5834. uni.showToast({ title: "打卡成功", icon: "success" });
  5835. await this.loadOrderDetail();
  5836. } catch (err) {
  5837. uni.hideLoading();
  5838. formatAppLog("error", "at pages/orders/detail-logic.js:673", "打卡失败:", err);
  5839. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5840. }
  5841. },
  5842. copyOrderNo() {
  5843. uni.setClipboardData({
  5844. data: this.orderDetail.orderNo,
  5845. success: () => {
  5846. uni.showToast({ title: "复制成功", icon: "none" });
  5847. }
  5848. });
  5849. },
  5850. openSumModal() {
  5851. let displayDate = "";
  5852. if (this.orderDetail.time) {
  5853. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5854. } else {
  5855. const now = /* @__PURE__ */ new Date();
  5856. const y = now.getFullYear();
  5857. const m = String(now.getMonth() + 1).padStart(2, "0");
  5858. const d = String(now.getDate()).padStart(2, "0");
  5859. displayDate = `${y}/${m}/${d}`;
  5860. }
  5861. this.sumDate = displayDate;
  5862. if (this.orderDetail.nursingSummary) {
  5863. this.sumContent = this.orderDetail.nursingSummary;
  5864. } else if (!this.sumContent) {
  5865. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5866. }
  5867. this.showSumModal = true;
  5868. },
  5869. closeSumModal() {
  5870. this.showSumModal = false;
  5871. },
  5872. async submitSumModal() {
  5873. if (!this.sumContent.trim()) {
  5874. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5875. return;
  5876. }
  5877. uni.showLoading({ title: "提交中...", mask: true });
  5878. try {
  5879. const res = await submitNursingSummary({
  5880. orderId: this.orderId,
  5881. content: this.sumContent
  5882. });
  5883. uni.hideLoading();
  5884. if (res.code === 200) {
  5885. uni.showToast({ title: "小结已提交", icon: "success" });
  5886. this.closeSumModal();
  5887. await this.loadOrderDetail();
  5888. } else {
  5889. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5890. }
  5891. } catch (err) {
  5892. uni.hideLoading();
  5893. formatAppLog("error", "at pages/orders/detail-logic.js:741", "提交宠护小结失败:", err);
  5894. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5895. }
  5896. },
  5897. /**
  5898. * 检查是否为视频
  5899. */
  5900. isVideo(url) {
  5901. if (!url)
  5902. return false;
  5903. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5904. const lowerUrl = url.toLowerCase();
  5905. return videoExts.some((ext) => lowerUrl.includes(ext));
  5906. },
  5907. /**
  5908. * 获取视频封面图 (第一帧)
  5909. * 兼容阿里云、腾讯云等主流 OSS
  5910. */
  5911. getVideoPoster(url) {
  5912. if (!this.isVideo(url))
  5913. return url;
  5914. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5915. return url;
  5916. }
  5917. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5918. const tencent = `?ci-process=snapshot&time=1`;
  5919. if (url.includes("myqcloud.com")) {
  5920. return url + tencent;
  5921. }
  5922. return url + aliyun;
  5923. },
  5924. /**
  5925. * 统一预览媒体
  5926. */
  5927. previewMedia(medias, currentIdx) {
  5928. const url = medias[currentIdx];
  5929. if (this.isVideo(url)) {
  5930. this.videoPlayerUrl = url;
  5931. this.videoPlayerShow = true;
  5932. } else {
  5933. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5934. const currentImgUrl = url;
  5935. const newIdx = imageUrls.indexOf(currentImgUrl);
  5936. uni.previewImage({
  5937. current: newIdx >= 0 ? newIdx : 0,
  5938. urls: imageUrls
  5939. });
  5940. }
  5941. },
  5942. closeVideoPlayer() {
  5943. this.videoPlayerShow = false;
  5944. this.videoPlayerUrl = "";
  5945. }
  5946. }
  5947. };
  5948. const _imports_12 = "/static/icons/phone_orange.svg";
  5949. const _imports_1$7 = "/static/icons/clock.svg";
  5950. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5951. const _imports_4$1 = "/static/icons/file.svg";
  5952. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5953. const _imports_6$1 = "/static/icons/order_no.svg";
  5954. const _imports_7 = "/static/icons/play_circle.svg";
  5955. const _imports_8$1 = "/static/empty-rest.png";
  5956. const _sfc_main$r = {
  5957. ...logic$1
  5958. };
  5959. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  5960. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5961. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5962. key: 0,
  5963. class: "loading-container"
  5964. }, [
  5965. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5966. vue.createElementVNode("view", {
  5967. class: "skeleton-line skeleton-ani",
  5968. style: { "width": "30%", "height": "36rpx" }
  5969. }),
  5970. vue.createElementVNode("view", {
  5971. class: "skeleton-line skeleton-ani",
  5972. style: { "width": "20%", "height": "36rpx" }
  5973. })
  5974. ]),
  5975. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5976. (vue.openBlock(), vue.createElementBlock(
  5977. vue.Fragment,
  5978. null,
  5979. vue.renderList(4, (i) => {
  5980. return vue.createElementVNode("view", {
  5981. class: "skeleton-circle skeleton-ani",
  5982. key: i
  5983. });
  5984. }),
  5985. 64
  5986. /* STABLE_FRAGMENT */
  5987. ))
  5988. ]),
  5989. (vue.openBlock(), vue.createElementBlock(
  5990. vue.Fragment,
  5991. null,
  5992. vue.renderList(3, (j) => {
  5993. return vue.createElementVNode("view", {
  5994. class: "skeleton-card",
  5995. key: "c" + j
  5996. }, [
  5997. vue.createElementVNode("view", {
  5998. class: "skeleton-line skeleton-ani",
  5999. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  6000. }),
  6001. vue.createElementVNode("view", {
  6002. class: "skeleton-line skeleton-ani",
  6003. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  6004. }),
  6005. vue.createElementVNode("view", {
  6006. class: "skeleton-line skeleton-ani",
  6007. style: { "width": "75%", "height": "24rpx" }
  6008. })
  6009. ]);
  6010. }),
  6011. 64
  6012. /* STABLE_FRAGMENT */
  6013. ))
  6014. ])) : (vue.openBlock(), vue.createElementBlock(
  6015. vue.Fragment,
  6016. { key: 1 },
  6017. [
  6018. vue.createElementVNode("view", { class: "detail-header" }, [
  6019. vue.createElementVNode("view", { class: "status-row" }, [
  6020. vue.createElementVNode(
  6021. "text",
  6022. { class: "status-title" },
  6023. vue.toDisplayString(_ctx.displayStatusText),
  6024. 1
  6025. /* TEXT */
  6026. ),
  6027. vue.createElementVNode(
  6028. "text",
  6029. { class: "status-price" },
  6030. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  6031. 1
  6032. /* TEXT */
  6033. )
  6034. ]),
  6035. vue.createElementVNode("view", { class: "progress-bar" }, [
  6036. (vue.openBlock(true), vue.createElementBlock(
  6037. vue.Fragment,
  6038. null,
  6039. vue.renderList(_ctx.progressSteps, (step, index) => {
  6040. return vue.openBlock(), vue.createElementBlock(
  6041. "view",
  6042. {
  6043. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  6044. key: index
  6045. },
  6046. [
  6047. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  6048. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  6049. "view",
  6050. {
  6051. key: 0,
  6052. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  6053. },
  6054. null,
  6055. 2
  6056. /* CLASS */
  6057. )) : vue.createCommentVNode("v-if", true),
  6058. vue.createElementVNode(
  6059. "view",
  6060. { class: "step-circle" },
  6061. vue.toDisplayString(index + 1),
  6062. 1
  6063. /* TEXT */
  6064. )
  6065. ]),
  6066. vue.createElementVNode(
  6067. "text",
  6068. { class: "step-text" },
  6069. vue.toDisplayString(step),
  6070. 1
  6071. /* TEXT */
  6072. )
  6073. ],
  6074. 2
  6075. /* CLASS */
  6076. );
  6077. }),
  6078. 128
  6079. /* KEYED_FRAGMENT */
  6080. ))
  6081. ])
  6082. ]),
  6083. vue.createElementVNode("scroll-view", {
  6084. "scroll-y": "",
  6085. class: "detail-content"
  6086. }, [
  6087. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  6088. vue.createElementVNode("image", {
  6089. class: "pb-avatar",
  6090. src: _ctx.orderDetail.petAvatar,
  6091. mode: "aspectFill"
  6092. }, null, 8, ["src"]),
  6093. vue.createElementVNode("view", { class: "pb-info" }, [
  6094. vue.createElementVNode("view", { class: "pb-name-row" }, [
  6095. vue.createElementVNode(
  6096. "text",
  6097. { class: "pb-name" },
  6098. vue.toDisplayString(_ctx.orderDetail.petName),
  6099. 1
  6100. /* TEXT */
  6101. )
  6102. ]),
  6103. vue.createElementVNode("view", { class: "pb-tags" }, [
  6104. vue.createElementVNode(
  6105. "text",
  6106. { class: "pb-tag" },
  6107. vue.toDisplayString(_ctx.orderDetail.serviceName),
  6108. 1
  6109. /* TEXT */
  6110. )
  6111. ])
  6112. ]),
  6113. vue.createElementVNode("view", { class: "pb-actions" }, [
  6114. vue.createElementVNode("view", {
  6115. class: "pb-btn profile-btn",
  6116. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  6117. }, "宠物档案"),
  6118. vue.createElementVNode("view", {
  6119. class: "pb-btn phone-btn",
  6120. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  6121. }, [
  6122. vue.createElementVNode("image", {
  6123. class: "phone-icon",
  6124. src: _imports_12
  6125. })
  6126. ])
  6127. ])
  6128. ]),
  6129. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  6130. vue.createElementVNode("view", { class: "si-row time-row" }, [
  6131. vue.createElementVNode("image", {
  6132. class: "si-icon outline",
  6133. src: _imports_1$7
  6134. }),
  6135. vue.createElementVNode("view", { class: "si-content" }, [
  6136. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  6137. vue.createElementVNode(
  6138. "text",
  6139. { class: "si-val" },
  6140. vue.toDisplayString(_ctx.orderDetail.time),
  6141. 1
  6142. /* TEXT */
  6143. )
  6144. ]),
  6145. vue.createElementVNode("view", {
  6146. class: "si-action record-btn",
  6147. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  6148. }, [
  6149. vue.createElementVNode("text", null, "异常记录"),
  6150. vue.createElementVNode("image", {
  6151. class: "record-arrow",
  6152. src: _imports_0$2
  6153. })
  6154. ])
  6155. ]),
  6156. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  6157. vue.Fragment,
  6158. { key: 0 },
  6159. [
  6160. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  6161. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  6162. vue.createElementVNode("view", { class: "route-line-vertical" }),
  6163. vue.createElementVNode("view", { class: "si-content" }, [
  6164. vue.createElementVNode(
  6165. "text",
  6166. { class: "si-addr-title" },
  6167. vue.toDisplayString(_ctx.orderDetail.startLocation),
  6168. 1
  6169. /* TEXT */
  6170. ),
  6171. vue.createElementVNode(
  6172. "text",
  6173. { class: "si-addr-desc" },
  6174. vue.toDisplayString(_ctx.orderDetail.startAddress),
  6175. 1
  6176. /* TEXT */
  6177. )
  6178. ]),
  6179. vue.createElementVNode("view", {
  6180. class: "nav-btn-circle",
  6181. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  6182. }, [
  6183. vue.createElementVNode("image", {
  6184. class: "nav-arrow",
  6185. src: _imports_3$2
  6186. })
  6187. ])
  6188. ]),
  6189. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  6190. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  6191. vue.createElementVNode("view", { class: "si-content" }, [
  6192. vue.createElementVNode(
  6193. "text",
  6194. { class: "si-addr-title" },
  6195. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6196. 1
  6197. /* TEXT */
  6198. ),
  6199. vue.createElementVNode(
  6200. "text",
  6201. { class: "si-addr-desc" },
  6202. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6203. 1
  6204. /* TEXT */
  6205. )
  6206. ]),
  6207. vue.createElementVNode("view", {
  6208. class: "nav-btn-circle",
  6209. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  6210. }, [
  6211. vue.createElementVNode("image", {
  6212. class: "nav-arrow",
  6213. src: _imports_3$2
  6214. })
  6215. ])
  6216. ])
  6217. ],
  6218. 64
  6219. /* STABLE_FRAGMENT */
  6220. )) : (vue.openBlock(), vue.createElementBlock("view", {
  6221. key: 1,
  6222. class: "si-row addr-row end-addr"
  6223. }, [
  6224. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  6225. vue.createElementVNode("view", { class: "si-content" }, [
  6226. vue.createElementVNode(
  6227. "text",
  6228. { class: "si-addr-title" },
  6229. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6230. 1
  6231. /* TEXT */
  6232. ),
  6233. vue.createElementVNode(
  6234. "text",
  6235. { class: "si-addr-desc" },
  6236. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6237. 1
  6238. /* TEXT */
  6239. )
  6240. ]),
  6241. vue.createElementVNode("view", {
  6242. class: "nav-btn-circle",
  6243. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  6244. }, [
  6245. vue.createElementVNode("image", {
  6246. class: "nav-arrow",
  6247. src: _imports_3$2
  6248. })
  6249. ])
  6250. ])),
  6251. vue.createElementVNode("view", { class: "si-row" }, [
  6252. vue.createElementVNode("image", {
  6253. class: "si-icon outline custom-icon-file",
  6254. src: _imports_4$1
  6255. }),
  6256. vue.createElementVNode("view", { class: "si-content" }, [
  6257. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  6258. vue.createElementVNode(
  6259. "text",
  6260. { class: "si-val" },
  6261. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  6262. 1
  6263. /* TEXT */
  6264. )
  6265. ])
  6266. ])
  6267. ]),
  6268. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  6269. key: 0,
  6270. class: "white-card task-card"
  6271. }, [
  6272. vue.createElementVNode(
  6273. "text",
  6274. { class: "tc-title" },
  6275. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  6276. 1
  6277. /* TEXT */
  6278. ),
  6279. vue.createElementVNode(
  6280. "text",
  6281. { class: "tc-desc" },
  6282. vue.toDisplayString(_ctx.currentTaskDesc),
  6283. 1
  6284. /* TEXT */
  6285. ),
  6286. vue.createElementVNode("view", {
  6287. class: "full-media-add",
  6288. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6289. }, [
  6290. vue.createElementVNode("image", {
  6291. class: "upload-icon-large",
  6292. src: _imports_1$6
  6293. }),
  6294. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6295. ])
  6296. ])) : vue.createCommentVNode("v-if", true),
  6297. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6298. vue.createElementVNode("view", { class: "bi-row" }, [
  6299. vue.createElementVNode("image", {
  6300. class: "si-icon outline",
  6301. src: _imports_6$1
  6302. }),
  6303. vue.createElementVNode("view", { class: "bi-content" }, [
  6304. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6305. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6306. vue.createElementVNode(
  6307. "text",
  6308. { class: "bi-val" },
  6309. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6310. 1
  6311. /* TEXT */
  6312. ),
  6313. vue.createElementVNode("text", {
  6314. class: "bi-copy",
  6315. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6316. }, "复制")
  6317. ])
  6318. ])
  6319. ]),
  6320. vue.createElementVNode("view", { class: "bi-row" }, [
  6321. vue.createElementVNode("image", {
  6322. class: "si-icon outline",
  6323. src: _imports_1$7
  6324. }),
  6325. vue.createElementVNode("view", { class: "bi-content" }, [
  6326. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6327. vue.createElementVNode(
  6328. "text",
  6329. { class: "bi-val" },
  6330. vue.toDisplayString(_ctx.orderDetail.createTime),
  6331. 1
  6332. /* TEXT */
  6333. )
  6334. ])
  6335. ])
  6336. ]),
  6337. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6338. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6339. vue.createElementVNode("view", { class: "orange-bar" }),
  6340. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6341. ]),
  6342. vue.createElementVNode("view", { class: "tl-list" }, [
  6343. (vue.openBlock(true), vue.createElementBlock(
  6344. vue.Fragment,
  6345. null,
  6346. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6347. return vue.openBlock(), vue.createElementBlock("view", {
  6348. class: "tl-item",
  6349. key: idx
  6350. }, [
  6351. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6352. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6353. ]),
  6354. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6355. vue.createElementVNode("view", { class: "tl-header" }, [
  6356. vue.createElementVNode(
  6357. "text",
  6358. { class: "tl-status" },
  6359. vue.toDisplayString(log.status),
  6360. 1
  6361. /* TEXT */
  6362. ),
  6363. vue.createElementVNode(
  6364. "text",
  6365. { class: "tl-time" },
  6366. vue.toDisplayString(log.time),
  6367. 1
  6368. /* TEXT */
  6369. )
  6370. ]),
  6371. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6372. key: 0,
  6373. class: "tl-medias"
  6374. }, [
  6375. (vue.openBlock(true), vue.createElementBlock(
  6376. vue.Fragment,
  6377. null,
  6378. vue.renderList(log.medias, (media, midx) => {
  6379. return vue.openBlock(), vue.createElementBlock("view", {
  6380. class: "tl-media-item",
  6381. key: midx,
  6382. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6383. }, [
  6384. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6385. key: 0,
  6386. class: "tl-img",
  6387. src: media,
  6388. mode: "aspectFill"
  6389. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6390. key: 1,
  6391. class: "tl-video-placeholder"
  6392. }, [
  6393. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6394. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6395. ]))
  6396. ], 8, ["onClick"]);
  6397. }),
  6398. 128
  6399. /* KEYED_FRAGMENT */
  6400. ))
  6401. ])) : vue.createCommentVNode("v-if", true),
  6402. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6403. key: 1,
  6404. class: "tl-remark"
  6405. }, [
  6406. vue.createElementVNode(
  6407. "text",
  6408. null,
  6409. vue.toDisplayString(log.remark),
  6410. 1
  6411. /* TEXT */
  6412. )
  6413. ])) : vue.createCommentVNode("v-if", true)
  6414. ])
  6415. ]);
  6416. }),
  6417. 128
  6418. /* KEYED_FRAGMENT */
  6419. ))
  6420. ])
  6421. ]),
  6422. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6423. ]),
  6424. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6425. vue.createElementVNode("view", { class: "action-left" }, [
  6426. vue.createElementVNode("button", {
  6427. class: "action-btn outline grey-outline",
  6428. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6429. }, "异常上报"),
  6430. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6431. key: 0,
  6432. class: "action-btn outline orange-outline",
  6433. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6434. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6435. ]),
  6436. vue.createElementVNode("view", { class: "action-right" }, [
  6437. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6438. "button",
  6439. {
  6440. key: 0,
  6441. class: "action-btn primary",
  6442. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6443. },
  6444. vue.toDisplayString(_ctx.currentTaskTitle),
  6445. 1
  6446. /* TEXT */
  6447. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6448. key: 1,
  6449. class: "action-btn primary grey-bg"
  6450. }, "已完成"))
  6451. ])
  6452. ]),
  6453. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6454. key: 0,
  6455. class: "pet-modal-mask",
  6456. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6457. }, [
  6458. vue.createElementVNode("view", {
  6459. class: "pet-modal-content",
  6460. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6461. }, ["stop"]))
  6462. }, [
  6463. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6464. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6465. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6466. vue.createElementVNode("view", {
  6467. class: "pm-remark-btn",
  6468. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6469. }, "备注"),
  6470. vue.createElementVNode("view", {
  6471. class: "close-icon-btn",
  6472. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6473. }, "×")
  6474. ]),
  6475. vue.createElementVNode("scroll-view", {
  6476. "scroll-y": "",
  6477. class: "pet-modal-scroll"
  6478. }, [
  6479. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6480. vue.createElementVNode("image", {
  6481. class: "pm-avatar",
  6482. src: _ctx.currentPetInfo.petAvatar,
  6483. mode: "aspectFill"
  6484. }, null, 8, ["src"]),
  6485. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6486. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6487. vue.createElementVNode(
  6488. "text",
  6489. { class: "pm-name" },
  6490. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6491. 1
  6492. /* TEXT */
  6493. ),
  6494. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6495. key: 0,
  6496. class: "pm-gender"
  6497. }, [
  6498. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6499. vue.createElementVNode("text", null, "公")
  6500. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6501. key: 1,
  6502. class: "pm-gender female"
  6503. }, [
  6504. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6505. vue.createElementVNode("text", null, "母")
  6506. ])) : vue.createCommentVNode("v-if", true)
  6507. ]),
  6508. vue.createElementVNode(
  6509. "text",
  6510. { class: "pm-breed" },
  6511. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6512. 1
  6513. /* TEXT */
  6514. )
  6515. ])
  6516. ]),
  6517. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6518. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6519. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6520. vue.createElementVNode(
  6521. "text",
  6522. { class: "pm-val" },
  6523. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6524. 1
  6525. /* TEXT */
  6526. )
  6527. ]),
  6528. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6529. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6530. vue.createElementVNode(
  6531. "text",
  6532. { class: "pm-val" },
  6533. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6534. 1
  6535. /* TEXT */
  6536. )
  6537. ]),
  6538. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6539. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6540. vue.createElementVNode(
  6541. "text",
  6542. { class: "pm-val" },
  6543. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6544. 1
  6545. /* TEXT */
  6546. )
  6547. ]),
  6548. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6549. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6550. vue.createElementVNode(
  6551. "text",
  6552. { class: "pm-val" },
  6553. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6554. 1
  6555. /* TEXT */
  6556. )
  6557. ]),
  6558. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6559. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6560. vue.createElementVNode(
  6561. "text",
  6562. { class: "pm-val" },
  6563. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6564. 1
  6565. /* TEXT */
  6566. )
  6567. ])
  6568. ]),
  6569. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6570. key: 0,
  6571. class: "pm-tags-row"
  6572. }, [
  6573. (vue.openBlock(true), vue.createElementBlock(
  6574. vue.Fragment,
  6575. null,
  6576. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6577. return vue.openBlock(), vue.createElementBlock("view", {
  6578. class: "pm-tag-chip",
  6579. key: ti
  6580. }, [
  6581. vue.createElementVNode(
  6582. "text",
  6583. { class: "pm-tag-chip-text" },
  6584. vue.toDisplayString(tag),
  6585. 1
  6586. /* TEXT */
  6587. )
  6588. ]);
  6589. }),
  6590. 128
  6591. /* KEYED_FRAGMENT */
  6592. ))
  6593. ])) : vue.createCommentVNode("v-if", true),
  6594. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6595. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6596. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6597. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6598. ]),
  6599. (vue.openBlock(true), vue.createElementBlock(
  6600. vue.Fragment,
  6601. null,
  6602. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6603. return vue.openBlock(), vue.createElementBlock("view", {
  6604. class: "pm-log-item",
  6605. key: lIndex
  6606. }, [
  6607. vue.createElementVNode(
  6608. "text",
  6609. { class: "pm-log-date" },
  6610. vue.toDisplayString(log.date),
  6611. 1
  6612. /* TEXT */
  6613. ),
  6614. vue.createElementVNode(
  6615. "text",
  6616. { class: "pm-log-text" },
  6617. vue.toDisplayString(log.content),
  6618. 1
  6619. /* TEXT */
  6620. ),
  6621. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6622. "text",
  6623. {
  6624. key: 0,
  6625. class: "pm-log-recorder"
  6626. },
  6627. "记录人:" + vue.toDisplayString(log.recorder),
  6628. 1
  6629. /* TEXT */
  6630. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6631. key: 1,
  6632. class: "pm-log-recorder system"
  6633. }, "系统记录"))
  6634. ]);
  6635. }),
  6636. 128
  6637. /* KEYED_FRAGMENT */
  6638. ))
  6639. ]),
  6640. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6641. ])
  6642. ])
  6643. ])) : vue.createCommentVNode("v-if", true),
  6644. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6645. key: 1,
  6646. class: "upload-modal-mask",
  6647. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6648. }, [
  6649. vue.createElementVNode("view", {
  6650. class: "upload-modal-content",
  6651. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6652. }, ["stop"]))
  6653. }, [
  6654. vue.createElementVNode("view", { class: "um-header" }, [
  6655. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6656. ]),
  6657. vue.createElementVNode("view", { class: "um-body" }, [
  6658. vue.withDirectives(vue.createElementVNode(
  6659. "textarea",
  6660. {
  6661. class: "um-textarea",
  6662. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6663. "auto-height": "",
  6664. placeholder: "请输入宠物备注内容...",
  6665. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6666. },
  6667. null,
  6668. 512
  6669. /* NEED_PATCH */
  6670. ), [
  6671. [vue.vModelText, _ctx.petRemarkText]
  6672. ])
  6673. ]),
  6674. vue.createElementVNode("view", { class: "um-footer" }, [
  6675. vue.createElementVNode("button", {
  6676. class: "um-submit-btn active",
  6677. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6678. }, "确认提交")
  6679. ])
  6680. ])
  6681. ])) : vue.createCommentVNode("v-if", true),
  6682. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6683. key: 2,
  6684. class: "nav-modal-mask",
  6685. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6686. }, [
  6687. vue.createElementVNode("view", {
  6688. class: "nav-action-sheet",
  6689. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6690. }, ["stop"]))
  6691. }, [
  6692. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6693. vue.createElementVNode("view", {
  6694. class: "nav-sheet-item",
  6695. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6696. }, "高德地图"),
  6697. vue.createElementVNode("view", {
  6698. class: "nav-sheet-item",
  6699. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6700. }, "腾讯地图"),
  6701. vue.createElementVNode("view", {
  6702. class: "nav-sheet-item",
  6703. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6704. }, "百度地图"),
  6705. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6706. vue.createElementVNode("view", {
  6707. class: "nav-sheet-item cancel",
  6708. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6709. }, "取消")
  6710. ])
  6711. ])) : vue.createCommentVNode("v-if", true),
  6712. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6713. key: 3,
  6714. class: "upload-modal-mask",
  6715. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6716. }, [
  6717. vue.createElementVNode("view", {
  6718. class: "upload-modal-content",
  6719. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6720. }, ["stop"]))
  6721. }, [
  6722. vue.createElementVNode("view", { class: "um-header" }, [
  6723. vue.createElementVNode(
  6724. "text",
  6725. { class: "um-title" },
  6726. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6727. 1
  6728. /* TEXT */
  6729. ),
  6730. vue.createElementVNode(
  6731. "text",
  6732. { class: "um-remark-hint" },
  6733. vue.toDisplayString(_ctx.currentTaskDesc),
  6734. 1
  6735. /* TEXT */
  6736. )
  6737. ]),
  6738. vue.createElementVNode("view", { class: "um-body" }, [
  6739. vue.createElementVNode("view", { class: "um-grid" }, [
  6740. (vue.openBlock(true), vue.createElementBlock(
  6741. vue.Fragment,
  6742. null,
  6743. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6744. return vue.openBlock(), vue.createElementBlock("view", {
  6745. class: "um-item",
  6746. key: idx
  6747. }, [
  6748. vue.createElementVNode("image", {
  6749. class: "um-preview",
  6750. src: img.thumb || img.url || img.localPath || img,
  6751. mode: "aspectFill"
  6752. }, null, 8, ["src"]),
  6753. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6754. key: 0,
  6755. class: "um-video-badge"
  6756. }, [
  6757. vue.createElementVNode("image", {
  6758. class: "play-icon-small",
  6759. src: _imports_7
  6760. })
  6761. ])) : vue.createCommentVNode("v-if", true),
  6762. vue.createElementVNode("view", {
  6763. class: "um-del",
  6764. onClick: ($event) => _ctx.removeModalMedia(idx)
  6765. }, "×", 8, ["onClick"])
  6766. ]);
  6767. }),
  6768. 128
  6769. /* KEYED_FRAGMENT */
  6770. )),
  6771. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6772. key: 0,
  6773. class: "um-add",
  6774. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6775. }, [
  6776. vue.createElementVNode("image", {
  6777. class: "um-add-icon",
  6778. src: _imports_1$6
  6779. }),
  6780. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6781. ])) : vue.createCommentVNode("v-if", true)
  6782. ]),
  6783. vue.withDirectives(vue.createElementVNode(
  6784. "textarea",
  6785. {
  6786. class: "um-textarea",
  6787. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6788. placeholder: "在此输入备注信息...",
  6789. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6790. },
  6791. null,
  6792. 512
  6793. /* NEED_PATCH */
  6794. ), [
  6795. [vue.vModelText, _ctx.modalRemark]
  6796. ])
  6797. ]),
  6798. vue.createElementVNode("view", { class: "um-footer" }, [
  6799. vue.createElementVNode(
  6800. "view",
  6801. {
  6802. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6803. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6804. },
  6805. " 确认提交",
  6806. 2
  6807. /* CLASS */
  6808. )
  6809. ])
  6810. ])
  6811. ])) : vue.createCommentVNode("v-if", true),
  6812. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6813. key: 4,
  6814. class: "sum-modal-mask",
  6815. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6816. }, [
  6817. vue.createElementVNode("view", {
  6818. class: "sum-modal-card",
  6819. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6820. }, ["stop"]))
  6821. }, [
  6822. vue.createElementVNode("scroll-view", {
  6823. "scroll-y": "",
  6824. class: "sum-modal-scroll"
  6825. }, [
  6826. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6827. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6828. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6829. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6830. vue.createElementVNode(
  6831. "text",
  6832. { class: "sum-meta-val" },
  6833. vue.toDisplayString(_ctx.sumDate),
  6834. 1
  6835. /* TEXT */
  6836. )
  6837. ]),
  6838. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6839. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6840. vue.createElementVNode(
  6841. "text",
  6842. { class: "sum-meta-val" },
  6843. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6844. 1
  6845. /* TEXT */
  6846. )
  6847. ]),
  6848. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6849. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6850. vue.createElementVNode(
  6851. "text",
  6852. { class: "sum-meta-val" },
  6853. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6854. 1
  6855. /* TEXT */
  6856. )
  6857. ]),
  6858. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6859. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6860. vue.createElementVNode("image", {
  6861. class: "sum-pet-avatar",
  6862. src: _ctx.orderDetail.petAvatar,
  6863. mode: "aspectFill"
  6864. }, null, 8, ["src"]),
  6865. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6866. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6867. vue.createElementVNode(
  6868. "text",
  6869. { class: "sum-pet-name" },
  6870. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6871. 1
  6872. /* TEXT */
  6873. ),
  6874. vue.createElementVNode(
  6875. "text",
  6876. { class: "sum-pet-breed" },
  6877. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6878. 1
  6879. /* TEXT */
  6880. )
  6881. ]),
  6882. vue.createElementVNode(
  6883. "text",
  6884. { class: "sum-pet-remark" },
  6885. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6886. 1
  6887. /* TEXT */
  6888. )
  6889. ])
  6890. ]),
  6891. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6892. vue.withDirectives(vue.createElementVNode(
  6893. "textarea",
  6894. {
  6895. class: "sum-textarea",
  6896. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6897. "auto-height": "",
  6898. placeholder: "请填写服务内容...",
  6899. "placeholder-style": "color:#ccc"
  6900. },
  6901. null,
  6902. 512
  6903. /* NEED_PATCH */
  6904. ), [
  6905. [vue.vModelText, _ctx.sumContent]
  6906. ]),
  6907. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6908. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6909. vue.createElementVNode(
  6910. "text",
  6911. { class: "sum-sign-val" },
  6912. vue.toDisplayString(_ctx.sumSigner),
  6913. 1
  6914. /* TEXT */
  6915. )
  6916. ]),
  6917. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6918. ])
  6919. ]),
  6920. vue.createElementVNode("view", { class: "sum-footer" }, [
  6921. vue.createElementVNode("button", {
  6922. class: "sum-submit-btn",
  6923. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6924. }, "提交小结")
  6925. ])
  6926. ])
  6927. ])) : vue.createCommentVNode("v-if", true),
  6928. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6929. key: 5,
  6930. class: "modal-mask",
  6931. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6932. }, [
  6933. vue.createElementVNode("view", {
  6934. class: "anomaly-modal-content",
  6935. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6936. }, ["stop"]))
  6937. }, [
  6938. vue.createElementVNode("view", { class: "am-header" }, [
  6939. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6940. vue.createElementVNode("view", {
  6941. class: "close-icon-btn",
  6942. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6943. }, "×")
  6944. ]),
  6945. vue.createElementVNode("scroll-view", {
  6946. "scroll-y": "",
  6947. class: "am-scroll-list"
  6948. }, [
  6949. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6950. key: 0,
  6951. class: "empty-list"
  6952. }, [
  6953. vue.createElementVNode("image", {
  6954. class: "empty-icon",
  6955. src: _imports_8$1,
  6956. mode: "aspectFit"
  6957. }),
  6958. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6959. ])) : vue.createCommentVNode("v-if", true),
  6960. (vue.openBlock(true), vue.createElementBlock(
  6961. vue.Fragment,
  6962. null,
  6963. vue.renderList(_ctx.anomalyList, (item, index) => {
  6964. return vue.openBlock(), vue.createElementBlock("view", {
  6965. class: "am-item",
  6966. key: index
  6967. }, [
  6968. vue.createElementVNode("view", { class: "am-item-header" }, [
  6969. vue.createElementVNode(
  6970. "text",
  6971. { class: "am-item-type" },
  6972. vue.toDisplayString(item.typeLabel),
  6973. 1
  6974. /* TEXT */
  6975. ),
  6976. vue.createElementVNode(
  6977. "text",
  6978. {
  6979. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6980. },
  6981. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6982. 3
  6983. /* TEXT, CLASS */
  6984. )
  6985. ]),
  6986. vue.createElementVNode(
  6987. "text",
  6988. { class: "am-item-content" },
  6989. vue.toDisplayString(item.content),
  6990. 1
  6991. /* TEXT */
  6992. ),
  6993. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6994. key: 0,
  6995. class: "am-item-photos"
  6996. }, [
  6997. (vue.openBlock(true), vue.createElementBlock(
  6998. vue.Fragment,
  6999. null,
  7000. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  7001. return vue.openBlock(), vue.createElementBlock("view", {
  7002. class: "am-photo-item",
  7003. key: pIdx,
  7004. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  7005. }, [
  7006. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  7007. key: 0,
  7008. class: "am-photo",
  7009. src: photoUrl,
  7010. mode: "aspectFill"
  7011. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  7012. key: 1,
  7013. class: "tl-video-placeholder miniaturized"
  7014. }, [
  7015. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  7016. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  7017. ]))
  7018. ], 8, ["onClick"]);
  7019. }),
  7020. 128
  7021. /* KEYED_FRAGMENT */
  7022. ))
  7023. ])) : vue.createCommentVNode("v-if", true),
  7024. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7025. key: 1,
  7026. class: "am-audit-box"
  7027. }, [
  7028. vue.createElementVNode("view", { class: "am-audit-header" }, [
  7029. vue.createElementVNode(
  7030. "text",
  7031. { class: "am-audit-label" },
  7032. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  7033. 1
  7034. /* TEXT */
  7035. ),
  7036. vue.createElementVNode(
  7037. "text",
  7038. { class: "am-audit-time" },
  7039. vue.toDisplayString(item.auditTime),
  7040. 1
  7041. /* TEXT */
  7042. )
  7043. ]),
  7044. vue.createElementVNode(
  7045. "text",
  7046. { class: "am-audit-remark" },
  7047. vue.toDisplayString(item.auditRemark || "无"),
  7048. 1
  7049. /* TEXT */
  7050. )
  7051. ])) : vue.createCommentVNode("v-if", true)
  7052. ]);
  7053. }),
  7054. 128
  7055. /* KEYED_FRAGMENT */
  7056. ))
  7057. ])
  7058. ])
  7059. ])) : vue.createCommentVNode("v-if", true),
  7060. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  7061. key: 6,
  7062. class: "video-player-mask",
  7063. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  7064. }, [
  7065. vue.createElementVNode("view", {
  7066. class: "video-player-content",
  7067. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  7068. }, ["stop"]))
  7069. }, [
  7070. vue.createElementVNode("video", {
  7071. class: "v-player",
  7072. src: _ctx.videoPlayerUrl,
  7073. autoplay: "",
  7074. controls: ""
  7075. }, null, 8, ["src"]),
  7076. vue.createElementVNode("view", {
  7077. class: "v-close",
  7078. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  7079. }, "×")
  7080. ])
  7081. ])) : vue.createCommentVNode("v-if", true)
  7082. ],
  7083. 64
  7084. /* STABLE_FRAGMENT */
  7085. ))
  7086. ]);
  7087. }
  7088. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  7089. const _sfc_main$q = {
  7090. data() {
  7091. return {
  7092. orderId: "",
  7093. // 已选异常类型(dictValue)
  7094. selectedTypeValue: "",
  7095. // 已选异常类型标签(dictLabel,用于显示)
  7096. selectedTypeLabel: "",
  7097. // 异常描述
  7098. anomalyDesc: "",
  7099. // 照片列表(含 url 和 ossId)
  7100. photoList: [],
  7101. // 是否显示类型选择器
  7102. showTypeSheet: false,
  7103. // 异常类型字典列表(从后端获取)
  7104. anomalyTypes: []
  7105. };
  7106. },
  7107. onLoad(options) {
  7108. if (options.orderId) {
  7109. this.orderId = options.orderId;
  7110. }
  7111. this.loadAnomalyTypes();
  7112. },
  7113. computed: {
  7114. // 当前选中的类型显示文本
  7115. selectedType() {
  7116. return this.selectedTypeLabel || "";
  7117. }
  7118. },
  7119. methods: {
  7120. /**
  7121. * 加载异常类型字典数据
  7122. */
  7123. async loadAnomalyTypes() {
  7124. try {
  7125. const res = await getDictDataByType("flf_anamaly_type");
  7126. if (res.data && Array.isArray(res.data)) {
  7127. this.anomalyTypes = res.data.map((item) => ({
  7128. label: item.dictLabel,
  7129. value: item.dictValue,
  7130. dictCode: item.dictCode
  7131. }));
  7132. formatAppLog("log", "at pages/orders/anomaly.vue:137", "异常类型字典:", this.anomalyTypes);
  7133. }
  7134. } catch (err) {
  7135. formatAppLog("error", "at pages/orders/anomaly.vue:140", "获取异常类型字典失败:", err);
  7136. }
  7137. },
  7138. // 打开类型选择器
  7139. openTypeSheet() {
  7140. this.showTypeSheet = true;
  7141. },
  7142. // 关闭类型选择器
  7143. closeTypeSheet() {
  7144. this.showTypeSheet = false;
  7145. },
  7146. // 选择异常类型
  7147. selectType(type) {
  7148. this.selectedTypeValue = type.value;
  7149. this.selectedTypeLabel = type.label;
  7150. this.closeTypeSheet();
  7151. },
  7152. // 选择照片并上传
  7153. choosePhoto() {
  7154. uni.chooseImage({
  7155. count: 5 - this.photoList.length,
  7156. sizeType: ["compressed"],
  7157. sourceType: ["album", "camera"],
  7158. success: async (res) => {
  7159. uni.showLoading({ title: "上传中..." });
  7160. try {
  7161. for (const filePath of res.tempFilePaths) {
  7162. const uploadRes = await uploadFile(filePath);
  7163. if (uploadRes.code === 200) {
  7164. this.photoList.push({
  7165. url: uploadRes.data.url,
  7166. ossId: uploadRes.data.ossId,
  7167. localPath: filePath
  7168. });
  7169. }
  7170. }
  7171. uni.hideLoading();
  7172. } catch (err) {
  7173. uni.hideLoading();
  7174. formatAppLog("error", "at pages/orders/anomaly.vue:179", "上传失败:", err);
  7175. uni.showToast({ title: "上传失败", icon: "none" });
  7176. }
  7177. }
  7178. });
  7179. },
  7180. // 删除照片
  7181. removePhoto(idx) {
  7182. this.photoList.splice(idx, 1);
  7183. },
  7184. // 提交上报
  7185. async submitAnomaly() {
  7186. if (!this.selectedTypeValue) {
  7187. uni.showToast({ title: "请选择异常类型", icon: "none" });
  7188. return;
  7189. }
  7190. if (this.photoList.length === 0) {
  7191. uni.showToast({ title: "请上传现场照片", icon: "none" });
  7192. return;
  7193. }
  7194. const data = {
  7195. orderId: this.orderId,
  7196. type: this.selectedTypeValue,
  7197. content: this.anomalyDesc,
  7198. photos: this.photoList.map((p) => p.ossId)
  7199. };
  7200. try {
  7201. uni.showLoading({ title: "提交中..." });
  7202. await uploadAnamaly(data);
  7203. uni.hideLoading();
  7204. uni.showToast({ title: "上报成功", icon: "success" });
  7205. setTimeout(() => {
  7206. uni.navigateBack();
  7207. }, 1500);
  7208. } catch (err) {
  7209. uni.hideLoading();
  7210. formatAppLog("error", "at pages/orders/anomaly.vue:215", "异常上报失败:", err);
  7211. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  7212. }
  7213. }
  7214. }
  7215. };
  7216. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  7217. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  7218. vue.createElementVNode("scroll-view", {
  7219. "scroll-y": "",
  7220. class: "anomaly-scroll"
  7221. }, [
  7222. vue.createElementVNode("view", { class: "ano-card" }, [
  7223. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7224. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7225. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  7226. ]),
  7227. vue.createElementVNode("view", {
  7228. class: "ano-type-row",
  7229. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  7230. }, [
  7231. vue.createElementVNode(
  7232. "text",
  7233. {
  7234. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  7235. },
  7236. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  7237. 3
  7238. /* TEXT, CLASS */
  7239. ),
  7240. vue.createElementVNode("image", {
  7241. class: "ano-right-arrow",
  7242. src: _imports_0$2
  7243. })
  7244. ])
  7245. ]),
  7246. vue.createElementVNode("view", { class: "ano-card" }, [
  7247. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7248. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7249. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  7250. ]),
  7251. vue.withDirectives(vue.createElementVNode(
  7252. "textarea",
  7253. {
  7254. class: "ano-textarea",
  7255. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  7256. placeholder: "请详细描述现场异常情况...",
  7257. "placeholder-style": "color:#ccc; font-size:28rpx;",
  7258. maxlength: "500"
  7259. },
  7260. null,
  7261. 512
  7262. /* NEED_PATCH */
  7263. ), [
  7264. [vue.vModelText, $data.anomalyDesc]
  7265. ])
  7266. ]),
  7267. vue.createElementVNode("view", { class: "ano-card" }, [
  7268. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7269. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7270. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  7271. ]),
  7272. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  7273. (vue.openBlock(true), vue.createElementBlock(
  7274. vue.Fragment,
  7275. null,
  7276. vue.renderList($data.photoList, (img, idx) => {
  7277. return vue.openBlock(), vue.createElementBlock("view", {
  7278. class: "ano-photo-item",
  7279. key: idx
  7280. }, [
  7281. vue.createElementVNode("image", {
  7282. class: "ano-photo-preview",
  7283. src: img.url || img.localPath || img,
  7284. mode: "aspectFill"
  7285. }, null, 8, ["src"]),
  7286. vue.createElementVNode("view", {
  7287. class: "ano-photo-del",
  7288. onClick: ($event) => $options.removePhoto(idx)
  7289. }, "×", 8, ["onClick"])
  7290. ]);
  7291. }),
  7292. 128
  7293. /* KEYED_FRAGMENT */
  7294. )),
  7295. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7296. key: 0,
  7297. class: "ano-photo-add",
  7298. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7299. }, [
  7300. vue.createElementVNode("image", {
  7301. class: "ano-add-icon",
  7302. src: _imports_1$6
  7303. }),
  7304. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7305. ])) : vue.createCommentVNode("v-if", true)
  7306. ])
  7307. ]),
  7308. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7309. ]),
  7310. vue.createElementVNode("view", { class: "ano-footer" }, [
  7311. vue.createElementVNode("button", {
  7312. class: "ano-submit-btn",
  7313. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7314. }, "提交上报")
  7315. ]),
  7316. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7317. key: 0,
  7318. class: "ano-sheet-mask",
  7319. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7320. }, [
  7321. vue.createElementVNode("view", {
  7322. class: "ano-sheet",
  7323. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7324. }, ["stop"]))
  7325. }, [
  7326. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7327. vue.createElementVNode("scroll-view", {
  7328. "scroll-y": "",
  7329. class: "ano-sheet-list"
  7330. }, [
  7331. (vue.openBlock(true), vue.createElementBlock(
  7332. vue.Fragment,
  7333. null,
  7334. vue.renderList($data.anomalyTypes, (type, idx) => {
  7335. return vue.openBlock(), vue.createElementBlock("view", {
  7336. class: "ano-sheet-item",
  7337. key: idx,
  7338. onClick: ($event) => $options.selectType(type)
  7339. }, [
  7340. vue.createElementVNode(
  7341. "text",
  7342. {
  7343. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7344. },
  7345. vue.toDisplayString(type.label),
  7346. 3
  7347. /* TEXT, CLASS */
  7348. ),
  7349. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7350. key: 0,
  7351. class: "ano-check-icon",
  7352. src: _imports_0$2
  7353. })) : vue.createCommentVNode("v-if", true)
  7354. ], 8, ["onClick"]);
  7355. }),
  7356. 128
  7357. /* KEYED_FRAGMENT */
  7358. ))
  7359. ]),
  7360. vue.createElementVNode("view", {
  7361. class: "ano-sheet-cancel",
  7362. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7363. }, "取消")
  7364. ])
  7365. ])) : vue.createCommentVNode("v-if", true)
  7366. ]);
  7367. }
  7368. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7369. const _sfc_main$p = {
  7370. data() {
  7371. return {
  7372. tabs: ["全部", "已完成", "已拒绝"],
  7373. activeTab: 0,
  7374. stats: {
  7375. total: 0,
  7376. reject: 0,
  7377. reward: 0,
  7378. punish: 0
  7379. },
  7380. orders: [],
  7381. serviceList: [],
  7382. pageNum: 1,
  7383. pageSize: 10,
  7384. total: 0,
  7385. loading: false
  7386. };
  7387. },
  7388. computed: {
  7389. filteredOrders() {
  7390. return this.orders;
  7391. }
  7392. },
  7393. async onLoad() {
  7394. await this.loadServiceList();
  7395. this.fetchStats();
  7396. this.fetchOrders(true);
  7397. },
  7398. methods: {
  7399. async loadServiceList() {
  7400. try {
  7401. const res = await listAllService();
  7402. this.serviceList = res.data || [];
  7403. } catch (err) {
  7404. formatAppLog("error", "at pages/mine/order-stats.vue:161", "获取服务类型失败:", err);
  7405. }
  7406. },
  7407. async fetchStats() {
  7408. try {
  7409. const res = await getOrderStats();
  7410. if (res.code === 200 && res.data) {
  7411. this.stats = {
  7412. ...this.stats,
  7413. ...res.data
  7414. };
  7415. }
  7416. } catch (err) {
  7417. formatAppLog("error", "at pages/mine/order-stats.vue:174", "获取统计值失败:", err);
  7418. }
  7419. },
  7420. async fetchOrders(reset = false) {
  7421. if (reset) {
  7422. this.pageNum = 1;
  7423. this.orders = [];
  7424. }
  7425. if (this.loading)
  7426. return;
  7427. if (!reset && this.orders.length >= this.total && this.total !== 0)
  7428. return;
  7429. this.loading = true;
  7430. try {
  7431. const statusMap = { 0: void 0, 1: 4, 2: 5 };
  7432. const params = {
  7433. status: statusMap[this.activeTab],
  7434. pageNum: this.pageNum,
  7435. pageSize: this.pageSize
  7436. };
  7437. const res = await getStatisticOrders(params);
  7438. if (res.code === 200) {
  7439. this.total = res.total || 0;
  7440. const rows = res.rows || [];
  7441. const mapped = rows.map((item) => this.transformOrder(item));
  7442. this.orders = this.orders.concat(mapped);
  7443. this.pageNum++;
  7444. }
  7445. } catch (err) {
  7446. formatAppLog("error", "at pages/mine/order-stats.vue:202", "获取订单列表失败:", err);
  7447. } finally {
  7448. this.loading = false;
  7449. }
  7450. },
  7451. transformOrder(order) {
  7452. const service = this.serviceList.find((s) => s.id === order.service);
  7453. const mode = (service == null ? void 0 : service.mode) || 0;
  7454. const isRoundTrip = mode === 1;
  7455. const statusMap = {
  7456. 0: { label: "待派单", color: "#f56c6c" },
  7457. 1: { label: "待接单", color: "#e6a23c" },
  7458. 2: { label: "待服务", color: "#49a3ff" },
  7459. 3: { label: "服务中", color: "#49a3ff" },
  7460. 4: { label: "已完成", color: "#67c23a" },
  7461. 5: { label: "已取消", color: "#909399" }
  7462. };
  7463. const statusInfo = statusMap[order.status] || { label: "未知", color: "#999" };
  7464. return {
  7465. id: order.id,
  7466. orderType: isRoundTrip ? 1 : 2,
  7467. typeName: (service == null ? void 0 : service.name) || "未知",
  7468. typeIcon: (service == null ? void 0 : service.iconUrl) || "",
  7469. statusLabel: statusInfo.label,
  7470. statusColor: statusInfo.color,
  7471. finishTime: order.serviceTime || "",
  7472. serviceTime: order.serviceTime || "",
  7473. petName: order.petName || "未知",
  7474. petBreed: order.breed || "未知",
  7475. petAvatar: order.petAvatarUrl || "/static/dog.png",
  7476. price: (order.price / 100).toFixed(2),
  7477. startName: order.fromAddress || "",
  7478. startAddr: order.fromAddress || "",
  7479. endName: (order.customerName || "") + " " + (order.customerPhone || ""),
  7480. endAddr: order.toAddress || "",
  7481. serviceNote: order.remark || ""
  7482. };
  7483. },
  7484. switchTab(idx) {
  7485. this.activeTab = idx;
  7486. this.fetchOrders(true);
  7487. },
  7488. onReachBottom() {
  7489. this.fetchOrders();
  7490. },
  7491. navBack() {
  7492. uni.navigateBack();
  7493. }
  7494. }
  7495. };
  7496. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  7497. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7498. vue.createElementVNode("view", { class: "stats-banner" }, [
  7499. vue.createElementVNode("view", { class: "banner-item" }, [
  7500. vue.createElementVNode(
  7501. "text",
  7502. { class: "banner-num" },
  7503. vue.toDisplayString($data.stats.total),
  7504. 1
  7505. /* TEXT */
  7506. ),
  7507. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7508. ]),
  7509. vue.createElementVNode("view", { class: "banner-item" }, [
  7510. vue.createElementVNode(
  7511. "text",
  7512. { class: "banner-num" },
  7513. vue.toDisplayString($data.stats.reject),
  7514. 1
  7515. /* TEXT */
  7516. ),
  7517. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7518. ]),
  7519. vue.createElementVNode("view", { class: "banner-item" }, [
  7520. vue.createElementVNode(
  7521. "text",
  7522. { class: "banner-num" },
  7523. vue.toDisplayString($data.stats.reward),
  7524. 1
  7525. /* TEXT */
  7526. ),
  7527. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7528. ]),
  7529. vue.createElementVNode("view", { class: "banner-item" }, [
  7530. vue.createElementVNode(
  7531. "text",
  7532. { class: "banner-num" },
  7533. vue.toDisplayString($data.stats.punish),
  7534. 1
  7535. /* TEXT */
  7536. ),
  7537. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7538. ])
  7539. ]),
  7540. vue.createElementVNode("view", { class: "tab-bar" }, [
  7541. (vue.openBlock(true), vue.createElementBlock(
  7542. vue.Fragment,
  7543. null,
  7544. vue.renderList($data.tabs, (tab, idx) => {
  7545. return vue.openBlock(), vue.createElementBlock("view", {
  7546. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7547. key: idx,
  7548. onClick: ($event) => $options.switchTab(idx)
  7549. }, [
  7550. vue.createElementVNode(
  7551. "text",
  7552. null,
  7553. vue.toDisplayString(tab),
  7554. 1
  7555. /* TEXT */
  7556. ),
  7557. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7558. key: 0,
  7559. class: "tab-line"
  7560. })) : vue.createCommentVNode("v-if", true)
  7561. ], 10, ["onClick"]);
  7562. }),
  7563. 128
  7564. /* KEYED_FRAGMENT */
  7565. ))
  7566. ]),
  7567. vue.createElementVNode(
  7568. "scroll-view",
  7569. {
  7570. "scroll-y": "",
  7571. class: "order-scroll",
  7572. onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
  7573. },
  7574. [
  7575. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7576. (vue.openBlock(true), vue.createElementBlock(
  7577. vue.Fragment,
  7578. null,
  7579. vue.renderList($options.filteredOrders, (order, idx) => {
  7580. return vue.openBlock(), vue.createElementBlock("view", {
  7581. class: "order-card",
  7582. key: idx
  7583. }, [
  7584. vue.createElementVNode("view", { class: "card-header" }, [
  7585. vue.createElementVNode("view", { class: "type-badge" }, [
  7586. vue.createElementVNode("image", {
  7587. class: "type-icon",
  7588. src: order.typeIcon
  7589. }, null, 8, ["src"]),
  7590. vue.createElementVNode(
  7591. "text",
  7592. { class: "type-text" },
  7593. vue.toDisplayString(order.typeName),
  7594. 1
  7595. /* TEXT */
  7596. )
  7597. ]),
  7598. vue.createElementVNode(
  7599. "text",
  7600. {
  7601. class: "status-text",
  7602. style: vue.normalizeStyle({ color: order.statusColor })
  7603. },
  7604. vue.toDisplayString(order.statusLabel),
  7605. 5
  7606. /* TEXT, STYLE */
  7607. )
  7608. ]),
  7609. vue.createElementVNode(
  7610. "text",
  7611. { class: "service-time" },
  7612. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7613. 1
  7614. /* TEXT */
  7615. ),
  7616. vue.createElementVNode("view", { class: "pet-card" }, [
  7617. vue.createElementVNode("image", {
  7618. class: "pet-avatar",
  7619. src: order.petAvatar,
  7620. mode: "aspectFill"
  7621. }, null, 8, ["src"]),
  7622. vue.createElementVNode("view", { class: "pet-info" }, [
  7623. vue.createElementVNode(
  7624. "text",
  7625. { class: "pet-name" },
  7626. vue.toDisplayString(order.petName),
  7627. 1
  7628. /* TEXT */
  7629. ),
  7630. vue.createElementVNode(
  7631. "text",
  7632. { class: "pet-breed" },
  7633. "品种: " + vue.toDisplayString(order.petBreed),
  7634. 1
  7635. /* TEXT */
  7636. )
  7637. ]),
  7638. vue.createElementVNode(
  7639. "text",
  7640. { class: "pet-price" },
  7641. "¥" + vue.toDisplayString(order.price),
  7642. 1
  7643. /* TEXT */
  7644. )
  7645. ]),
  7646. vue.createElementVNode("view", { class: "route-info" }, [
  7647. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7648. vue.Fragment,
  7649. { key: 0 },
  7650. [
  7651. vue.createElementVNode("view", { class: "route-item" }, [
  7652. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7653. vue.createElementVNode("view", { class: "route-connector" }),
  7654. vue.createElementVNode("view", { class: "address-box" }, [
  7655. vue.createElementVNode(
  7656. "text",
  7657. { class: "addr-title" },
  7658. vue.toDisplayString(order.startName),
  7659. 1
  7660. /* TEXT */
  7661. ),
  7662. vue.createElementVNode(
  7663. "text",
  7664. { class: "addr-desc" },
  7665. vue.toDisplayString(order.startAddr),
  7666. 1
  7667. /* TEXT */
  7668. )
  7669. ])
  7670. ]),
  7671. vue.createElementVNode("view", { class: "route-item" }, [
  7672. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7673. vue.createElementVNode("view", { class: "address-box" }, [
  7674. vue.createElementVNode(
  7675. "text",
  7676. { class: "addr-title" },
  7677. vue.toDisplayString(order.endName),
  7678. 1
  7679. /* TEXT */
  7680. ),
  7681. vue.createElementVNode(
  7682. "text",
  7683. { class: "addr-desc" },
  7684. vue.toDisplayString(order.endAddr),
  7685. 1
  7686. /* TEXT */
  7687. )
  7688. ])
  7689. ])
  7690. ],
  7691. 64
  7692. /* STABLE_FRAGMENT */
  7693. )) : (vue.openBlock(), vue.createElementBlock(
  7694. vue.Fragment,
  7695. { key: 1 },
  7696. [
  7697. vue.createElementVNode("view", { class: "route-item" }, [
  7698. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7699. vue.createElementVNode("view", { class: "address-box" }, [
  7700. vue.createElementVNode(
  7701. "text",
  7702. { class: "addr-title" },
  7703. vue.toDisplayString(order.endName),
  7704. 1
  7705. /* TEXT */
  7706. ),
  7707. vue.createElementVNode(
  7708. "text",
  7709. { class: "addr-desc" },
  7710. vue.toDisplayString(order.endAddr),
  7711. 1
  7712. /* TEXT */
  7713. )
  7714. ])
  7715. ]),
  7716. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7717. key: 0,
  7718. class: "service-note-row"
  7719. }, [
  7720. vue.createElementVNode(
  7721. "text",
  7722. { class: "service-note-text" },
  7723. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7724. 1
  7725. /* TEXT */
  7726. )
  7727. ])) : vue.createCommentVNode("v-if", true)
  7728. ],
  7729. 64
  7730. /* STABLE_FRAGMENT */
  7731. ))
  7732. ])
  7733. ]);
  7734. }),
  7735. 128
  7736. /* KEYED_FRAGMENT */
  7737. )),
  7738. $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7739. key: 0,
  7740. class: "empty-state"
  7741. }, [
  7742. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7743. ])) : vue.createCommentVNode("v-if", true),
  7744. $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7745. key: 1,
  7746. class: "loading-more"
  7747. }, [
  7748. vue.createElementVNode("text", null, "加载中...")
  7749. ])) : vue.createCommentVNode("v-if", true),
  7750. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7751. ],
  7752. 32
  7753. /* NEED_HYDRATION */
  7754. )
  7755. ]);
  7756. }
  7757. 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"]]);
  7758. function getBalanceOnApp() {
  7759. return request({
  7760. url: "/fulfiller/log/balanceOnApp",
  7761. method: "GET"
  7762. });
  7763. }
  7764. function pageBalanceOnApp(data) {
  7765. return request({
  7766. url: "/fulfiller/log/pageBalanceOnApp",
  7767. method: "GET",
  7768. data
  7769. });
  7770. }
  7771. function listBalanceOnApp(data) {
  7772. return request({
  7773. url: "/fulfiller/log/listBalanceOnApp",
  7774. method: "GET",
  7775. data
  7776. });
  7777. }
  7778. function pointsOnApp() {
  7779. return request({
  7780. url: "/fulfiller/log/pointsOnApp",
  7781. method: "GET"
  7782. });
  7783. }
  7784. function pagePointsOnApp(data) {
  7785. return request({
  7786. url: "/fulfiller/log/pagePointsOnApp",
  7787. method: "GET",
  7788. data
  7789. });
  7790. }
  7791. function listPointsOnApp(data) {
  7792. return request({
  7793. url: "/fulfiller/log/listPointsOnApp",
  7794. method: "GET",
  7795. data
  7796. });
  7797. }
  7798. function countOnAppReward(data) {
  7799. return request({
  7800. url: "/fulfiller/log/countOnAppReward",
  7801. method: "GET",
  7802. data
  7803. });
  7804. }
  7805. function listOnAppReward(data) {
  7806. return request({
  7807. url: "/fulfiller/log/listOnAppReward",
  7808. method: "GET",
  7809. data
  7810. });
  7811. }
  7812. const FlfBalanceBizType = {
  7813. admin_reward: "后台奖励",
  7814. admin_punish: "后台惩罚",
  7815. admin_adjust: "后台调整",
  7816. order_reward: "订单奖励",
  7817. order_punish: "订单惩罚",
  7818. order_finish: "订单完成",
  7819. salary: "工资发放",
  7820. withdraw: "提现"
  7821. };
  7822. const FlfPointsBizType = {
  7823. admin_reward: "后台奖励",
  7824. admin_punish: "后台惩罚",
  7825. admin_adjust: "后台调整",
  7826. order_reward: "订单奖励",
  7827. order_punish: "订单惩罚",
  7828. order_finish: "订单完成"
  7829. };
  7830. const FlfRewardBizType = {
  7831. admin_reward: "后台奖励",
  7832. admin_punish: "后台惩罚",
  7833. order_reward: "订单奖励",
  7834. order_punish: "订单惩罚",
  7835. order_finish: "订单完成"
  7836. };
  7837. const FlfActionType = {
  7838. add: "收入",
  7839. reduce: "支出"
  7840. };
  7841. const fulfillerEnum = {
  7842. FlfBalanceBizType,
  7843. FlfPointsBizType,
  7844. FlfRewardBizType,
  7845. FlfActionType
  7846. };
  7847. const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
  7848. const _sfc_main$o = {
  7849. data() {
  7850. const now = /* @__PURE__ */ new Date();
  7851. return {
  7852. tabs: ["全部", "奖励", "惩罚"],
  7853. activeTab: 0,
  7854. selectedYear: now.getFullYear(),
  7855. selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
  7856. // 默认当前月,处理一下测试数据时间
  7857. // 统计数据
  7858. stats: {
  7859. rewardCount: 0,
  7860. punishCount: 0,
  7861. rewardBalance: 0,
  7862. punishBalance: 0
  7863. },
  7864. // 月份选择器状态
  7865. showMonthPicker: false,
  7866. pickerYear: 2026,
  7867. pickerMonth: 3,
  7868. years: [2024, 2025, 2026],
  7869. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7870. yearScrollTop: 0,
  7871. monthScrollTop: 0,
  7872. // 奖惩记录列表
  7873. records: []
  7874. };
  7875. },
  7876. computed: {
  7877. filteredList() {
  7878. if (this.activeTab === 0)
  7879. return this.records;
  7880. const targetType = this.activeTab === 1 ? "reward" : "penalty";
  7881. return this.records.filter((r) => r.type === targetType);
  7882. }
  7883. },
  7884. onShow() {
  7885. if (this.selectedYear === 2026 && this.selectedMonth === 2)
  7886. ;
  7887. this.fetchData();
  7888. },
  7889. methods: {
  7890. async fetchData() {
  7891. const params = {
  7892. year: this.selectedYear,
  7893. month: this.selectedMonth
  7894. };
  7895. this.fetchStats(params);
  7896. this.fetchList(params);
  7897. },
  7898. async fetchStats(params) {
  7899. try {
  7900. const res = await countOnAppReward(params);
  7901. if (res.code === 200) {
  7902. this.stats = res.data || {
  7903. rewardCount: 0,
  7904. punishCount: 0,
  7905. rewardBalance: 0,
  7906. punishBalance: 0
  7907. };
  7908. }
  7909. } catch (err) {
  7910. formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
  7911. }
  7912. },
  7913. async fetchList(params) {
  7914. try {
  7915. const res = await listOnAppReward(params);
  7916. if (res.code === 200) {
  7917. const list = res.data || [];
  7918. this.records = list.map((item) => {
  7919. const isAdd = item.type === "add";
  7920. const amountVal = Math.abs(item.amount) / 100;
  7921. let dateStr = "";
  7922. if (item.createTime) {
  7923. const datePart = item.createTime.split(" ")[0];
  7924. const parts = datePart.split("-");
  7925. if (parts.length >= 3) {
  7926. dateStr = `${parts[1]}-${parts[2]}`;
  7927. }
  7928. }
  7929. return {
  7930. ...item,
  7931. date: dateStr,
  7932. title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
  7933. desc: item.reason || "",
  7934. amount: isAdd ? amountVal : -amountVal,
  7935. type: isAdd ? "reward" : "penalty",
  7936. status: isAdd ? "已入账" : "已扣款",
  7937. // 简化处理状态
  7938. statusClass: isAdd ? "credited" : "deducted"
  7939. };
  7940. });
  7941. }
  7942. } catch (err) {
  7943. formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
  7944. }
  7945. },
  7946. switchTab(idx) {
  7947. this.activeTab = idx;
  7948. },
  7949. openMonthPicker() {
  7950. this.pickerYear = this.selectedYear;
  7951. this.pickerMonth = this.selectedMonth;
  7952. this.showMonthPicker = true;
  7953. },
  7954. closeMonthPicker() {
  7955. this.showMonthPicker = false;
  7956. },
  7957. confirmMonthPicker() {
  7958. this.selectedYear = this.pickerYear;
  7959. this.selectedMonth = this.pickerMonth;
  7960. this.closeMonthPicker();
  7961. this.fetchData();
  7962. },
  7963. goToAll() {
  7964. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7965. }
  7966. }
  7967. };
  7968. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7969. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7970. vue.createElementVNode("view", { class: "top-banner" }, [
  7971. vue.createElementVNode("view", {
  7972. class: "month-btn",
  7973. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7974. }, [
  7975. vue.createElementVNode(
  7976. "text",
  7977. { class: "month-text" },
  7978. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7979. 1
  7980. /* TEXT */
  7981. )
  7982. ]),
  7983. vue.createElementVNode("view", { class: "stats-grid" }, [
  7984. vue.createElementVNode("view", { class: "stats-cell" }, [
  7985. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7986. vue.createElementVNode("text", { class: "stats-num" }, [
  7987. vue.createTextVNode(
  7988. vue.toDisplayString($data.stats.rewardCount),
  7989. 1
  7990. /* TEXT */
  7991. ),
  7992. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7993. ]),
  7994. vue.createElementVNode("view", { class: "stats-divider" }),
  7995. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7996. ]),
  7997. vue.createElementVNode("view", { class: "stats-cell" }, [
  7998. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7999. vue.createElementVNode("text", { class: "stats-num" }, [
  8000. vue.createTextVNode(
  8001. vue.toDisplayString($data.stats.punishCount),
  8002. 1
  8003. /* TEXT */
  8004. ),
  8005. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  8006. ]),
  8007. vue.createElementVNode("view", { class: "stats-divider" }),
  8008. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8009. ]),
  8010. vue.createElementVNode("view", { class: "stats-cell" }, [
  8011. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  8012. vue.createElementVNode(
  8013. "text",
  8014. { class: "stats-num reward-num" },
  8015. vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
  8016. 1
  8017. /* TEXT */
  8018. ),
  8019. vue.createElementVNode("view", { class: "stats-divider" }),
  8020. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8021. ]),
  8022. vue.createElementVNode("view", { class: "stats-cell" }, [
  8023. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  8024. vue.createElementVNode(
  8025. "text",
  8026. { class: "stats-num penalty-num" },
  8027. vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
  8028. 1
  8029. /* TEXT */
  8030. ),
  8031. vue.createElementVNode("view", { class: "stats-divider" }),
  8032. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  8033. ])
  8034. ])
  8035. ]),
  8036. vue.createElementVNode("view", { class: "list-header" }, [
  8037. vue.createElementVNode("view", { class: "tab-bar" }, [
  8038. (vue.openBlock(true), vue.createElementBlock(
  8039. vue.Fragment,
  8040. null,
  8041. vue.renderList($data.tabs, (tab, idx) => {
  8042. return vue.openBlock(), vue.createElementBlock("view", {
  8043. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8044. key: idx,
  8045. onClick: ($event) => $options.switchTab(idx)
  8046. }, [
  8047. vue.createElementVNode(
  8048. "text",
  8049. null,
  8050. vue.toDisplayString(tab),
  8051. 1
  8052. /* TEXT */
  8053. ),
  8054. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8055. key: 0,
  8056. class: "tab-line"
  8057. })) : vue.createCommentVNode("v-if", true)
  8058. ], 10, ["onClick"]);
  8059. }),
  8060. 128
  8061. /* KEYED_FRAGMENT */
  8062. ))
  8063. ]),
  8064. vue.createElementVNode("view", {
  8065. class: "view-all-btn",
  8066. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  8067. }, [
  8068. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  8069. ])
  8070. ]),
  8071. vue.createElementVNode("view", { class: "record-list" }, [
  8072. (vue.openBlock(true), vue.createElementBlock(
  8073. vue.Fragment,
  8074. null,
  8075. vue.renderList($options.filteredList, (item, idx) => {
  8076. return vue.openBlock(), vue.createElementBlock("view", {
  8077. class: "record-item",
  8078. key: idx
  8079. }, [
  8080. vue.createElementVNode(
  8081. "view",
  8082. {
  8083. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8084. },
  8085. [
  8086. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8087. ],
  8088. 2
  8089. /* CLASS */
  8090. ),
  8091. vue.createElementVNode("view", { class: "ri-content" }, [
  8092. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8093. vue.createElementVNode(
  8094. "text",
  8095. { class: "ri-date" },
  8096. vue.toDisplayString(item.date),
  8097. 1
  8098. /* TEXT */
  8099. ),
  8100. vue.createElementVNode(
  8101. "text",
  8102. { class: "ri-title" },
  8103. vue.toDisplayString(item.title),
  8104. 1
  8105. /* TEXT */
  8106. )
  8107. ]),
  8108. vue.createElementVNode(
  8109. "text",
  8110. { class: "ri-desc" },
  8111. vue.toDisplayString(item.desc),
  8112. 1
  8113. /* TEXT */
  8114. )
  8115. ]),
  8116. vue.createElementVNode("view", { class: "ri-right" }, [
  8117. vue.createElementVNode(
  8118. "text",
  8119. {
  8120. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8121. },
  8122. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8123. 3
  8124. /* TEXT, CLASS */
  8125. ),
  8126. vue.createElementVNode(
  8127. "text",
  8128. {
  8129. class: vue.normalizeClass(["ri-status", item.statusClass])
  8130. },
  8131. vue.toDisplayString(item.status),
  8132. 3
  8133. /* TEXT, CLASS */
  8134. )
  8135. ])
  8136. ]);
  8137. }),
  8138. 128
  8139. /* KEYED_FRAGMENT */
  8140. )),
  8141. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  8142. ]),
  8143. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  8144. key: 0,
  8145. class: "picker-mask",
  8146. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8147. }, [
  8148. vue.createElementVNode("view", {
  8149. class: "picker-sheet",
  8150. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  8151. }, ["stop"]))
  8152. }, [
  8153. vue.createElementVNode("view", { class: "picker-header" }, [
  8154. vue.createElementVNode("text", {
  8155. class: "picker-cancel",
  8156. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8157. }, "取消"),
  8158. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  8159. vue.createElementVNode("text", {
  8160. class: "picker-confirm",
  8161. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  8162. }, "确定")
  8163. ]),
  8164. vue.createElementVNode("view", { class: "picker-body" }, [
  8165. vue.createElementVNode("scroll-view", {
  8166. "scroll-y": "",
  8167. class: "picker-column",
  8168. "scroll-top": $data.yearScrollTop,
  8169. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  8170. }, [
  8171. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8172. (vue.openBlock(true), vue.createElementBlock(
  8173. vue.Fragment,
  8174. null,
  8175. vue.renderList($data.years, (year) => {
  8176. return vue.openBlock(), vue.createElementBlock("view", {
  8177. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  8178. key: year,
  8179. onClick: ($event) => $data.pickerYear = year
  8180. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  8181. }),
  8182. 128
  8183. /* KEYED_FRAGMENT */
  8184. )),
  8185. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8186. ], 40, ["scroll-top"]),
  8187. vue.createElementVNode("view", { class: "picker-highlight" }),
  8188. vue.createElementVNode("scroll-view", {
  8189. "scroll-y": "",
  8190. class: "picker-column",
  8191. "scroll-top": $data.monthScrollTop,
  8192. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  8193. }, [
  8194. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8195. (vue.openBlock(true), vue.createElementBlock(
  8196. vue.Fragment,
  8197. null,
  8198. vue.renderList($data.months, (month) => {
  8199. return vue.openBlock(), vue.createElementBlock("view", {
  8200. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  8201. key: month,
  8202. onClick: ($event) => $data.pickerMonth = month
  8203. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  8204. }),
  8205. 128
  8206. /* KEYED_FRAGMENT */
  8207. )),
  8208. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8209. ], 40, ["scroll-top"])
  8210. ])
  8211. ])
  8212. ])) : vue.createCommentVNode("v-if", true)
  8213. ]);
  8214. }
  8215. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  8216. const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
  8217. const _sfc_main$n = {
  8218. data() {
  8219. const now = /* @__PURE__ */ new Date();
  8220. return {
  8221. tabs: ["全部", "奖励", "惩罚"],
  8222. activeTab: 0,
  8223. selectedYear: now.getFullYear(),
  8224. selectedMonth: now.getMonth() + 1,
  8225. // 原始分组数据
  8226. allGroups: [],
  8227. loading: false
  8228. };
  8229. },
  8230. computed: {
  8231. currentPickerDate() {
  8232. return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
  8233. },
  8234. filteredGroups() {
  8235. if (this.activeTab === 0)
  8236. return this.allGroups;
  8237. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  8238. return this.allGroups.map((g) => ({
  8239. ...g,
  8240. items: g.items.filter((i) => i.type === typeKey)
  8241. })).filter((g) => g.items.length > 0);
  8242. }
  8243. },
  8244. onShow() {
  8245. this.fetchMonthData();
  8246. },
  8247. methods: {
  8248. async fetchMonthData() {
  8249. if (this.loading)
  8250. return;
  8251. this.loading = true;
  8252. try {
  8253. const params = {
  8254. year: this.selectedYear,
  8255. month: this.selectedMonth
  8256. };
  8257. const res = await listOnAppReward(params);
  8258. const data = res.data || [];
  8259. if (data.length === 0) {
  8260. this.allGroups = [];
  8261. return;
  8262. }
  8263. let credited = 0;
  8264. const items = data.map((item) => {
  8265. const isAdd = item.type === "add";
  8266. const amountVal = Math.abs(item.amount) / 100;
  8267. if (isAdd)
  8268. credited += amountVal;
  8269. let dateStr = "";
  8270. if (item.createTime) {
  8271. const datePart = item.createTime.split(" ")[0];
  8272. const parts = datePart.split("-");
  8273. if (parts.length >= 3) {
  8274. dateStr = `${parts[1]}-${parts[2]}`;
  8275. }
  8276. }
  8277. return {
  8278. ...item,
  8279. date: dateStr,
  8280. title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
  8281. desc: item.reason || "",
  8282. amount: isAdd ? amountVal : -amountVal,
  8283. type: isAdd ? "reward" : "penalty",
  8284. status: isAdd ? "已入账" : "已扣款",
  8285. statusClass: isAdd ? "credited" : "deducted"
  8286. };
  8287. });
  8288. this.allGroups = [{
  8289. month: this.selectedMonth,
  8290. year: this.selectedYear,
  8291. credited,
  8292. pending: 0,
  8293. items
  8294. }];
  8295. } catch (err) {
  8296. formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
  8297. } finally {
  8298. this.loading = false;
  8299. }
  8300. },
  8301. onDateChange(e) {
  8302. const val = e.detail.value;
  8303. const parts = val.split("-");
  8304. this.selectedYear = parseInt(parts[0]);
  8305. this.selectedMonth = parseInt(parts[1]);
  8306. this.fetchMonthData();
  8307. },
  8308. switchTab(idx) {
  8309. this.activeTab = idx;
  8310. }
  8311. }
  8312. };
  8313. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  8314. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8315. vue.createElementVNode("view", { class: "filter-header" }, [
  8316. vue.createElementVNode("view", { class: "tab-bar" }, [
  8317. (vue.openBlock(true), vue.createElementBlock(
  8318. vue.Fragment,
  8319. null,
  8320. vue.renderList($data.tabs, (tab, idx) => {
  8321. return vue.openBlock(), vue.createElementBlock("view", {
  8322. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8323. key: idx,
  8324. onClick: ($event) => $options.switchTab(idx)
  8325. }, [
  8326. vue.createElementVNode(
  8327. "text",
  8328. null,
  8329. vue.toDisplayString(tab),
  8330. 1
  8331. /* TEXT */
  8332. ),
  8333. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8334. key: 0,
  8335. class: "tab-line"
  8336. })) : vue.createCommentVNode("v-if", true)
  8337. ], 10, ["onClick"]);
  8338. }),
  8339. 128
  8340. /* KEYED_FRAGMENT */
  8341. ))
  8342. ]),
  8343. vue.createElementVNode("view", { class: "date-filter" }, [
  8344. vue.createElementVNode("picker", {
  8345. mode: "date",
  8346. fields: "month",
  8347. value: $options.currentPickerDate,
  8348. onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  8349. }, [
  8350. vue.createElementVNode("view", { class: "picker-trigger" }, [
  8351. vue.createElementVNode(
  8352. "text",
  8353. null,
  8354. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
  8355. 1
  8356. /* TEXT */
  8357. ),
  8358. vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
  8359. ])
  8360. ], 40, ["value"])
  8361. ])
  8362. ]),
  8363. vue.createElementVNode("scroll-view", {
  8364. "scroll-y": "",
  8365. class: "main-scroll"
  8366. }, [
  8367. (vue.openBlock(true), vue.createElementBlock(
  8368. vue.Fragment,
  8369. null,
  8370. vue.renderList($options.filteredGroups, (group, gIdx) => {
  8371. return vue.openBlock(), vue.createElementBlock("view", {
  8372. key: gIdx,
  8373. class: "month-group"
  8374. }, [
  8375. vue.createElementVNode("view", { class: "month-header" }, [
  8376. vue.createElementVNode(
  8377. "text",
  8378. { class: "month-title" },
  8379. vue.toDisplayString(group.month) + "月",
  8380. 1
  8381. /* TEXT */
  8382. ),
  8383. vue.createElementVNode("view", { class: "month-summary" }, [
  8384. vue.createElementVNode(
  8385. "text",
  8386. { class: "month-sum-text" },
  8387. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  8388. 1
  8389. /* TEXT */
  8390. ),
  8391. vue.createElementVNode(
  8392. "text",
  8393. { class: "month-sum-text" },
  8394. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  8395. 1
  8396. /* TEXT */
  8397. )
  8398. ])
  8399. ]),
  8400. (vue.openBlock(true), vue.createElementBlock(
  8401. vue.Fragment,
  8402. null,
  8403. vue.renderList(group.items, (item, rIdx) => {
  8404. return vue.openBlock(), vue.createElementBlock("view", {
  8405. class: "record-item",
  8406. key: rIdx
  8407. }, [
  8408. vue.createElementVNode(
  8409. "view",
  8410. {
  8411. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8412. },
  8413. [
  8414. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8415. ],
  8416. 2
  8417. /* CLASS */
  8418. ),
  8419. vue.createElementVNode("view", { class: "ri-content" }, [
  8420. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8421. vue.createElementVNode(
  8422. "text",
  8423. { class: "ri-date" },
  8424. vue.toDisplayString(item.date),
  8425. 1
  8426. /* TEXT */
  8427. ),
  8428. vue.createElementVNode(
  8429. "text",
  8430. { class: "ri-title" },
  8431. vue.toDisplayString(item.title),
  8432. 1
  8433. /* TEXT */
  8434. )
  8435. ]),
  8436. vue.createElementVNode(
  8437. "text",
  8438. { class: "ri-desc" },
  8439. vue.toDisplayString(item.desc),
  8440. 1
  8441. /* TEXT */
  8442. )
  8443. ]),
  8444. vue.createElementVNode("view", { class: "ri-right" }, [
  8445. vue.createElementVNode(
  8446. "text",
  8447. {
  8448. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8449. },
  8450. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8451. 3
  8452. /* TEXT, CLASS */
  8453. ),
  8454. vue.createElementVNode(
  8455. "text",
  8456. {
  8457. class: vue.normalizeClass(["ri-status", item.statusClass])
  8458. },
  8459. vue.toDisplayString(item.status),
  8460. 3
  8461. /* TEXT, CLASS */
  8462. )
  8463. ])
  8464. ]);
  8465. }),
  8466. 128
  8467. /* KEYED_FRAGMENT */
  8468. ))
  8469. ]);
  8470. }),
  8471. 128
  8472. /* KEYED_FRAGMENT */
  8473. )),
  8474. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  8475. ])
  8476. ]);
  8477. }
  8478. 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"]]);
  8479. function listAllLevelConfigs() {
  8480. return request({
  8481. url: "/fulfiller/levelConfig/listAll",
  8482. method: "GET"
  8483. });
  8484. }
  8485. const logic = {
  8486. components: {
  8487. customTabbar
  8488. },
  8489. data() {
  8490. return {
  8491. showServicePopup: false,
  8492. showLogoutPopup: false,
  8493. profile: null,
  8494. profileLoading: false,
  8495. levelConfigs: []
  8496. // 等级配置列表
  8497. };
  8498. },
  8499. computed: {
  8500. // 根据 profile.level 匹配对应的等级名称
  8501. displayLevelName() {
  8502. if (!this.profile || !this.levelConfigs.length)
  8503. return "普通履约者";
  8504. const config = this.levelConfigs.find((c) => c.lvNo === this.profile.level);
  8505. return config ? config.name : this.profile.levelName || "普通履约者";
  8506. }
  8507. },
  8508. onShow() {
  8509. uni.hideTabBar();
  8510. if (isLoggedIn()) {
  8511. this.loadProfile();
  8512. this.loadLevelConfigs();
  8513. }
  8514. },
  8515. methods: {
  8516. async loadProfile() {
  8517. if (this.profileLoading)
  8518. return;
  8519. this.profileLoading = true;
  8520. try {
  8521. const res = await getMyProfile();
  8522. this.profile = res.data || null;
  8523. } catch (err) {
  8524. formatAppLog("error", "at pages/mine/logic.js:43", "获取个人信息失败:", err);
  8525. } finally {
  8526. this.profileLoading = false;
  8527. }
  8528. },
  8529. async loadLevelConfigs() {
  8530. try {
  8531. const res = await listAllLevelConfigs();
  8532. this.levelConfigs = res.data || [];
  8533. } catch (err) {
  8534. formatAppLog("error", "at pages/mine/logic.js:53", "加载等级配置失败:", err);
  8535. }
  8536. },
  8537. navToSettings() {
  8538. uni.navigateTo({
  8539. url: "/pages/mine/settings/index"
  8540. });
  8541. },
  8542. navToProfile() {
  8543. uni.navigateTo({
  8544. url: "/pages/mine/settings/profile/index"
  8545. });
  8546. },
  8547. navToLevel() {
  8548. uni.navigateTo({
  8549. url: "/pages/mine/level/index"
  8550. });
  8551. },
  8552. navToNotification() {
  8553. uni.navigateTo({
  8554. url: "/pages/mine/message/index"
  8555. });
  8556. },
  8557. navToWallet() {
  8558. uni.navigateTo({
  8559. url: "/pages/mine/wallet/index"
  8560. });
  8561. },
  8562. navToPoints() {
  8563. uni.navigateTo({
  8564. url: "/pages/mine/points/index"
  8565. });
  8566. },
  8567. navToOrderStats() {
  8568. uni.navigateTo({
  8569. url: "/pages/mine/order-stats"
  8570. });
  8571. },
  8572. navToRewards() {
  8573. uni.navigateTo({
  8574. url: "/pages/mine/rewards"
  8575. });
  8576. },
  8577. openServicePopup() {
  8578. this.showServicePopup = true;
  8579. },
  8580. closeServicePopup() {
  8581. this.showServicePopup = false;
  8582. },
  8583. previewQRCode() {
  8584. uni.previewImage({
  8585. urls: ["/static/logo.png"]
  8586. });
  8587. },
  8588. openOnlineService() {
  8589. uni.showToast({
  8590. title: "正在跳转企业微信客服...",
  8591. icon: "none"
  8592. });
  8593. },
  8594. callServicePhone() {
  8595. uni.makePhoneCall({
  8596. phoneNumber: "400-123-4567"
  8597. });
  8598. },
  8599. logout() {
  8600. this.showLogoutPopup = true;
  8601. },
  8602. cancelLogout() {
  8603. this.showLogoutPopup = false;
  8604. },
  8605. async confirmLogout() {
  8606. this.showLogoutPopup = false;
  8607. try {
  8608. await logout();
  8609. } catch (e) {
  8610. }
  8611. clearAuth();
  8612. uni.reLaunch({
  8613. url: "/pages/login/login"
  8614. });
  8615. }
  8616. }
  8617. };
  8618. const _imports_0$1 = "/static/icons/motorbike.svg";
  8619. const _imports_1$5 = "/static/icons/location.svg";
  8620. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  8621. const _imports_3$1 = "/static/icons/calendar.svg";
  8622. const _imports_4 = "/static/icons/settings.svg";
  8623. const _imports_1$4 = "/static/icons/crown.svg";
  8624. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  8625. const _imports_3 = "/static/icons/chevron_right.svg";
  8626. const _imports_8 = "/static/icons/money_linear.svg";
  8627. const _imports_9 = "/static/icons/close_gray.svg";
  8628. const _imports_11 = "/static/icons/headset_green.svg";
  8629. const _imports_13 = "/static/icons/phone_green.svg";
  8630. const _sfc_main$m = {
  8631. ...logic
  8632. };
  8633. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  8634. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
  8635. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8636. return vue.openBlock(), vue.createElementBlock(
  8637. vue.Fragment,
  8638. null,
  8639. [
  8640. vue.createElementVNode("view", { class: "container" }, [
  8641. vue.createElementVNode("view", { class: "nav-bg" }, [
  8642. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8643. vue.createElementVNode("view", { class: "bg-circle-2" })
  8644. ]),
  8645. vue.createElementVNode("view", { class: "header-section" }, [
  8646. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8647. vue.createElementVNode("view", {
  8648. class: "user-card",
  8649. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8650. }, [
  8651. vue.createElementVNode("image", {
  8652. class: "avatar",
  8653. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8654. mode: "aspectFill"
  8655. }, null, 8, ["src"]),
  8656. vue.createElementVNode("view", { class: "info-content" }, [
  8657. vue.createElementVNode("view", { class: "name-row" }, [
  8658. vue.createElementVNode(
  8659. "text",
  8660. { class: "name" },
  8661. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8662. 1
  8663. /* TEXT */
  8664. ),
  8665. vue.createElementVNode("view", { class: "tags" }, [
  8666. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8667. key: 0,
  8668. class: "tag green"
  8669. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8670. key: 1,
  8671. class: "tag green"
  8672. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8673. key: 2,
  8674. class: "tag",
  8675. style: { "background": "#eee", "color": "#999" }
  8676. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8677. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8678. key: 3,
  8679. class: "tag blue"
  8680. }, "全职")) : vue.createCommentVNode("v-if", true),
  8681. vue.createElementVNode("image", {
  8682. class: "bike-icon",
  8683. src: _imports_0$1
  8684. })
  8685. ])
  8686. ]),
  8687. vue.createElementVNode("view", { class: "detail-row" }, [
  8688. vue.createElementVNode("image", {
  8689. class: "small-icon",
  8690. src: _imports_1$5
  8691. }),
  8692. vue.createElementVNode(
  8693. "text",
  8694. null,
  8695. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8696. 1
  8697. /* TEXT */
  8698. ),
  8699. vue.createElementVNode("image", {
  8700. class: "arrow-icon-small",
  8701. src: _imports_0
  8702. })
  8703. ]),
  8704. vue.createElementVNode("view", { class: "detail-row" }, [
  8705. vue.createElementVNode("image", {
  8706. class: "small-icon",
  8707. src: _imports_3$1
  8708. }),
  8709. vue.createElementVNode(
  8710. "text",
  8711. null,
  8712. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8713. 1
  8714. /* TEXT */
  8715. )
  8716. ])
  8717. ]),
  8718. vue.createElementVNode("image", {
  8719. class: "settings-icon",
  8720. src: _imports_4,
  8721. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8722. })
  8723. ]),
  8724. vue.createElementVNode("view", { class: "vip-card" }, [
  8725. vue.createElementVNode("view", { class: "vip-left" }, [
  8726. vue.createElementVNode("image", {
  8727. class: "vip-icon",
  8728. src: _imports_1$4
  8729. }),
  8730. vue.createElementVNode("view", { class: "vip-text" }, [
  8731. vue.createElementVNode(
  8732. "text",
  8733. { class: "vip-title" },
  8734. vue.toDisplayString(_ctx.displayLevelName),
  8735. 1
  8736. /* TEXT */
  8737. ),
  8738. vue.createElementVNode("text", { class: "vip-desc" }, "完成更多订单即可升级")
  8739. ])
  8740. ]),
  8741. vue.createElementVNode("view", {
  8742. class: "vip-btn",
  8743. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8744. }, [
  8745. vue.createElementVNode("text", null, "查看权益"),
  8746. vue.createElementVNode("image", {
  8747. class: "arrow-icon-small",
  8748. src: _imports_6
  8749. })
  8750. ])
  8751. ])
  8752. ]),
  8753. vue.createElementVNode("view", { class: "stats-panel" }, [
  8754. vue.createElementVNode("view", {
  8755. class: "stat-item",
  8756. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8757. }, [
  8758. vue.createElementVNode("view", { class: "stat-header" }, [
  8759. vue.createElementVNode("view", { class: "red-bar" }),
  8760. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8761. vue.createElementVNode("image", {
  8762. class: "arrow-icon",
  8763. src: _imports_3
  8764. })
  8765. ]),
  8766. vue.createElementVNode("view", { class: "stat-value" }, [
  8767. vue.createElementVNode(
  8768. "text",
  8769. { class: "num" },
  8770. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8771. 1
  8772. /* TEXT */
  8773. ),
  8774. vue.createElementVNode("text", { class: "unit" }, "元")
  8775. ]),
  8776. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8777. ]),
  8778. vue.createElementVNode("view", { class: "divider" }),
  8779. vue.createElementVNode("view", {
  8780. class: "stat-item",
  8781. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8782. }, [
  8783. vue.createElementVNode("view", { class: "stat-header" }, [
  8784. vue.createElementVNode("view", { class: "green-bar" }),
  8785. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8786. vue.createElementVNode("image", {
  8787. class: "arrow-icon",
  8788. src: _imports_3
  8789. })
  8790. ]),
  8791. vue.createElementVNode("view", { class: "stat-value" }, [
  8792. vue.createElementVNode(
  8793. "text",
  8794. { class: "num" },
  8795. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.orderCount) || 0),
  8796. 1
  8797. /* TEXT */
  8798. ),
  8799. vue.createElementVNode("text", { class: "unit" }, "单")
  8800. ]),
  8801. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8802. ]),
  8803. vue.createElementVNode("view", { class: "divider" }),
  8804. vue.createElementVNode("view", {
  8805. class: "stat-item",
  8806. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8807. }, [
  8808. vue.createElementVNode("view", { class: "stat-header" }, [
  8809. vue.createElementVNode("view", { class: "orange-bar" }),
  8810. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8811. vue.createElementVNode("image", {
  8812. class: "arrow-icon",
  8813. src: _imports_3
  8814. })
  8815. ]),
  8816. vue.createElementVNode("view", { class: "stat-value" }, [
  8817. vue.createElementVNode(
  8818. "text",
  8819. { class: "num" },
  8820. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.points) || 0),
  8821. 1
  8822. /* TEXT */
  8823. ),
  8824. vue.createElementVNode("text", { class: "unit" }, "分")
  8825. ]),
  8826. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8827. ])
  8828. ]),
  8829. vue.createElementVNode("view", { class: "menu-list" }, [
  8830. vue.createElementVNode("view", {
  8831. class: "menu-item",
  8832. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8833. }, [
  8834. vue.createElementVNode("image", {
  8835. class: "menu-icon",
  8836. src: _imports_8
  8837. }),
  8838. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8839. vue.createElementVNode("image", {
  8840. class: "arrow-icon",
  8841. src: _imports_3
  8842. })
  8843. ])
  8844. ]),
  8845. vue.createElementVNode("view", {
  8846. class: "logout-btn",
  8847. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.logout && _ctx.logout(...args))
  8848. }, "退出登录"),
  8849. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8850. key: 0,
  8851. class: "service-popup-mask",
  8852. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8853. }, [
  8854. vue.createElementVNode("view", {
  8855. class: "service-popup",
  8856. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  8857. }, ["stop"]))
  8858. }, [
  8859. vue.createElementVNode("view", { class: "service-header" }, [
  8860. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8861. vue.createElementVNode("image", {
  8862. class: "close-icon",
  8863. src: _imports_9,
  8864. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8865. })
  8866. ]),
  8867. vue.createElementVNode("view", { class: "qr-section" }, [
  8868. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8869. vue.createElementVNode("image", {
  8870. class: "qr-img",
  8871. src: _imports_1$8,
  8872. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8873. }),
  8874. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8875. ]),
  8876. vue.createElementVNode("view", { class: "service-list" }, [
  8877. vue.createElementVNode("view", {
  8878. class: "service-row",
  8879. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8880. }, [
  8881. vue.createElementVNode("image", {
  8882. class: "service-row-icon",
  8883. src: _imports_11
  8884. }),
  8885. vue.createElementVNode("view", { class: "service-info" }, [
  8886. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8887. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8888. ]),
  8889. vue.createElementVNode("image", {
  8890. class: "arrow-icon-small",
  8891. src: _imports_3
  8892. })
  8893. ]),
  8894. vue.createElementVNode("view", { class: "service-row" }, [
  8895. vue.createElementVNode("image", {
  8896. class: "service-row-icon",
  8897. src: _imports_12
  8898. }),
  8899. vue.createElementVNode("view", { class: "service-info" }, [
  8900. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8901. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8902. ]),
  8903. vue.createElementVNode("view", {
  8904. class: "call-btn",
  8905. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8906. }, [
  8907. vue.createElementVNode("image", {
  8908. class: "phone-icon-small",
  8909. src: _imports_13
  8910. }),
  8911. vue.createElementVNode("text", null, "拨打")
  8912. ])
  8913. ])
  8914. ])
  8915. ])
  8916. ])) : vue.createCommentVNode("v-if", true),
  8917. vue.createElementVNode(
  8918. "view",
  8919. {
  8920. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8921. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8922. onTouchmove: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  8923. }, ["stop", "prevent"]))
  8924. },
  8925. [
  8926. vue.createElementVNode("view", {
  8927. class: "popup-modal",
  8928. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  8929. }, ["stop"]))
  8930. }, [
  8931. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8932. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8933. vue.createElementVNode("view", { class: "popup-actions" }, [
  8934. vue.createElementVNode("view", {
  8935. class: "popup-btn cancel",
  8936. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8937. }, "取消"),
  8938. vue.createElementVNode("view", {
  8939. class: "popup-btn confirm",
  8940. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8941. }, "确定")
  8942. ])
  8943. ])
  8944. ],
  8945. 34
  8946. /* CLASS, NEED_HYDRATION */
  8947. )
  8948. ]),
  8949. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8950. ],
  8951. 64
  8952. /* STABLE_FRAGMENT */
  8953. );
  8954. }
  8955. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8956. const _sfc_main$l = {
  8957. data() {
  8958. return {
  8959. version: "2.0.6",
  8960. cacheSize: "0B",
  8961. // 明确默认状态为开启:获取不到缓存即为 true,以此确保默认值为开启。
  8962. isGpsEnabled: uni.getStorageSync("GPS_REPORT_ENABLED") !== false
  8963. };
  8964. },
  8965. onLoad() {
  8966. this.getAppVersion();
  8967. this.getCacheSize();
  8968. },
  8969. methods: {
  8970. navBack() {
  8971. uni.navigateBack({
  8972. delta: 1
  8973. });
  8974. },
  8975. navTo(type) {
  8976. let url = "";
  8977. switch (type) {
  8978. case "profile":
  8979. url = "/pages/mine/settings/profile/index";
  8980. break;
  8981. case "auth":
  8982. url = "/pages/mine/settings/auth/index";
  8983. break;
  8984. case "bank":
  8985. url = "/pages/mine/settings/bank/index";
  8986. break;
  8987. case "security":
  8988. url = "/pages/mine/settings/security/index";
  8989. break;
  8990. case "push":
  8991. url = "/pages/mine/settings/notification/index";
  8992. break;
  8993. case "about":
  8994. url = "/pages/mine/settings/about/index";
  8995. break;
  8996. default:
  8997. formatAppLog("log", "at pages/mine/settings/index.vue:114", "Navigate to:", type);
  8998. return;
  8999. }
  9000. uni.navigateTo({ url });
  9001. },
  9002. clearCache() {
  9003. uni.showModal({
  9004. title: "清理缓存",
  9005. content: "确定要清理应用缓存吗?",
  9006. success: (res) => {
  9007. if (res.confirm) {
  9008. try {
  9009. const token = uni.getStorageSync("Authorization_token");
  9010. const gpsToggle = uni.getStorageSync("GPS_REPORT_ENABLED");
  9011. uni.clearStorageSync();
  9012. if (token)
  9013. uni.setStorageSync("Authorization_token", token);
  9014. uni.setStorageSync("GPS_REPORT_ENABLED", gpsToggle);
  9015. uni.showToast({ title: "清理完成", icon: "success" });
  9016. this.getCacheSize();
  9017. } catch (err) {
  9018. formatAppLog("error", "at pages/mine/settings/index.vue:140", "清理缓存失败:", err);
  9019. }
  9020. }
  9021. }
  9022. });
  9023. },
  9024. getCacheSize() {
  9025. try {
  9026. const res = uni.getStorageInfoSync();
  9027. const kb = res.currentSize;
  9028. if (kb < 1024) {
  9029. this.cacheSize = kb + "KB";
  9030. } else {
  9031. this.cacheSize = (kb / 1024).toFixed(2) + "MB";
  9032. }
  9033. } catch (err) {
  9034. this.cacheSize = "0B";
  9035. }
  9036. },
  9037. getAppVersion() {
  9038. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  9039. this.version = widgetInfo.version || "2.0.6";
  9040. });
  9041. },
  9042. onGpsSwitchChange(e) {
  9043. const val = e.detail.value;
  9044. this.isGpsEnabled = val;
  9045. uni.setStorageSync("GPS_REPORT_ENABLED", val);
  9046. if (val) {
  9047. startGpsTimer();
  9048. } else {
  9049. stopGpsTimer();
  9050. }
  9051. }
  9052. }
  9053. };
  9054. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  9055. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9056. vue.createElementVNode("view", { class: "custom-header" }, [
  9057. vue.createElementVNode("view", {
  9058. class: "header-left",
  9059. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9060. }, [
  9061. vue.createElementVNode("image", {
  9062. class: "back-icon",
  9063. src: _imports_0,
  9064. style: { "transform": "rotate(180deg)" }
  9065. })
  9066. ]),
  9067. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  9068. vue.createElementVNode("view", { class: "header-right" })
  9069. ]),
  9070. vue.createElementVNode("view", { class: "header-placeholder" }),
  9071. vue.createElementVNode("view", { class: "group-card" }, [
  9072. vue.createElementVNode("view", {
  9073. class: "list-item",
  9074. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  9075. }, [
  9076. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  9077. vue.createElementVNode("image", {
  9078. class: "arrow-icon",
  9079. src: _imports_3
  9080. })
  9081. ]),
  9082. vue.createElementVNode("view", {
  9083. class: "list-item",
  9084. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  9085. }, [
  9086. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  9087. vue.createElementVNode("image", {
  9088. class: "arrow-icon",
  9089. src: _imports_3
  9090. })
  9091. ]),
  9092. vue.createElementVNode("view", {
  9093. class: "list-item no-border",
  9094. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("security"))
  9095. }, [
  9096. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  9097. vue.createElementVNode("image", {
  9098. class: "arrow-icon",
  9099. src: _imports_3
  9100. })
  9101. ])
  9102. ]),
  9103. vue.createElementVNode("view", { class: "group-card" }, [
  9104. vue.createElementVNode("view", { class: "list-item" }, [
  9105. vue.createElementVNode("view", { class: "item-row-left" }, [
  9106. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  9107. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  9108. ]),
  9109. vue.createElementVNode("switch", {
  9110. checked: $data.isGpsEnabled,
  9111. color: "#FF5722",
  9112. style: { "transform": "scale(0.8)" },
  9113. onChange: _cache[4] || (_cache[4] = (...args) => $options.onGpsSwitchChange && $options.onGpsSwitchChange(...args))
  9114. }, null, 40, ["checked"])
  9115. ]),
  9116. vue.createElementVNode("view", {
  9117. class: "list-item",
  9118. onClick: _cache[5] || (_cache[5] = (...args) => $options.clearCache && $options.clearCache(...args))
  9119. }, [
  9120. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  9121. vue.createElementVNode("view", { class: "item-right" }, [
  9122. vue.createElementVNode(
  9123. "text",
  9124. { class: "item-value" },
  9125. vue.toDisplayString($data.cacheSize),
  9126. 1
  9127. /* TEXT */
  9128. ),
  9129. vue.createElementVNode("image", {
  9130. class: "arrow-icon",
  9131. src: _imports_3
  9132. })
  9133. ])
  9134. ]),
  9135. vue.createElementVNode("view", {
  9136. class: "list-item no-border",
  9137. onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("about"))
  9138. }, [
  9139. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  9140. vue.createElementVNode("view", { class: "item-right" }, [
  9141. vue.createElementVNode(
  9142. "text",
  9143. { class: "item-value" },
  9144. "v" + vue.toDisplayString($data.version),
  9145. 1
  9146. /* TEXT */
  9147. ),
  9148. vue.createElementVNode("image", {
  9149. class: "arrow-icon",
  9150. src: _imports_3
  9151. })
  9152. ])
  9153. ])
  9154. ])
  9155. ]);
  9156. }
  9157. 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"]]);
  9158. const _sfc_main$k = {
  9159. data() {
  9160. return {
  9161. userInfo: {
  9162. name: "",
  9163. workType: "",
  9164. workStatus: "",
  9165. city: "",
  9166. avatar: "/static/touxiang.png",
  9167. stationName: "",
  9168. stationFullName: ""
  9169. },
  9170. isStatusPickerShow: false,
  9171. isCityPickerShow: false,
  9172. // 城市站点级联选择器
  9173. selectStep: 0,
  9174. selectedPathway: [],
  9175. currentCityList: [],
  9176. selectedCityId: null,
  9177. fullTree: []
  9178. // 树形结构数据
  9179. };
  9180. },
  9181. onLoad() {
  9182. this.loadUserInfo();
  9183. uni.$on("updateName", (newName) => {
  9184. this.userInfo.name = newName;
  9185. });
  9186. },
  9187. onUnload() {
  9188. uni.$off("updateName");
  9189. },
  9190. methods: {
  9191. // 加载用户信息 @author steelwei
  9192. async loadUserInfo() {
  9193. uni.showLoading({ title: "加载中..." });
  9194. try {
  9195. const res = await getMyProfile();
  9196. if (res.code === 200) {
  9197. const data = res.data;
  9198. this.userInfo = {
  9199. name: data.realName || data.name,
  9200. workType: data.workType === "full_time" ? "全职" : "兼职",
  9201. workStatus: this.formatStatus(data.status),
  9202. city: data.cityName || "",
  9203. avatar: data.avatarUrl || "/static/touxiang.png",
  9204. stationName: data.stationName || "",
  9205. stationFullName: "加载中..."
  9206. };
  9207. if (data.stationId) {
  9208. if (this.fullTree.length === 0) {
  9209. await this.loadAreaStationTree();
  9210. }
  9211. this.userInfo.stationFullName = this.findStationFullName(data.stationId, this.fullTree) || data.stationName || "未分配站点";
  9212. } else {
  9213. this.userInfo.stationFullName = "未分配站点";
  9214. }
  9215. } else {
  9216. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  9217. }
  9218. } catch (error) {
  9219. formatAppLog("error", "at pages/mine/settings/profile/index.vue:182", "加载用户信息失败:", error);
  9220. uni.showToast({ title: "网络错误", icon: "none" });
  9221. } finally {
  9222. uni.hideLoading();
  9223. }
  9224. },
  9225. // 格式化状态 @author steelwei
  9226. formatStatus(status) {
  9227. const statusMap = {
  9228. "busy": "接单中",
  9229. "resting": "休息中",
  9230. "disabled": "已禁用"
  9231. };
  9232. return statusMap[status] || status;
  9233. },
  9234. // 查找站点完整路径 (城市/区域/站点) @author steelwei
  9235. findStationFullName(stationId, tree) {
  9236. if (!stationId || !tree || tree.length === 0)
  9237. return "";
  9238. let path = [];
  9239. const dfs = (nodes, targetId, currentPath) => {
  9240. for (let node of nodes) {
  9241. if (node.id === targetId) {
  9242. path = [...currentPath, node.name];
  9243. return true;
  9244. }
  9245. if (node.children && node.children.length > 0) {
  9246. if (dfs(node.children, targetId, [...currentPath, node.name])) {
  9247. return true;
  9248. }
  9249. }
  9250. }
  9251. return false;
  9252. };
  9253. dfs(tree, stationId, []);
  9254. return path.join("/");
  9255. },
  9256. navBack() {
  9257. uni.navigateBack({ delta: 1 });
  9258. },
  9259. // 修改头像 @author steelwei
  9260. changeAvatar() {
  9261. uni.chooseImage({
  9262. count: 1,
  9263. success: async (res) => {
  9264. const tempFilePath = res.tempFilePaths[0];
  9265. uni.showLoading({ title: "上传中..." });
  9266. try {
  9267. const uploadRes = await uploadFile(tempFilePath);
  9268. if (uploadRes.code === 200) {
  9269. const { url, ossId } = uploadRes.data;
  9270. const result = await updateAvatar(ossId);
  9271. if (result.code === 200) {
  9272. this.userInfo.avatar = url;
  9273. uni.showToast({ title: "修改成功", icon: "success" });
  9274. } else {
  9275. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  9276. }
  9277. }
  9278. } catch (error) {
  9279. formatAppLog("error", "at pages/mine/settings/profile/index.vue:251", "修改头像失败:", error);
  9280. uni.showToast({ title: "上传失败", icon: "none" });
  9281. } finally {
  9282. uni.hideLoading();
  9283. }
  9284. }
  9285. });
  9286. },
  9287. editName() {
  9288. uni.navigateTo({
  9289. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  9290. });
  9291. },
  9292. showStatusPicker() {
  9293. this.isStatusPickerShow = true;
  9294. },
  9295. closeStatusPicker() {
  9296. this.isStatusPickerShow = false;
  9297. },
  9298. // 选择状态 @author steelwei
  9299. async selectStatus(statusText) {
  9300. const statusMap = {
  9301. "接单中": "busy",
  9302. "休息中": "resting"
  9303. };
  9304. const status = statusMap[statusText];
  9305. try {
  9306. const res = await updateStatus(status);
  9307. if (res.code === 200) {
  9308. this.userInfo.workStatus = statusText;
  9309. uni.showToast({ title: "状态已更新", icon: "success" });
  9310. } else {
  9311. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9312. }
  9313. } catch (error) {
  9314. formatAppLog("error", "at pages/mine/settings/profile/index.vue:291", "修改状态失败:", error);
  9315. uni.showToast({ title: "网络错误", icon: "none" });
  9316. } finally {
  9317. this.closeStatusPicker();
  9318. }
  9319. },
  9320. // 城市和站点级联选择器 @author steelwei
  9321. async showCityPicker() {
  9322. this.isCityPickerShow = true;
  9323. if (this.fullTree.length === 0) {
  9324. await this.loadAreaStationTree();
  9325. }
  9326. if (this.selectedPathway.length === 0) {
  9327. this.resetCityPicker();
  9328. }
  9329. },
  9330. async loadAreaStationTree() {
  9331. try {
  9332. uni.showLoading({ title: "加载中..." });
  9333. const res = await getAreaStationList();
  9334. const list = res.data || [];
  9335. let map = {};
  9336. let roots = [];
  9337. list.forEach((node) => {
  9338. map[node.id] = { ...node, children: [] };
  9339. });
  9340. list.forEach((node) => {
  9341. if (node.parentId === 0 || !map[node.parentId]) {
  9342. roots.push(map[node.id]);
  9343. } else {
  9344. map[node.parentId].children.push(map[node.id]);
  9345. }
  9346. });
  9347. this.fullTree = roots;
  9348. } catch (err) {
  9349. formatAppLog("error", "at pages/mine/settings/profile/index.vue:328", "加载站点数据失败:", err);
  9350. this.fullTree = [];
  9351. } finally {
  9352. uni.hideLoading();
  9353. }
  9354. },
  9355. resetCityPicker() {
  9356. this.selectStep = 0;
  9357. this.selectedPathway = [];
  9358. this.currentCityList = this.fullTree;
  9359. },
  9360. closeCityPicker() {
  9361. this.isCityPickerShow = false;
  9362. },
  9363. selectCityItem(item) {
  9364. this.selectedPathway[this.selectStep] = item;
  9365. if (item.children && item.children.length > 0) {
  9366. this.selectStep++;
  9367. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  9368. this.currentCityList = item.children;
  9369. } else {
  9370. this.selectedCityId = item.id;
  9371. this.confirmCity();
  9372. }
  9373. },
  9374. jumpToStep(step) {
  9375. this.selectStep = step;
  9376. if (step === 0) {
  9377. this.currentCityList = this.fullTree;
  9378. } else {
  9379. const parent = this.selectedPathway[step - 1];
  9380. this.currentCityList = parent ? parent.children : [];
  9381. }
  9382. },
  9383. // 确认城市与站点选择 @author steelwei
  9384. async confirmCity() {
  9385. if (this.selectedPathway.length === 0) {
  9386. uni.showToast({ title: "请选择站点", icon: "none" });
  9387. return;
  9388. }
  9389. let stationNode = this.selectedPathway[this.selectedPathway.length - 1];
  9390. const fullName = this.selectedPathway.map((i) => i.name).join("/");
  9391. const reqData = {
  9392. stationId: stationNode.id
  9393. };
  9394. try {
  9395. const res = await updateCity(reqData);
  9396. if (res.code === 200) {
  9397. this.userInfo.stationFullName = fullName;
  9398. uni.showToast({ title: "修改成功", icon: "success" });
  9399. this.closeCityPicker();
  9400. this.selectedPathway = [];
  9401. } else {
  9402. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9403. }
  9404. } catch (error) {
  9405. formatAppLog("error", "at pages/mine/settings/profile/index.vue:393", "修改失败:", error);
  9406. uni.showToast({ title: "网络错误", icon: "none" });
  9407. }
  9408. }
  9409. }
  9410. };
  9411. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  9412. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9413. vue.createElementVNode("view", { class: "custom-header" }, [
  9414. vue.createElementVNode("view", {
  9415. class: "header-left",
  9416. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9417. }, [
  9418. vue.createElementVNode("image", {
  9419. class: "back-icon",
  9420. src: _imports_0,
  9421. style: { "transform": "rotate(180deg)" }
  9422. })
  9423. ]),
  9424. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  9425. vue.createElementVNode("view", { class: "header-right" })
  9426. ]),
  9427. vue.createElementVNode("view", { class: "header-placeholder" }),
  9428. vue.createElementVNode("view", { class: "group-card" }, [
  9429. vue.createElementVNode("view", {
  9430. class: "list-item",
  9431. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  9432. }, [
  9433. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  9434. vue.createElementVNode("view", { class: "item-right" }, [
  9435. vue.createElementVNode("image", {
  9436. class: "user-avatar",
  9437. src: $data.userInfo.avatar,
  9438. mode: "aspectFill"
  9439. }, null, 8, ["src"]),
  9440. vue.createElementVNode("image", {
  9441. class: "arrow-icon",
  9442. src: _imports_3
  9443. })
  9444. ])
  9445. ]),
  9446. vue.createElementVNode("view", {
  9447. class: "list-item",
  9448. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  9449. }, [
  9450. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  9451. vue.createElementVNode("view", { class: "item-right" }, [
  9452. vue.createElementVNode(
  9453. "text",
  9454. { class: "item-value" },
  9455. vue.toDisplayString($data.userInfo.name),
  9456. 1
  9457. /* TEXT */
  9458. ),
  9459. vue.createElementVNode("image", {
  9460. class: "arrow-icon",
  9461. src: _imports_3
  9462. })
  9463. ])
  9464. ])
  9465. ]),
  9466. vue.createElementVNode("view", { class: "group-card" }, [
  9467. vue.createElementVNode("view", {
  9468. class: "list-item",
  9469. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  9470. }, [
  9471. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  9472. vue.createElementVNode("view", { class: "item-right" }, [
  9473. vue.createElementVNode(
  9474. "text",
  9475. { class: "item-value-black" },
  9476. vue.toDisplayString($data.userInfo.workStatus),
  9477. 1
  9478. /* TEXT */
  9479. ),
  9480. vue.createElementVNode("image", {
  9481. class: "arrow-icon",
  9482. src: _imports_3
  9483. })
  9484. ])
  9485. ])
  9486. ]),
  9487. vue.createElementVNode("view", { class: "group-card" }, [
  9488. vue.createElementVNode("view", {
  9489. class: "list-item no-border",
  9490. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  9491. }, [
  9492. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  9493. vue.createElementVNode("view", { class: "item-right" }, [
  9494. vue.createElementVNode(
  9495. "text",
  9496. { class: "item-value" },
  9497. vue.toDisplayString($data.userInfo.stationFullName || "未分配站点"),
  9498. 1
  9499. /* TEXT */
  9500. ),
  9501. vue.createElementVNode("image", {
  9502. class: "arrow-icon",
  9503. src: _imports_3
  9504. })
  9505. ])
  9506. ])
  9507. ]),
  9508. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9509. key: 0,
  9510. class: "popup-mask",
  9511. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9512. }, [
  9513. vue.createElementVNode("view", {
  9514. class: "popup-content",
  9515. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  9516. }, ["stop"]))
  9517. }, [
  9518. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  9519. vue.createElementVNode("view", {
  9520. class: "popup-item",
  9521. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  9522. }, "接单中"),
  9523. vue.createElementVNode("view", {
  9524. class: "popup-item",
  9525. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  9526. }, "休息中"),
  9527. vue.createElementVNode("view", {
  9528. class: "popup-cancel",
  9529. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9530. }, "取消")
  9531. ])
  9532. ])) : vue.createCommentVNode("v-if", true),
  9533. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9534. key: 1,
  9535. class: "popup-mask",
  9536. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9537. }, [
  9538. vue.createElementVNode("view", {
  9539. class: "popup-content",
  9540. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  9541. }, ["stop"]))
  9542. }, [
  9543. vue.createElementVNode("view", { class: "popup-header-row" }, [
  9544. vue.createElementVNode("text", {
  9545. class: "popup-btn-cancel",
  9546. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9547. }, "取消"),
  9548. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市和站点"),
  9549. vue.createElementVNode("text", {
  9550. class: "popup-btn-confirm",
  9551. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  9552. }, "确定")
  9553. ]),
  9554. vue.createElementVNode("view", { class: "picker-body" }, [
  9555. vue.createElementVNode("view", { class: "timeline-area" }, [
  9556. (vue.openBlock(true), vue.createElementBlock(
  9557. vue.Fragment,
  9558. null,
  9559. vue.renderList($data.selectedPathway, (item, index) => {
  9560. return vue.openBlock(), vue.createElementBlock("view", {
  9561. class: "timeline-item",
  9562. key: index,
  9563. onClick: ($event) => $options.jumpToStep(index)
  9564. }, [
  9565. vue.createElementVNode("view", { class: "timeline-dot" }),
  9566. vue.createElementVNode(
  9567. "text",
  9568. null,
  9569. vue.toDisplayString(item.name),
  9570. 1
  9571. /* TEXT */
  9572. )
  9573. ], 8, ["onClick"]);
  9574. }),
  9575. 128
  9576. /* KEYED_FRAGMENT */
  9577. )),
  9578. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  9579. key: 0,
  9580. class: "timeline-item active"
  9581. }, [
  9582. vue.createElementVNode("view", { class: "timeline-dot" }),
  9583. vue.createElementVNode("text", null, "请选择")
  9584. ])) : vue.createCommentVNode("v-if", true)
  9585. ]),
  9586. vue.createElementVNode("scroll-view", {
  9587. "scroll-y": "",
  9588. class: "list-area"
  9589. }, [
  9590. (vue.openBlock(true), vue.createElementBlock(
  9591. vue.Fragment,
  9592. null,
  9593. vue.renderList($data.currentCityList, (item) => {
  9594. return vue.openBlock(), vue.createElementBlock("view", {
  9595. class: "list-item",
  9596. key: item.id,
  9597. onClick: ($event) => $options.selectCityItem(item)
  9598. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  9599. }),
  9600. 128
  9601. /* KEYED_FRAGMENT */
  9602. )),
  9603. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9604. key: 0,
  9605. style: { "padding": "20rpx", "color": "#999" }
  9606. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  9607. ])
  9608. ])
  9609. ])
  9610. ])) : vue.createCommentVNode("v-if", true)
  9611. ]);
  9612. }
  9613. 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"]]);
  9614. const _sfc_main$j = {
  9615. data() {
  9616. return {
  9617. authInfo: {
  9618. realName: "",
  9619. idCard: "",
  9620. idCardFront: "",
  9621. idCardBack: "",
  9622. serviceTypes: [],
  9623. authId: false,
  9624. authQual: false,
  9625. pendingAudit: false,
  9626. qualImages: []
  9627. }
  9628. };
  9629. },
  9630. onLoad() {
  9631. this.loadAuthInfo();
  9632. },
  9633. methods: {
  9634. navBack() {
  9635. uni.navigateBack({
  9636. delta: 1
  9637. });
  9638. },
  9639. async loadAuthInfo() {
  9640. try {
  9641. const res = await getAuthInfo();
  9642. if (res.code === 200 && res.data) {
  9643. this.authInfo = {
  9644. realName: res.data.realName || "",
  9645. idCard: res.data.idCard || "",
  9646. idCardFront: res.data.idCardFrontUrl || "",
  9647. idCardBack: res.data.idCardBackUrl || "",
  9648. serviceTypes: res.data.serviceTypeList || [],
  9649. authId: res.data.authId || false,
  9650. authQual: res.data.authQual || false,
  9651. pendingAudit: res.data.pendingAudit || false,
  9652. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  9653. };
  9654. }
  9655. } catch (e) {
  9656. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  9657. uni.showToast({ title: "加载失败", icon: "none" });
  9658. }
  9659. },
  9660. maskIdCard(idCard) {
  9661. if (!idCard || idCard.length < 8)
  9662. return idCard;
  9663. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9664. },
  9665. editAuth() {
  9666. uni.showModal({
  9667. title: "提示",
  9668. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9669. success: (res) => {
  9670. if (res.confirm) {
  9671. uni.navigateTo({
  9672. url: "/pages/mine/settings/auth/edit"
  9673. });
  9674. }
  9675. }
  9676. });
  9677. }
  9678. }
  9679. };
  9680. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  9681. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9682. vue.createElementVNode("view", { class: "custom-header" }, [
  9683. vue.createElementVNode("view", {
  9684. class: "header-left",
  9685. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9686. }, [
  9687. vue.createElementVNode("image", {
  9688. class: "back-icon",
  9689. src: _imports_0,
  9690. style: { "transform": "rotate(180deg)" }
  9691. })
  9692. ]),
  9693. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9694. vue.createElementVNode("view", { class: "header-right" })
  9695. ]),
  9696. vue.createElementVNode("view", { class: "header-placeholder" }),
  9697. vue.createElementVNode("view", { class: "card" }, [
  9698. vue.createElementVNode("view", { class: "section-header" }, [
  9699. vue.createElementVNode("view", { class: "orange-bar" }),
  9700. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9701. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9702. key: 0,
  9703. class: "tag-orange"
  9704. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9705. key: 1,
  9706. class: "tag-green"
  9707. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9708. key: 2,
  9709. class: "tag-gray"
  9710. }, "未认证"))
  9711. ]),
  9712. vue.createElementVNode("view", { class: "info-row" }, [
  9713. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9714. vue.createElementVNode(
  9715. "text",
  9716. { class: "value" },
  9717. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9718. 1
  9719. /* TEXT */
  9720. )
  9721. ]),
  9722. vue.createElementVNode("view", { class: "info-row" }, [
  9723. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9724. vue.createElementVNode(
  9725. "text",
  9726. { class: "value" },
  9727. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9728. 1
  9729. /* TEXT */
  9730. )
  9731. ]),
  9732. vue.createElementVNode("view", { class: "id-card-row" }, [
  9733. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9734. key: 0,
  9735. class: "id-card-box green-bg"
  9736. }, [
  9737. vue.createElementVNode("image", {
  9738. class: "id-card-img",
  9739. src: $data.authInfo.idCardFront,
  9740. mode: "aspectFill"
  9741. }, null, 8, ["src"]),
  9742. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9743. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9744. key: 1,
  9745. class: "id-card-box green-bg"
  9746. }, [
  9747. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9748. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9749. ])),
  9750. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9751. key: 2,
  9752. class: "id-card-box green-bg"
  9753. }, [
  9754. vue.createElementVNode("image", {
  9755. class: "id-card-img",
  9756. src: $data.authInfo.idCardBack,
  9757. mode: "aspectFill"
  9758. }, null, 8, ["src"]),
  9759. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9760. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9761. key: 3,
  9762. class: "id-card-box green-bg"
  9763. }, [
  9764. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9765. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9766. ]))
  9767. ])
  9768. ]),
  9769. vue.createElementVNode("view", { class: "card" }, [
  9770. vue.createElementVNode("view", { class: "section-header" }, [
  9771. vue.createElementVNode("view", { class: "orange-bar" }),
  9772. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9773. ]),
  9774. vue.createElementVNode("view", { class: "tags-row" }, [
  9775. (vue.openBlock(true), vue.createElementBlock(
  9776. vue.Fragment,
  9777. null,
  9778. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9779. return vue.openBlock(), vue.createElementBlock(
  9780. "view",
  9781. {
  9782. class: "service-tag",
  9783. key: index
  9784. },
  9785. vue.toDisplayString(type),
  9786. 1
  9787. /* TEXT */
  9788. );
  9789. }),
  9790. 128
  9791. /* KEYED_FRAGMENT */
  9792. )),
  9793. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9794. key: 0,
  9795. class: "empty-text"
  9796. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9797. ])
  9798. ]),
  9799. vue.createElementVNode("view", { class: "card" }, [
  9800. vue.createElementVNode("view", { class: "section-header" }, [
  9801. vue.createElementVNode("view", { class: "orange-bar" }),
  9802. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9803. ]),
  9804. vue.createElementVNode(
  9805. "text",
  9806. { class: "sub-title" },
  9807. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9808. 1
  9809. /* TEXT */
  9810. ),
  9811. vue.createElementVNode("view", { class: "cert-row" }, [
  9812. (vue.openBlock(true), vue.createElementBlock(
  9813. vue.Fragment,
  9814. null,
  9815. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9816. return vue.openBlock(), vue.createElementBlock("view", {
  9817. class: "cert-box yellow-bg",
  9818. key: index
  9819. }, [
  9820. vue.createElementVNode("image", {
  9821. class: "cert-img",
  9822. src: img,
  9823. mode: "aspectFill"
  9824. }, null, 8, ["src"])
  9825. ]);
  9826. }),
  9827. 128
  9828. /* KEYED_FRAGMENT */
  9829. )),
  9830. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9831. key: 0,
  9832. class: "empty-text"
  9833. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9834. ])
  9835. ]),
  9836. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9837. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9838. key: 0,
  9839. class: "action-btn disabled",
  9840. disabled: ""
  9841. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9842. key: 1,
  9843. class: "action-btn",
  9844. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9845. }, "修改认证信息")),
  9846. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9847. key: 2,
  9848. class: "tips"
  9849. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9850. key: 3,
  9851. class: "tips"
  9852. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9853. ])
  9854. ]);
  9855. }
  9856. 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"]]);
  9857. const _sfc_main$i = {
  9858. data() {
  9859. return {
  9860. idCardFront: "",
  9861. idCardBack: "",
  9862. idCardFrontOssId: "",
  9863. idCardBackOssId: "",
  9864. serviceOptions: [],
  9865. selectedServices: [],
  9866. qualifications: {},
  9867. qualOssIds: {}
  9868. };
  9869. },
  9870. async onLoad() {
  9871. await this.loadServiceOptions();
  9872. this.loadAuthInfo();
  9873. },
  9874. methods: {
  9875. async loadServiceOptions() {
  9876. try {
  9877. const res = await getServiceTypes();
  9878. this.serviceOptions = (res.data || []).map((item) => ({
  9879. id: String(item.id),
  9880. name: item.name
  9881. }));
  9882. } catch (e) {
  9883. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:135", "加载服务类型失败", e);
  9884. }
  9885. },
  9886. async loadAuthInfo() {
  9887. try {
  9888. uni.showLoading({ title: "加载中..." });
  9889. const res = await getAuthInfo();
  9890. if (res.code === 200 && res.data) {
  9891. this.idCardFront = res.data.idCardFrontUrl || "";
  9892. this.idCardBack = res.data.idCardBackUrl || "";
  9893. this.idCardFrontOssId = res.data.idCardFront || "";
  9894. this.idCardBackOssId = res.data.idCardBack || "";
  9895. let serviceIds = [];
  9896. if (res.data.serviceTypes) {
  9897. serviceIds = [...new Set(
  9898. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9899. )];
  9900. }
  9901. this.selectedServices = serviceIds;
  9902. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9903. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9904. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9905. validNames.forEach((name, idx) => {
  9906. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9907. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9908. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9909. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9910. });
  9911. }
  9912. uni.hideLoading();
  9913. } catch (e) {
  9914. uni.hideLoading();
  9915. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:177", "加载认证信息失败", e);
  9916. uni.showToast({ title: "加载失败", icon: "none" });
  9917. }
  9918. },
  9919. navBack() {
  9920. uni.navigateBack({ delta: 1 });
  9921. },
  9922. chooseImage(side) {
  9923. uni.chooseImage({
  9924. count: 1,
  9925. sizeType: ["compressed"],
  9926. sourceType: ["album", "camera"],
  9927. success: async (res) => {
  9928. const tempPath = res.tempFilePaths[0];
  9929. if (side === "front") {
  9930. this.idCardFront = tempPath;
  9931. } else {
  9932. this.idCardBack = tempPath;
  9933. }
  9934. try {
  9935. uni.showLoading({ title: "上传中..." });
  9936. const uploadRes = await uploadFile(tempPath);
  9937. if (side === "front") {
  9938. this.idCardFrontOssId = uploadRes.data.ossId;
  9939. } else {
  9940. this.idCardBackOssId = uploadRes.data.ossId;
  9941. }
  9942. uni.hideLoading();
  9943. uni.showToast({ title: "上传成功", icon: "success" });
  9944. } catch (err) {
  9945. uni.hideLoading();
  9946. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:209", "上传身份证图片失败:", err);
  9947. uni.showToast({ title: "上传失败", icon: "none" });
  9948. }
  9949. }
  9950. });
  9951. },
  9952. deleteImage(side) {
  9953. if (side === "front") {
  9954. this.idCardFront = "";
  9955. this.idCardFrontOssId = "";
  9956. } else {
  9957. this.idCardBack = "";
  9958. this.idCardBackOssId = "";
  9959. }
  9960. },
  9961. getServiceName(serviceId) {
  9962. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9963. return found ? found.name : "";
  9964. },
  9965. toggleService(service) {
  9966. const index = this.selectedServices.indexOf(service.id);
  9967. if (index > -1) {
  9968. this.selectedServices.splice(index, 1);
  9969. this.$delete(this.qualifications, service.name);
  9970. this.$delete(this.qualOssIds, service.name);
  9971. } else {
  9972. this.selectedServices.push(service.id);
  9973. this.$set(this.qualifications, service.name, []);
  9974. this.$set(this.qualOssIds, service.name, []);
  9975. }
  9976. this.$forceUpdate();
  9977. },
  9978. chooseQualImage(service) {
  9979. uni.chooseImage({
  9980. count: 9,
  9981. sizeType: ["compressed"],
  9982. sourceType: ["album", "camera"],
  9983. success: async (res) => {
  9984. if (!this.qualifications[service]) {
  9985. this.qualifications[service] = [];
  9986. this.qualOssIds[service] = [];
  9987. }
  9988. for (const tempPath of res.tempFilePaths) {
  9989. this.qualifications[service].push(tempPath);
  9990. this.$forceUpdate();
  9991. try {
  9992. uni.showLoading({ title: "上传中..." });
  9993. const uploadRes = await uploadFile(tempPath);
  9994. this.qualOssIds[service].push(uploadRes.data.ossId);
  9995. uni.hideLoading();
  9996. } catch (err) {
  9997. uni.hideLoading();
  9998. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:263", "上传资质图片失败:", err);
  9999. }
  10000. }
  10001. }
  10002. });
  10003. },
  10004. deleteQualImage(service, index) {
  10005. this.qualifications[service].splice(index, 1);
  10006. if (this.qualOssIds[service]) {
  10007. this.qualOssIds[service].splice(index, 1);
  10008. }
  10009. this.$forceUpdate();
  10010. },
  10011. previewImage(service, index) {
  10012. uni.previewImage({
  10013. urls: this.qualifications[service],
  10014. current: index
  10015. });
  10016. },
  10017. async submitAuth() {
  10018. if (!this.idCardFront || !this.idCardBack) {
  10019. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  10020. return;
  10021. }
  10022. if (this.selectedServices.length === 0) {
  10023. uni.showToast({ title: "请选择服务类型", icon: "none" });
  10024. return;
  10025. }
  10026. for (const serviceId of this.selectedServices) {
  10027. const name = this.getServiceName(serviceId);
  10028. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  10029. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  10030. return;
  10031. }
  10032. }
  10033. uni.showModal({
  10034. title: "提示",
  10035. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  10036. success: (res) => {
  10037. if (res.confirm) {
  10038. this.doSubmit();
  10039. }
  10040. }
  10041. });
  10042. },
  10043. async doSubmit() {
  10044. const allQualOssIds = [];
  10045. Object.values(this.qualOssIds).forEach((ids) => {
  10046. allQualOssIds.push(...ids);
  10047. });
  10048. const submitData = {
  10049. idCardFront: this.idCardFrontOssId,
  10050. idCardBack: this.idCardBackOssId,
  10051. serviceTypes: this.selectedServices.join(","),
  10052. // 逗号分隔的服务类型ID
  10053. qualifications: allQualOssIds.join(",")
  10054. // 逗号分隔的资质图片OSS ID
  10055. };
  10056. try {
  10057. uni.showLoading({ title: "提交中..." });
  10058. await updateAuthInfo(submitData);
  10059. uni.hideLoading();
  10060. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  10061. setTimeout(() => {
  10062. uni.navigateBack({ delta: 1 });
  10063. }, 1500);
  10064. } catch (err) {
  10065. uni.hideLoading();
  10066. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:334", "提交失败:", err);
  10067. uni.showToast({ title: "提交失败", icon: "none" });
  10068. }
  10069. }
  10070. }
  10071. };
  10072. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  10073. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  10074. vue.createElementVNode("view", { class: "custom-header" }, [
  10075. vue.createElementVNode("view", {
  10076. class: "header-left",
  10077. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10078. }, [
  10079. vue.createElementVNode("image", {
  10080. class: "back-icon",
  10081. src: _imports_0,
  10082. style: { "transform": "rotate(180deg)" }
  10083. })
  10084. ]),
  10085. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  10086. vue.createElementVNode("view", { class: "header-right" })
  10087. ]),
  10088. vue.createElementVNode("view", { class: "header-placeholder" }),
  10089. vue.createElementVNode("view", { class: "warning-tip" }, [
  10090. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  10091. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  10092. ]),
  10093. vue.createElementVNode("view", { class: "section-card" }, [
  10094. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  10095. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  10096. vue.createElementVNode("view", { class: "id-card-row" }, [
  10097. vue.createElementVNode("view", {
  10098. class: "id-card-upload",
  10099. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  10100. }, [
  10101. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  10102. key: 0,
  10103. src: $data.idCardFront,
  10104. class: "id-card-img",
  10105. mode: "aspectFill"
  10106. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10107. key: 1,
  10108. class: "id-card-placeholder"
  10109. }, [
  10110. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  10111. ])),
  10112. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  10113. key: 2,
  10114. class: "delete-btn",
  10115. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  10116. }, "×")) : vue.createCommentVNode("v-if", true),
  10117. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  10118. ]),
  10119. vue.createElementVNode("view", {
  10120. class: "id-card-upload",
  10121. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  10122. }, [
  10123. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  10124. key: 0,
  10125. src: $data.idCardBack,
  10126. class: "id-card-img",
  10127. mode: "aspectFill"
  10128. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10129. key: 1,
  10130. class: "id-card-placeholder"
  10131. }, [
  10132. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  10133. ])),
  10134. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  10135. key: 2,
  10136. class: "delete-btn",
  10137. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  10138. }, "×")) : vue.createCommentVNode("v-if", true),
  10139. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  10140. ])
  10141. ])
  10142. ]),
  10143. vue.createElementVNode("view", { class: "section-card" }, [
  10144. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  10145. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  10146. vue.createElementVNode("view", { class: "service-list" }, [
  10147. (vue.openBlock(true), vue.createElementBlock(
  10148. vue.Fragment,
  10149. null,
  10150. vue.renderList($data.serviceOptions, (service, index) => {
  10151. return vue.openBlock(), vue.createElementBlock("view", {
  10152. class: "service-item",
  10153. key: service.id,
  10154. onClick: ($event) => $options.toggleService(service)
  10155. }, [
  10156. vue.createElementVNode(
  10157. "text",
  10158. { class: "service-name" },
  10159. vue.toDisplayString(service.name),
  10160. 1
  10161. /* TEXT */
  10162. ),
  10163. vue.createElementVNode(
  10164. "view",
  10165. {
  10166. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  10167. },
  10168. [
  10169. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  10170. ],
  10171. 2
  10172. /* CLASS */
  10173. )
  10174. ], 8, ["onClick"]);
  10175. }),
  10176. 128
  10177. /* KEYED_FRAGMENT */
  10178. ))
  10179. ])
  10180. ]),
  10181. vue.createElementVNode("view", { class: "section-card" }, [
  10182. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  10183. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  10184. (vue.openBlock(true), vue.createElementBlock(
  10185. vue.Fragment,
  10186. null,
  10187. vue.renderList($data.selectedServices, (serviceId, index) => {
  10188. return vue.openBlock(), vue.createElementBlock("view", {
  10189. key: serviceId,
  10190. class: "qual-section"
  10191. }, [
  10192. vue.createElementVNode(
  10193. "text",
  10194. { class: "qual-title" },
  10195. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  10196. 1
  10197. /* TEXT */
  10198. ),
  10199. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  10200. (vue.openBlock(true), vue.createElementBlock(
  10201. vue.Fragment,
  10202. null,
  10203. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  10204. return vue.openBlock(), vue.createElementBlock("view", {
  10205. class: "qual-item",
  10206. key: imgIndex,
  10207. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  10208. }, [
  10209. vue.createElementVNode("image", {
  10210. src: img,
  10211. class: "qual-img",
  10212. mode: "aspectFill"
  10213. }, null, 8, ["src"]),
  10214. vue.createElementVNode("view", {
  10215. class: "delete-btn",
  10216. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  10217. }, "×", 8, ["onClick"])
  10218. ], 8, ["onClick"]);
  10219. }),
  10220. 128
  10221. /* KEYED_FRAGMENT */
  10222. )),
  10223. vue.createElementVNode("view", {
  10224. class: "qual-upload-btn",
  10225. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  10226. }, [
  10227. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  10228. ], 8, ["onClick"])
  10229. ])
  10230. ]);
  10231. }),
  10232. 128
  10233. /* KEYED_FRAGMENT */
  10234. )),
  10235. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  10236. key: 0,
  10237. class: "empty-hint"
  10238. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  10239. ]),
  10240. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  10241. vue.createElementVNode("button", {
  10242. class: "submit-btn",
  10243. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  10244. }, "提交审核")
  10245. ])
  10246. ]);
  10247. }
  10248. 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"]]);
  10249. const _imports_1$3 = "/static/icons/shield.svg";
  10250. const _sfc_main$h = {
  10251. data() {
  10252. return {
  10253. hasShieldIcon: false
  10254. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  10255. };
  10256. },
  10257. methods: {
  10258. navBack() {
  10259. uni.navigateBack({
  10260. delta: 1
  10261. });
  10262. },
  10263. editBank() {
  10264. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  10265. }
  10266. }
  10267. };
  10268. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  10269. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10270. vue.createElementVNode("view", { class: "custom-header" }, [
  10271. vue.createElementVNode("view", {
  10272. class: "header-left",
  10273. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10274. }, [
  10275. vue.createElementVNode("image", {
  10276. class: "back-icon",
  10277. src: _imports_0,
  10278. style: { "transform": "rotate(180deg)" }
  10279. })
  10280. ]),
  10281. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  10282. vue.createElementVNode("view", { class: "header-right" })
  10283. ]),
  10284. vue.createElementVNode("view", { class: "header-placeholder" }),
  10285. vue.createElementVNode("view", { class: "bank-card" }, [
  10286. vue.createElementVNode("view", { class: "card-top" }, [
  10287. vue.createElementVNode("view", { class: "bank-info" }, [
  10288. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  10289. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  10290. ]),
  10291. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  10292. ]),
  10293. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  10294. ]),
  10295. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  10296. vue.createElementVNode("view", { class: "card-bg-circle" })
  10297. ]),
  10298. vue.createElementVNode("button", {
  10299. class: "action-btn",
  10300. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  10301. }, "修改银行卡信息"),
  10302. vue.createElementVNode("view", { class: "security-tip" }, [
  10303. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  10304. key: 0,
  10305. class: "shield-icon",
  10306. src: _imports_1$3
  10307. })) : vue.createCommentVNode("v-if", true),
  10308. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  10309. ])
  10310. ]);
  10311. }
  10312. 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"]]);
  10313. const _sfc_main$g = {
  10314. data() {
  10315. return {
  10316. phone: "",
  10317. hasPassword: false
  10318. };
  10319. },
  10320. onLoad() {
  10321. this.loadProfile();
  10322. },
  10323. methods: {
  10324. navBack() {
  10325. uni.navigateBack({
  10326. delta: 1
  10327. });
  10328. },
  10329. async loadProfile() {
  10330. try {
  10331. const res = await getMyProfile();
  10332. if (res.code === 200 && res.data) {
  10333. this.phone = res.data.phone || "";
  10334. this.hasPassword = !!res.data.hasPassword;
  10335. }
  10336. } catch (e) {
  10337. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  10338. }
  10339. },
  10340. maskPhone(phone) {
  10341. if (!phone || phone.length < 11)
  10342. return phone;
  10343. return phone.substring(0, 3) + "****" + phone.substring(7);
  10344. },
  10345. changeMobile() {
  10346. uni.navigateTo({
  10347. url: "/pages/mine/settings/security/change-phone"
  10348. });
  10349. },
  10350. changePassword() {
  10351. uni.navigateTo({
  10352. url: "/pages/mine/settings/security/change-password"
  10353. });
  10354. },
  10355. async deleteAccount() {
  10356. uni.showModal({
  10357. title: "警示",
  10358. content: "注销账号后将无法恢复,确定要继续吗?",
  10359. success: async (res) => {
  10360. if (res.confirm) {
  10361. try {
  10362. const result = await deleteAccount();
  10363. if (result.code === 200) {
  10364. uni.showToast({ title: "账号已注销", icon: "success" });
  10365. setTimeout(() => {
  10366. uni.reLaunch({ url: "/pages/login/login" });
  10367. }, 1500);
  10368. } else {
  10369. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  10370. }
  10371. } catch (e) {
  10372. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  10373. uni.showToast({ title: "注销失败", icon: "none" });
  10374. }
  10375. }
  10376. }
  10377. });
  10378. }
  10379. }
  10380. };
  10381. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  10382. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10383. vue.createElementVNode("view", { class: "custom-header" }, [
  10384. vue.createElementVNode("view", {
  10385. class: "header-left",
  10386. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10387. }, [
  10388. vue.createElementVNode("image", {
  10389. class: "back-icon",
  10390. src: _imports_0,
  10391. style: { "transform": "rotate(180deg)" }
  10392. })
  10393. ]),
  10394. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  10395. vue.createElementVNode("view", { class: "header-right" })
  10396. ]),
  10397. vue.createElementVNode("view", { class: "header-placeholder" }),
  10398. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  10399. vue.createElementVNode("view", { class: "group-card" }, [
  10400. vue.createElementVNode("view", {
  10401. class: "list-item",
  10402. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  10403. }, [
  10404. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  10405. vue.createElementVNode("view", { class: "item-right" }, [
  10406. vue.createElementVNode(
  10407. "text",
  10408. { class: "item-value" },
  10409. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  10410. 1
  10411. /* TEXT */
  10412. ),
  10413. vue.createElementVNode("image", {
  10414. class: "arrow-icon",
  10415. src: _imports_3
  10416. })
  10417. ])
  10418. ]),
  10419. vue.createElementVNode("view", {
  10420. class: "list-item",
  10421. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  10422. }, [
  10423. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  10424. vue.createElementVNode("view", { class: "item-right" }, [
  10425. vue.createElementVNode(
  10426. "text",
  10427. { class: "item-value" },
  10428. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  10429. 1
  10430. /* TEXT */
  10431. ),
  10432. vue.createElementVNode("image", {
  10433. class: "arrow-icon",
  10434. src: _imports_3
  10435. })
  10436. ])
  10437. ])
  10438. ]),
  10439. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  10440. vue.createElementVNode("view", { class: "group-card" }, [
  10441. vue.createElementVNode("view", {
  10442. class: "list-item no-border",
  10443. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  10444. }, [
  10445. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  10446. vue.createElementVNode("image", {
  10447. class: "arrow-icon",
  10448. src: _imports_3
  10449. })
  10450. ])
  10451. ])
  10452. ]);
  10453. }
  10454. 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"]]);
  10455. const _sfc_main$f = {
  10456. data() {
  10457. return {
  10458. name: ""
  10459. };
  10460. },
  10461. onLoad(options) {
  10462. if (options.name) {
  10463. this.name = decodeURIComponent(options.name);
  10464. }
  10465. },
  10466. methods: {
  10467. navBack() {
  10468. uni.navigateBack({ delta: 1 });
  10469. },
  10470. // 提交修改 @author steelwei
  10471. async submitChange() {
  10472. if (!this.name || !this.name.trim()) {
  10473. uni.showToast({ title: "请输入姓名", icon: "none" });
  10474. return;
  10475. }
  10476. if (this.name.trim().length < 2) {
  10477. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  10478. return;
  10479. }
  10480. uni.showLoading({ title: "提交中..." });
  10481. try {
  10482. const res = await updateName(this.name.trim());
  10483. if (res.code === 200) {
  10484. uni.showToast({
  10485. title: "修改成功",
  10486. icon: "success",
  10487. duration: 2e3
  10488. });
  10489. uni.$emit("updateName", this.name.trim());
  10490. setTimeout(() => {
  10491. uni.navigateBack({ delta: 1 });
  10492. }, 2e3);
  10493. } else {
  10494. uni.showToast({
  10495. title: res.msg || "修改失败",
  10496. icon: "none"
  10497. });
  10498. }
  10499. } catch (error) {
  10500. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  10501. uni.showToast({ title: "网络错误", icon: "none" });
  10502. } finally {
  10503. uni.hideLoading();
  10504. }
  10505. }
  10506. }
  10507. };
  10508. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  10509. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10510. vue.createElementVNode("view", { class: "custom-header" }, [
  10511. vue.createElementVNode("view", {
  10512. class: "header-left",
  10513. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10514. }, [
  10515. vue.createElementVNode("image", {
  10516. class: "back-icon",
  10517. src: _imports_0,
  10518. style: { "transform": "rotate(180deg)" }
  10519. })
  10520. ]),
  10521. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  10522. vue.createElementVNode("view", { class: "header-right" })
  10523. ]),
  10524. vue.createElementVNode("view", { class: "header-placeholder" }),
  10525. vue.createElementVNode("view", { class: "form-card" }, [
  10526. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10527. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  10528. vue.withDirectives(vue.createElementVNode(
  10529. "input",
  10530. {
  10531. class: "form-input",
  10532. type: "text",
  10533. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  10534. placeholder: "请输入真实姓名",
  10535. "placeholder-class": "placeholder",
  10536. maxlength: "20"
  10537. },
  10538. null,
  10539. 512
  10540. /* NEED_PATCH */
  10541. ), [
  10542. [vue.vModelText, $data.name]
  10543. ])
  10544. ])
  10545. ]),
  10546. vue.createElementVNode("view", { class: "btn-area" }, [
  10547. vue.createElementVNode("button", {
  10548. class: "submit-btn",
  10549. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  10550. }, "确认修改")
  10551. ]),
  10552. vue.createElementVNode("view", { class: "tips" }, [
  10553. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  10554. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  10555. ])
  10556. ]);
  10557. }
  10558. 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"]]);
  10559. const _sfc_main$e = {
  10560. data() {
  10561. return {
  10562. oldPassword: "",
  10563. newPassword: "",
  10564. confirmPassword: ""
  10565. };
  10566. },
  10567. methods: {
  10568. navBack() {
  10569. uni.navigateBack({ delta: 1 });
  10570. },
  10571. // 提交修改 @author steelwei
  10572. async submitChange() {
  10573. if (!this.oldPassword) {
  10574. uni.showToast({ title: "请输入旧密码", icon: "none" });
  10575. return;
  10576. }
  10577. if (!this.newPassword) {
  10578. uni.showToast({ title: "请输入新密码", icon: "none" });
  10579. return;
  10580. }
  10581. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  10582. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  10583. return;
  10584. }
  10585. if (this.newPassword !== this.confirmPassword) {
  10586. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  10587. return;
  10588. }
  10589. uni.showLoading({ title: "提交中..." });
  10590. try {
  10591. const res = await updatePassword(this.oldPassword, this.newPassword);
  10592. if (res.code === 200) {
  10593. uni.showToast({
  10594. title: "修改成功",
  10595. icon: "success",
  10596. duration: 2e3
  10597. });
  10598. setTimeout(() => {
  10599. uni.navigateBack({ delta: 1 });
  10600. }, 2e3);
  10601. } else {
  10602. uni.showToast({
  10603. title: res.msg || "修改失败",
  10604. icon: "none"
  10605. });
  10606. }
  10607. } catch (error) {
  10608. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  10609. uni.showToast({ title: "网络错误", icon: "none" });
  10610. } finally {
  10611. uni.hideLoading();
  10612. }
  10613. }
  10614. }
  10615. };
  10616. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  10617. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10618. vue.createElementVNode("view", { class: "custom-header" }, [
  10619. vue.createElementVNode("view", {
  10620. class: "header-left",
  10621. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10622. }, [
  10623. vue.createElementVNode("image", {
  10624. class: "back-icon",
  10625. src: _imports_0,
  10626. style: { "transform": "rotate(180deg)" }
  10627. })
  10628. ]),
  10629. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  10630. vue.createElementVNode("view", { class: "header-right" })
  10631. ]),
  10632. vue.createElementVNode("view", { class: "header-placeholder" }),
  10633. vue.createElementVNode("view", { class: "form-card" }, [
  10634. vue.createElementVNode("view", { class: "form-item" }, [
  10635. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  10636. vue.withDirectives(vue.createElementVNode(
  10637. "input",
  10638. {
  10639. class: "form-input",
  10640. type: "password",
  10641. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  10642. placeholder: "请输入旧密码",
  10643. "placeholder-class": "placeholder"
  10644. },
  10645. null,
  10646. 512
  10647. /* NEED_PATCH */
  10648. ), [
  10649. [vue.vModelText, $data.oldPassword]
  10650. ])
  10651. ]),
  10652. vue.createElementVNode("view", { class: "form-item" }, [
  10653. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  10654. vue.withDirectives(vue.createElementVNode(
  10655. "input",
  10656. {
  10657. class: "form-input",
  10658. type: "password",
  10659. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  10660. placeholder: "请输入新密码(6-20位)",
  10661. "placeholder-class": "placeholder"
  10662. },
  10663. null,
  10664. 512
  10665. /* NEED_PATCH */
  10666. ), [
  10667. [vue.vModelText, $data.newPassword]
  10668. ])
  10669. ]),
  10670. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10671. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10672. vue.withDirectives(vue.createElementVNode(
  10673. "input",
  10674. {
  10675. class: "form-input",
  10676. type: "password",
  10677. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10678. placeholder: "请再次输入新密码",
  10679. "placeholder-class": "placeholder"
  10680. },
  10681. null,
  10682. 512
  10683. /* NEED_PATCH */
  10684. ), [
  10685. [vue.vModelText, $data.confirmPassword]
  10686. ])
  10687. ])
  10688. ]),
  10689. vue.createElementVNode("view", { class: "btn-area" }, [
  10690. vue.createElementVNode("button", {
  10691. class: "submit-btn",
  10692. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10693. }, "确认修改")
  10694. ])
  10695. ]);
  10696. }
  10697. 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"]]);
  10698. const _sfc_main$d = {
  10699. data() {
  10700. return {
  10701. phone: "",
  10702. code: "",
  10703. countdown: 0,
  10704. timer: null
  10705. };
  10706. },
  10707. onUnload() {
  10708. if (this.timer) {
  10709. clearInterval(this.timer);
  10710. }
  10711. },
  10712. methods: {
  10713. navBack() {
  10714. uni.navigateBack({ delta: 1 });
  10715. },
  10716. // 发送验证码 @author steelwei
  10717. sendCode() {
  10718. if (!this.phone) {
  10719. uni.showToast({ title: "请输入手机号", icon: "none" });
  10720. return;
  10721. }
  10722. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10723. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10724. return;
  10725. }
  10726. uni.showToast({ title: "验证码已发送", icon: "success" });
  10727. this.countdown = 60;
  10728. this.timer = setInterval(() => {
  10729. this.countdown--;
  10730. if (this.countdown <= 0) {
  10731. clearInterval(this.timer);
  10732. }
  10733. }, 1e3);
  10734. },
  10735. // 提交修改 @author steelwei
  10736. async submitChange() {
  10737. if (!this.phone) {
  10738. uni.showToast({ title: "请输入手机号", icon: "none" });
  10739. return;
  10740. }
  10741. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10742. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10743. return;
  10744. }
  10745. if (!this.code) {
  10746. uni.showToast({ title: "请输入验证码", icon: "none" });
  10747. return;
  10748. }
  10749. uni.showLoading({ title: "提交中..." });
  10750. try {
  10751. const res = await updatePhone(this.phone, this.code);
  10752. if (res.code === 200) {
  10753. uni.showToast({
  10754. title: "修改成功",
  10755. icon: "success",
  10756. duration: 2e3
  10757. });
  10758. setTimeout(() => {
  10759. uni.navigateBack({ delta: 1 });
  10760. }, 2e3);
  10761. } else {
  10762. uni.showToast({
  10763. title: res.msg || "修改失败",
  10764. icon: "none"
  10765. });
  10766. }
  10767. } catch (error) {
  10768. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10769. uni.showToast({ title: "网络错误", icon: "none" });
  10770. } finally {
  10771. uni.hideLoading();
  10772. }
  10773. }
  10774. }
  10775. };
  10776. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  10777. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10778. vue.createElementVNode("view", { class: "custom-header" }, [
  10779. vue.createElementVNode("view", {
  10780. class: "header-left",
  10781. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10782. }, [
  10783. vue.createElementVNode("image", {
  10784. class: "back-icon",
  10785. src: _imports_0,
  10786. style: { "transform": "rotate(180deg)" }
  10787. })
  10788. ]),
  10789. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10790. vue.createElementVNode("view", { class: "header-right" })
  10791. ]),
  10792. vue.createElementVNode("view", { class: "header-placeholder" }),
  10793. vue.createElementVNode("view", { class: "form-card" }, [
  10794. vue.createElementVNode("view", { class: "form-item" }, [
  10795. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10796. vue.withDirectives(vue.createElementVNode(
  10797. "input",
  10798. {
  10799. class: "form-input",
  10800. type: "number",
  10801. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10802. placeholder: "请输入新手机号",
  10803. "placeholder-class": "placeholder",
  10804. maxlength: "11"
  10805. },
  10806. null,
  10807. 512
  10808. /* NEED_PATCH */
  10809. ), [
  10810. [vue.vModelText, $data.phone]
  10811. ])
  10812. ]),
  10813. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10814. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10815. vue.withDirectives(vue.createElementVNode(
  10816. "input",
  10817. {
  10818. class: "form-input",
  10819. type: "number",
  10820. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10821. placeholder: "请输入验证码",
  10822. "placeholder-class": "placeholder",
  10823. maxlength: "6"
  10824. },
  10825. null,
  10826. 512
  10827. /* NEED_PATCH */
  10828. ), [
  10829. [vue.vModelText, $data.code]
  10830. ]),
  10831. vue.createElementVNode("button", {
  10832. class: "code-btn",
  10833. disabled: $data.countdown > 0,
  10834. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10835. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10836. ])
  10837. ]),
  10838. vue.createElementVNode("view", { class: "btn-area" }, [
  10839. vue.createElementVNode("button", {
  10840. class: "submit-btn",
  10841. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10842. }, "确认修改")
  10843. ]),
  10844. vue.createElementVNode("view", { class: "tips" }, [
  10845. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10846. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10847. ])
  10848. ]);
  10849. }
  10850. 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"]]);
  10851. const _sfc_main$c = {
  10852. data() {
  10853. return {};
  10854. },
  10855. methods: {
  10856. navBack() {
  10857. uni.navigateBack({
  10858. delta: 1
  10859. });
  10860. },
  10861. switchChange(type, e) {
  10862. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10863. }
  10864. }
  10865. };
  10866. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10867. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10868. vue.createElementVNode("view", { class: "custom-header" }, [
  10869. vue.createElementVNode("view", {
  10870. class: "header-left",
  10871. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10872. }, [
  10873. vue.createElementVNode("image", {
  10874. class: "back-icon",
  10875. src: _imports_0,
  10876. style: { "transform": "rotate(180deg)" }
  10877. })
  10878. ]),
  10879. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10880. vue.createElementVNode("view", { class: "header-right" })
  10881. ]),
  10882. vue.createElementVNode("view", { class: "header-placeholder" }),
  10883. vue.createElementVNode("view", { class: "group-card" }, [
  10884. vue.createElementVNode("view", { class: "list-item" }, [
  10885. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10886. vue.createElementVNode(
  10887. "switch",
  10888. {
  10889. checked: "",
  10890. color: "#FF5722",
  10891. style: { "transform": "scale(0.8)" },
  10892. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10893. },
  10894. null,
  10895. 32
  10896. /* NEED_HYDRATION */
  10897. )
  10898. ]),
  10899. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10900. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10901. vue.createElementVNode(
  10902. "switch",
  10903. {
  10904. checked: "",
  10905. color: "#FF5722",
  10906. style: { "transform": "scale(0.8)" },
  10907. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10908. },
  10909. null,
  10910. 32
  10911. /* NEED_HYDRATION */
  10912. )
  10913. ])
  10914. ]),
  10915. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10916. ]);
  10917. }
  10918. 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"]]);
  10919. const _sfc_main$b = {
  10920. data() {
  10921. return {
  10922. version: "2.0.6"
  10923. };
  10924. },
  10925. onLoad() {
  10926. this.getAppVersion();
  10927. },
  10928. methods: {
  10929. navBack() {
  10930. uni.navigateBack({
  10931. delta: 1
  10932. });
  10933. },
  10934. goToDetail(id) {
  10935. uni.navigateTo({
  10936. url: `/pages/mine/settings/about/agreement-detail?id=${id}`
  10937. });
  10938. },
  10939. checkUpdate() {
  10940. uni.showToast({ title: "已是最新版本", icon: "none" });
  10941. },
  10942. getAppVersion() {
  10943. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  10944. this.version = widgetInfo.version || "2.0.6";
  10945. });
  10946. }
  10947. }
  10948. };
  10949. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10950. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10951. vue.createElementVNode("view", { class: "custom-header" }, [
  10952. vue.createElementVNode("view", {
  10953. class: "header-left",
  10954. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10955. }, [
  10956. vue.createElementVNode("image", {
  10957. class: "back-icon",
  10958. src: _imports_0,
  10959. style: { "transform": "rotate(180deg)" }
  10960. })
  10961. ]),
  10962. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10963. vue.createElementVNode("view", { class: "header-right" })
  10964. ]),
  10965. vue.createElementVNode("view", { class: "header-placeholder" }),
  10966. vue.createElementVNode("view", { class: "logo-area" }, [
  10967. vue.createElementVNode("image", {
  10968. class: "app-logo",
  10969. src: _imports_1$8,
  10970. mode: "aspectFit"
  10971. }),
  10972. vue.createElementVNode("text", { class: "app-name" }, "履约者"),
  10973. vue.createElementVNode(
  10974. "text",
  10975. { class: "app-version" },
  10976. "Version " + vue.toDisplayString($data.version),
  10977. 1
  10978. /* TEXT */
  10979. )
  10980. ]),
  10981. vue.createElementVNode("view", { class: "group-card" }, [
  10982. vue.createElementVNode("view", {
  10983. class: "list-item",
  10984. onClick: _cache[1] || (_cache[1] = ($event) => $options.goToDetail(1))
  10985. }, [
  10986. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10987. vue.createElementVNode("image", {
  10988. class: "arrow-icon",
  10989. src: _imports_3
  10990. })
  10991. ]),
  10992. vue.createElementVNode("view", {
  10993. class: "list-item",
  10994. onClick: _cache[2] || (_cache[2] = ($event) => $options.goToDetail(2))
  10995. }, [
  10996. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10997. vue.createElementVNode("image", {
  10998. class: "arrow-icon",
  10999. src: _imports_3
  11000. })
  11001. ])
  11002. ])
  11003. ]);
  11004. }
  11005. 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"]]);
  11006. const _imports_1$2 = "/static/icons/wallet_white.svg";
  11007. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  11008. const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
  11009. const _sfc_main$a = {
  11010. data() {
  11011. return {
  11012. balance: "0.00",
  11013. pendingBalance: "0.00",
  11014. currentTab: 0,
  11015. list: [],
  11016. pageNum: 1,
  11017. pageSize: 10,
  11018. total: 0,
  11019. loading: false
  11020. };
  11021. },
  11022. computed: {
  11023. displayList() {
  11024. if (this.currentTab === 0)
  11025. return this.list;
  11026. if (this.currentTab === 1)
  11027. return this.list.filter((item) => item.type === "income");
  11028. if (this.currentTab === 2)
  11029. return this.list.filter((item) => item.type === "expense");
  11030. return [];
  11031. }
  11032. },
  11033. onShow() {
  11034. this.fetchData();
  11035. this.fetchList(true);
  11036. },
  11037. onReachBottom() {
  11038. this.fetchList();
  11039. },
  11040. methods: {
  11041. async fetchData() {
  11042. try {
  11043. const res = await getBalanceOnApp();
  11044. if (res.code === 200 && res.data) {
  11045. this.balance = (res.data.balance / 100).toFixed(2);
  11046. this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
  11047. }
  11048. } catch (error) {
  11049. formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
  11050. }
  11051. },
  11052. async fetchList(reset = false) {
  11053. if (reset) {
  11054. this.pageNum = 1;
  11055. this.list = [];
  11056. this.total = 0;
  11057. }
  11058. if (this.loading)
  11059. return;
  11060. if (!reset && this.list.length >= this.total && this.total !== 0)
  11061. return;
  11062. this.loading = true;
  11063. try {
  11064. const res = await pageBalanceOnApp({
  11065. pageNum: this.pageNum,
  11066. pageSize: this.pageSize
  11067. });
  11068. if (res.code === 200) {
  11069. this.total = res.total || 0;
  11070. const rows = res.rows || [];
  11071. const mappedRows = rows.map((item) => {
  11072. const isAdd = item.type === "add";
  11073. const uiType = isAdd ? "income" : "expense";
  11074. const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
  11075. let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
  11076. if (!isAdd) {
  11077. amountStr = "-" + amountStr;
  11078. }
  11079. return {
  11080. ...item,
  11081. title,
  11082. desc: item.reason || "",
  11083. time: item.createTime || "",
  11084. amount: amountStr,
  11085. type: uiType,
  11086. // 'income' or 'expense' for template class
  11087. tag: title
  11088. };
  11089. });
  11090. this.list = this.list.concat(mappedRows);
  11091. this.pageNum++;
  11092. }
  11093. } catch (error) {
  11094. formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
  11095. } finally {
  11096. this.loading = false;
  11097. }
  11098. },
  11099. navBack() {
  11100. uni.navigateBack();
  11101. },
  11102. navToBill() {
  11103. uni.navigateTo({
  11104. url: "/pages/mine/wallet/bill"
  11105. });
  11106. },
  11107. switchTab(index) {
  11108. this.currentTab = index;
  11109. }
  11110. }
  11111. };
  11112. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  11113. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11114. vue.createElementVNode("view", { class: "nav-bar" }, [
  11115. vue.createElementVNode("view", {
  11116. class: "nav-left",
  11117. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11118. }, [
  11119. vue.createElementVNode("image", {
  11120. class: "back-icon",
  11121. src: _imports_0
  11122. })
  11123. ]),
  11124. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  11125. vue.createElementVNode("view", { class: "nav-right" })
  11126. ]),
  11127. vue.createElementVNode("view", { class: "wallet-card" }, [
  11128. vue.createElementVNode("view", { class: "bg-circle big" }),
  11129. vue.createElementVNode("view", { class: "bg-circle small" }),
  11130. vue.createElementVNode("view", { class: "card-content" }, [
  11131. vue.createElementVNode("view", { class: "card-top" }, [
  11132. vue.createElementVNode("view", { class: "app-info" }, [
  11133. vue.createElementVNode("image", {
  11134. class: "app-logo",
  11135. src: _imports_1$2,
  11136. mode: "aspectFit"
  11137. }),
  11138. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  11139. ]),
  11140. vue.createElementVNode("view", {
  11141. class: "bill-btn",
  11142. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  11143. }, [
  11144. vue.createElementVNode("text", null, "账单")
  11145. ])
  11146. ]),
  11147. vue.createElementVNode("view", { class: "balance-container" }, [
  11148. vue.createElementVNode("view", { class: "balance-main" }, [
  11149. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  11150. vue.createElementVNode(
  11151. "text",
  11152. { class: "balance-num" },
  11153. vue.toDisplayString($data.balance),
  11154. 1
  11155. /* TEXT */
  11156. )
  11157. ]),
  11158. vue.createElementVNode("view", { class: "balance-pending" }, [
  11159. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  11160. vue.createElementVNode(
  11161. "text",
  11162. { class: "pending-num" },
  11163. vue.toDisplayString($data.pendingBalance),
  11164. 1
  11165. /* TEXT */
  11166. )
  11167. ])
  11168. ])
  11169. ])
  11170. ]),
  11171. vue.createElementVNode("view", { class: "record-container" }, [
  11172. vue.createElementVNode("view", { class: "record-header" }, [
  11173. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  11174. vue.createElementVNode("view", {
  11175. class: "header-more",
  11176. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  11177. }, [
  11178. vue.createElementVNode("text", null, "查看全部"),
  11179. vue.createElementVNode("image", {
  11180. class: "more-icon",
  11181. src: _imports_2$2
  11182. })
  11183. ])
  11184. ]),
  11185. vue.createElementVNode("view", { class: "tabs-row" }, [
  11186. vue.createElementVNode(
  11187. "view",
  11188. {
  11189. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11190. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  11191. },
  11192. [
  11193. vue.createElementVNode("text", null, "全部"),
  11194. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11195. key: 0,
  11196. class: "tab-line"
  11197. })) : vue.createCommentVNode("v-if", true)
  11198. ],
  11199. 2
  11200. /* CLASS */
  11201. ),
  11202. vue.createElementVNode(
  11203. "view",
  11204. {
  11205. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11206. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  11207. },
  11208. [
  11209. vue.createElementVNode("text", null, "收入"),
  11210. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11211. key: 0,
  11212. class: "tab-line"
  11213. })) : vue.createCommentVNode("v-if", true)
  11214. ],
  11215. 2
  11216. /* CLASS */
  11217. ),
  11218. vue.createElementVNode(
  11219. "view",
  11220. {
  11221. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11222. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  11223. },
  11224. [
  11225. vue.createElementVNode("text", null, "支出"),
  11226. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11227. key: 0,
  11228. class: "tab-line"
  11229. })) : vue.createCommentVNode("v-if", true)
  11230. ],
  11231. 2
  11232. /* CLASS */
  11233. )
  11234. ]),
  11235. vue.createElementVNode("view", { class: "record-list" }, [
  11236. (vue.openBlock(true), vue.createElementBlock(
  11237. vue.Fragment,
  11238. null,
  11239. vue.renderList($options.displayList, (item, index) => {
  11240. return vue.openBlock(), vue.createElementBlock("view", {
  11241. class: "list-item",
  11242. key: index
  11243. }, [
  11244. vue.createElementVNode("view", { class: "item-left" }, [
  11245. vue.createElementVNode(
  11246. "text",
  11247. { class: "item-title" },
  11248. vue.toDisplayString(item.title),
  11249. 1
  11250. /* TEXT */
  11251. ),
  11252. vue.createElementVNode(
  11253. "text",
  11254. { class: "item-desc" },
  11255. vue.toDisplayString(item.desc),
  11256. 1
  11257. /* TEXT */
  11258. ),
  11259. vue.createElementVNode(
  11260. "text",
  11261. { class: "item-time" },
  11262. vue.toDisplayString(item.time),
  11263. 1
  11264. /* TEXT */
  11265. )
  11266. ]),
  11267. vue.createElementVNode("view", { class: "item-right" }, [
  11268. vue.createElementVNode(
  11269. "text",
  11270. {
  11271. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11272. },
  11273. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11274. 3
  11275. /* TEXT, CLASS */
  11276. ),
  11277. vue.createElementVNode("view", { class: "item-tag" }, [
  11278. vue.createElementVNode(
  11279. "text",
  11280. null,
  11281. vue.toDisplayString(item.tag),
  11282. 1
  11283. /* TEXT */
  11284. )
  11285. ])
  11286. ])
  11287. ]);
  11288. }),
  11289. 128
  11290. /* KEYED_FRAGMENT */
  11291. ))
  11292. ])
  11293. ])
  11294. ]);
  11295. }
  11296. 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"]]);
  11297. const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
  11298. const _sfc_main$9 = {
  11299. data() {
  11300. const d = /* @__PURE__ */ new Date();
  11301. return {
  11302. currentTab: 0,
  11303. year: d.getFullYear(),
  11304. month: d.getMonth() + 1,
  11305. groups: []
  11306. };
  11307. },
  11308. computed: {
  11309. currentDate() {
  11310. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  11311. },
  11312. displayGroups() {
  11313. if (this.currentTab === 0)
  11314. return this.groups;
  11315. return this.groups.map((group) => {
  11316. const filteredItems = group.items.filter((item) => {
  11317. const type = this.currentTab === 1 ? "income" : "expense";
  11318. return item.type === type;
  11319. });
  11320. return {
  11321. ...group,
  11322. items: filteredItems
  11323. };
  11324. }).filter((group) => group.items.length > 0);
  11325. }
  11326. },
  11327. onShow() {
  11328. this.fetchData();
  11329. },
  11330. methods: {
  11331. async fetchData() {
  11332. try {
  11333. const res = await listBalanceOnApp({
  11334. year: this.year,
  11335. month: this.month
  11336. });
  11337. if (res.code === 200) {
  11338. const list = res.data || [];
  11339. let incomeTotal = 0;
  11340. let expenseTotal = 0;
  11341. const items = list.map((item) => {
  11342. const isAdd = item.type === "add";
  11343. const uiType = isAdd ? "income" : "expense";
  11344. const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
  11345. let amountVal = Math.abs(item.amount) / 100;
  11346. if (isAdd) {
  11347. incomeTotal += amountVal;
  11348. } else {
  11349. expenseTotal += amountVal;
  11350. }
  11351. let amountStr = amountVal.toFixed(2);
  11352. if (!isAdd)
  11353. amountStr = "-" + amountStr;
  11354. let timeStr = item.createTime || "";
  11355. if (timeStr.length >= 16) {
  11356. timeStr = timeStr.substring(5, 16);
  11357. }
  11358. return {
  11359. ...item,
  11360. title,
  11361. desc: item.reason || "",
  11362. time: timeStr,
  11363. amount: amountStr,
  11364. type: uiType,
  11365. tag: title
  11366. };
  11367. });
  11368. this.groups = [
  11369. {
  11370. month: `${this.month}月 ${this.year}`,
  11371. income: incomeTotal.toFixed(2),
  11372. expense: expenseTotal.toFixed(2),
  11373. items
  11374. }
  11375. ];
  11376. }
  11377. } catch (error) {
  11378. formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
  11379. }
  11380. },
  11381. onDateChange(e) {
  11382. const val = e.detail.value;
  11383. const [y, m] = val.split("-");
  11384. this.year = parseInt(y, 10);
  11385. this.month = parseInt(m, 10);
  11386. this.fetchData();
  11387. },
  11388. navBack() {
  11389. uni.navigateBack();
  11390. },
  11391. switchTab(index) {
  11392. this.currentTab = index;
  11393. }
  11394. }
  11395. };
  11396. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  11397. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11398. vue.createElementVNode("view", { class: "nav-bar" }, [
  11399. vue.createElementVNode("view", {
  11400. class: "nav-left",
  11401. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11402. }, [
  11403. vue.createElementVNode("image", {
  11404. class: "back-icon",
  11405. src: _imports_0
  11406. })
  11407. ]),
  11408. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  11409. vue.createElementVNode("view", { class: "nav-right" })
  11410. ]),
  11411. vue.createElementVNode("view", { class: "content-area" }, [
  11412. vue.createElementVNode("view", { class: "filter-area" }, [
  11413. vue.createElementVNode("view", { class: "tabs-row" }, [
  11414. vue.createElementVNode(
  11415. "view",
  11416. {
  11417. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11418. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11419. },
  11420. [
  11421. vue.createElementVNode("text", null, "全部"),
  11422. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11423. key: 0,
  11424. class: "tab-line"
  11425. })) : vue.createCommentVNode("v-if", true)
  11426. ],
  11427. 2
  11428. /* CLASS */
  11429. ),
  11430. vue.createElementVNode(
  11431. "view",
  11432. {
  11433. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11434. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11435. },
  11436. [
  11437. vue.createElementVNode("text", null, "收入"),
  11438. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11439. key: 0,
  11440. class: "tab-line"
  11441. })) : vue.createCommentVNode("v-if", true)
  11442. ],
  11443. 2
  11444. /* CLASS */
  11445. ),
  11446. vue.createElementVNode(
  11447. "view",
  11448. {
  11449. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11450. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11451. },
  11452. [
  11453. vue.createElementVNode("text", null, "支出"),
  11454. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11455. key: 0,
  11456. class: "tab-line"
  11457. })) : vue.createCommentVNode("v-if", true)
  11458. ],
  11459. 2
  11460. /* CLASS */
  11461. )
  11462. ]),
  11463. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  11464. vue.createElementVNode("picker", {
  11465. mode: "date",
  11466. fields: "month",
  11467. value: $options.currentDate,
  11468. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  11469. }, [
  11470. vue.createElementVNode("view", { class: "date-picker" }, [
  11471. vue.createElementVNode(
  11472. "text",
  11473. { class: "date-text" },
  11474. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  11475. 1
  11476. /* TEXT */
  11477. ),
  11478. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  11479. ])
  11480. ], 40, ["value"])
  11481. ])
  11482. ]),
  11483. vue.createElementVNode("scroll-view", {
  11484. "scroll-y": "",
  11485. class: "bill-list"
  11486. }, [
  11487. (vue.openBlock(true), vue.createElementBlock(
  11488. vue.Fragment,
  11489. null,
  11490. vue.renderList($options.displayGroups, (group, gIndex) => {
  11491. return vue.openBlock(), vue.createElementBlock("view", {
  11492. key: gIndex,
  11493. class: "month-group"
  11494. }, [
  11495. vue.createElementVNode("view", { class: "group-header" }, [
  11496. vue.createElementVNode(
  11497. "text",
  11498. { class: "month-title" },
  11499. vue.toDisplayString(group.month),
  11500. 1
  11501. /* TEXT */
  11502. ),
  11503. vue.createElementVNode(
  11504. "text",
  11505. { class: "month-summary" },
  11506. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  11507. 1
  11508. /* TEXT */
  11509. )
  11510. ]),
  11511. (vue.openBlock(true), vue.createElementBlock(
  11512. vue.Fragment,
  11513. null,
  11514. vue.renderList(group.items, (item, index) => {
  11515. return vue.openBlock(), vue.createElementBlock("view", {
  11516. class: "list-item",
  11517. key: index
  11518. }, [
  11519. vue.createElementVNode(
  11520. "view",
  11521. {
  11522. class: vue.normalizeClass(["item-icon-box", item.type])
  11523. },
  11524. [
  11525. vue.createElementVNode(
  11526. "text",
  11527. { class: "item-icon-symbol" },
  11528. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11529. 1
  11530. /* TEXT */
  11531. )
  11532. ],
  11533. 2
  11534. /* CLASS */
  11535. ),
  11536. vue.createElementVNode("view", { class: "item-center" }, [
  11537. vue.createElementVNode(
  11538. "text",
  11539. { class: "item-title" },
  11540. vue.toDisplayString(item.title),
  11541. 1
  11542. /* TEXT */
  11543. ),
  11544. vue.createElementVNode(
  11545. "text",
  11546. { class: "item-desc" },
  11547. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11548. 1
  11549. /* TEXT */
  11550. )
  11551. ]),
  11552. vue.createElementVNode("view", { class: "item-right" }, [
  11553. vue.createElementVNode(
  11554. "text",
  11555. {
  11556. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11557. },
  11558. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11559. 3
  11560. /* TEXT, CLASS */
  11561. ),
  11562. vue.createElementVNode("view", { class: "item-tag" }, [
  11563. vue.createElementVNode(
  11564. "text",
  11565. null,
  11566. vue.toDisplayString(item.tag),
  11567. 1
  11568. /* TEXT */
  11569. )
  11570. ])
  11571. ])
  11572. ]);
  11573. }),
  11574. 128
  11575. /* KEYED_FRAGMENT */
  11576. ))
  11577. ]);
  11578. }),
  11579. 128
  11580. /* KEYED_FRAGMENT */
  11581. )),
  11582. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11583. ])
  11584. ])
  11585. ]);
  11586. }
  11587. 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"]]);
  11588. function listAllLevelRights() {
  11589. return request({
  11590. url: "/fulfiller/levelRights/listAll",
  11591. method: "GET"
  11592. });
  11593. }
  11594. const _sfc_main$8 = {
  11595. data() {
  11596. return {
  11597. currentIndex: 0,
  11598. profile: null,
  11599. levels: [],
  11600. // 从后端获取的等级配置
  11601. rightsList: [],
  11602. // 从后端获取的所有权益列表
  11603. isPopupShow: false,
  11604. currentBenefit: null,
  11605. pageLoading: true
  11606. };
  11607. },
  11608. computed: {
  11609. currentLevel() {
  11610. return this.processedLevels[this.currentIndex];
  11611. },
  11612. // 合并等级与对应的权益详细信息
  11613. processedLevels() {
  11614. if (!this.levels.length)
  11615. return [];
  11616. return this.levels.map((lvl) => {
  11617. const benefits = (lvl.rights || []).map((rightId) => {
  11618. return this.rightsList.find((r) => r.id === rightId);
  11619. }).filter(Boolean);
  11620. return {
  11621. ...lvl,
  11622. isCurrent: this.profile && this.profile.level === lvl.lvNo,
  11623. benefits
  11624. };
  11625. }).sort((a, b) => a.lvNo - b.lvNo);
  11626. }
  11627. },
  11628. async onLoad() {
  11629. await this.initData();
  11630. },
  11631. methods: {
  11632. async initData() {
  11633. this.pageLoading = true;
  11634. uni.showLoading({ title: "加载中..." });
  11635. try {
  11636. const [profileRes, levelsRes, rightsRes] = await Promise.all([
  11637. getMyProfile(),
  11638. listAllLevelConfigs(),
  11639. listAllLevelRights()
  11640. ]);
  11641. this.profile = profileRes.data;
  11642. this.levels = levelsRes.data || [];
  11643. this.rightsList = rightsRes.data || [];
  11644. if (this.profile) {
  11645. const idx = this.processedLevels.findIndex((lvl) => lvl.lvNo === this.profile.level);
  11646. if (idx !== -1) {
  11647. this.currentIndex = idx;
  11648. }
  11649. }
  11650. } catch (err) {
  11651. formatAppLog("error", "at pages/mine/level/index.vue:157", "初始化等级页面失败:", err);
  11652. uni.showToast({ title: "数据加载失败", icon: "none" });
  11653. } finally {
  11654. this.pageLoading = false;
  11655. uni.hideLoading();
  11656. }
  11657. },
  11658. navBack() {
  11659. uni.navigateBack();
  11660. },
  11661. swiperChange(e) {
  11662. this.currentIndex = e.detail.current;
  11663. },
  11664. changeLevel(index) {
  11665. this.currentIndex = index;
  11666. },
  11667. showBenefitDetail(benefit) {
  11668. this.currentBenefit = benefit;
  11669. this.isPopupShow = true;
  11670. },
  11671. closePopup() {
  11672. this.isPopupShow = false;
  11673. }
  11674. }
  11675. };
  11676. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  11677. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11678. vue.createElementVNode("view", { class: "custom-header" }, [
  11679. vue.createElementVNode("view", {
  11680. class: "header-left",
  11681. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11682. }, [
  11683. vue.createElementVNode("image", {
  11684. class: "back-icon",
  11685. src: _imports_0,
  11686. style: { "transform": "rotate(180deg)" }
  11687. })
  11688. ]),
  11689. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  11690. vue.createElementVNode("view", { class: "header-right" })
  11691. ]),
  11692. vue.createElementVNode("view", { class: "header-placeholder" }),
  11693. !$data.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  11694. key: 0,
  11695. class: "swiper-container"
  11696. }, [
  11697. vue.createElementVNode("swiper", {
  11698. class: "level-swiper",
  11699. "previous-margin": "80rpx",
  11700. "next-margin": "80rpx",
  11701. current: $data.currentIndex,
  11702. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  11703. }, [
  11704. (vue.openBlock(true), vue.createElementBlock(
  11705. vue.Fragment,
  11706. null,
  11707. vue.renderList($options.processedLevels, (level, index) => {
  11708. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  11709. key: index,
  11710. onClick: ($event) => $options.changeLevel(index)
  11711. }, [
  11712. vue.createElementVNode(
  11713. "view",
  11714. {
  11715. class: "level-card",
  11716. style: vue.normalizeStyle({
  11717. transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)",
  11718. backgroundImage: "url(" + level.backgroundUrl + ")",
  11719. backgroundSize: "cover",
  11720. backgroundPosition: "center"
  11721. })
  11722. },
  11723. [
  11724. vue.createElementVNode("view", { class: "card-content" }, [
  11725. vue.createElementVNode("view", { class: "card-header" }, [
  11726. vue.createElementVNode(
  11727. "view",
  11728. { class: "level-badge" },
  11729. "L" + vue.toDisplayString(index + 1),
  11730. 1
  11731. /* TEXT */
  11732. ),
  11733. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  11734. key: 0,
  11735. class: "current-badge"
  11736. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  11737. ]),
  11738. vue.createElementVNode(
  11739. "text",
  11740. { class: "level-name" },
  11741. vue.toDisplayString(level.name),
  11742. 1
  11743. /* TEXT */
  11744. ),
  11745. vue.createElementVNode(
  11746. "text",
  11747. { class: "level-score" },
  11748. "所需积分: " + vue.toDisplayString(level.upgradePoints || 0),
  11749. 1
  11750. /* TEXT */
  11751. ),
  11752. vue.createElementVNode("image", {
  11753. class: "crown-overlay",
  11754. src: _imports_1$4,
  11755. mode: "aspectFit"
  11756. })
  11757. ])
  11758. ],
  11759. 4
  11760. /* STYLE */
  11761. )
  11762. ], 8, ["onClick"]);
  11763. }),
  11764. 128
  11765. /* KEYED_FRAGMENT */
  11766. ))
  11767. ], 40, ["current"]),
  11768. vue.createElementVNode("view", { class: "swiper-dots" }, [
  11769. (vue.openBlock(true), vue.createElementBlock(
  11770. vue.Fragment,
  11771. null,
  11772. vue.renderList($options.processedLevels, (item, index) => {
  11773. return vue.openBlock(), vue.createElementBlock(
  11774. "view",
  11775. {
  11776. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  11777. key: index
  11778. },
  11779. null,
  11780. 2
  11781. /* CLASS */
  11782. );
  11783. }),
  11784. 128
  11785. /* KEYED_FRAGMENT */
  11786. ))
  11787. ])
  11788. ])) : vue.createCommentVNode("v-if", true),
  11789. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11790. key: 1,
  11791. class: "benefits-title-row"
  11792. }, [
  11793. vue.createElementVNode("text", { class: "benefits-title" }, "专属权益"),
  11794. vue.createElementVNode(
  11795. "text",
  11796. { class: "benefits-count" },
  11797. "(" + vue.toDisplayString($options.currentLevel.benefits ? $options.currentLevel.benefits.length : 0) + ")",
  11798. 1
  11799. /* TEXT */
  11800. )
  11801. ])) : vue.createCommentVNode("v-if", true),
  11802. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11803. key: 2,
  11804. class: "benefits-grid"
  11805. }, [
  11806. (vue.openBlock(true), vue.createElementBlock(
  11807. vue.Fragment,
  11808. null,
  11809. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11810. return vue.openBlock(), vue.createElementBlock("view", {
  11811. class: "benefit-item",
  11812. key: index,
  11813. onClick: ($event) => $options.showBenefitDetail(benefit)
  11814. }, [
  11815. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11816. benefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11817. key: 0,
  11818. class: "benefit-icon",
  11819. src: benefit.iconUrl,
  11820. mode: "aspectFit"
  11821. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11822. "view",
  11823. {
  11824. key: 1,
  11825. class: "benefit-icon-placeholder"
  11826. },
  11827. vue.toDisplayString(benefit.name[0]),
  11828. 1
  11829. /* TEXT */
  11830. ))
  11831. ]),
  11832. vue.createElementVNode(
  11833. "text",
  11834. { class: "benefit-name" },
  11835. vue.toDisplayString(benefit.name),
  11836. 1
  11837. /* TEXT */
  11838. )
  11839. ], 8, ["onClick"]);
  11840. }),
  11841. 128
  11842. /* KEYED_FRAGMENT */
  11843. )),
  11844. !$options.currentLevel.benefits || $options.currentLevel.benefits.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11845. key: 0,
  11846. class: "empty-benefits"
  11847. }, [
  11848. vue.createElementVNode("text", null, "该等级暂无特殊权益")
  11849. ])) : vue.createCommentVNode("v-if", true)
  11850. ])) : vue.createCommentVNode("v-if", true),
  11851. vue.createElementVNode(
  11852. "view",
  11853. {
  11854. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11855. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11856. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11857. }, ["stop", "prevent"]))
  11858. },
  11859. [
  11860. vue.createElementVNode("view", {
  11861. class: "popup-modal",
  11862. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11863. }, ["stop"]))
  11864. }, [
  11865. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11866. $data.currentBenefit && $data.currentBenefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11867. key: 0,
  11868. class: "benefit-icon-large",
  11869. src: $data.currentBenefit.iconUrl,
  11870. mode: "aspectFit"
  11871. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11872. "view",
  11873. {
  11874. key: 1,
  11875. class: "benefit-icon-placeholder-large"
  11876. },
  11877. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11878. 1
  11879. /* TEXT */
  11880. ))
  11881. ]),
  11882. vue.createElementVNode(
  11883. "text",
  11884. { class: "popup-title" },
  11885. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11886. 1
  11887. /* TEXT */
  11888. ),
  11889. vue.createElementVNode(
  11890. "text",
  11891. { class: "popup-desc" },
  11892. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.statement : ""),
  11893. 1
  11894. /* TEXT */
  11895. ),
  11896. vue.createElementVNode("button", {
  11897. class: "popup-btn",
  11898. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11899. }, "我知道了")
  11900. ])
  11901. ],
  11902. 34
  11903. /* CLASS, NEED_HYDRATION */
  11904. )
  11905. ]);
  11906. }
  11907. 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"]]);
  11908. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11909. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11910. const _sfc_main$7 = {
  11911. data() {
  11912. return {};
  11913. },
  11914. methods: {
  11915. navBack() {
  11916. uni.navigateBack();
  11917. },
  11918. navToOrderMsg() {
  11919. uni.navigateTo({
  11920. url: "/pages/mine/message/order"
  11921. });
  11922. },
  11923. navToSystemMsg() {
  11924. uni.navigateTo({
  11925. url: "/pages/mine/message/system"
  11926. });
  11927. }
  11928. }
  11929. };
  11930. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  11931. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11932. vue.createElementVNode("view", { class: "nav-bar" }, [
  11933. vue.createElementVNode("view", {
  11934. class: "nav-left",
  11935. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11936. }, [
  11937. vue.createElementVNode("image", {
  11938. class: "back-icon",
  11939. src: _imports_0,
  11940. style: { "transform": "rotate(180deg)" }
  11941. })
  11942. ]),
  11943. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11944. vue.createElementVNode("view", { class: "nav-right" }, [
  11945. vue.createElementVNode("view", { class: "more-dots" }, [
  11946. vue.createElementVNode("view", { class: "dot" }),
  11947. vue.createElementVNode("view", { class: "dot" }),
  11948. vue.createElementVNode("view", { class: "dot" })
  11949. ])
  11950. ])
  11951. ]),
  11952. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11953. vue.createElementVNode("view", { class: "message-list" }, [
  11954. vue.createElementVNode("view", {
  11955. class: "message-item",
  11956. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11957. }, [
  11958. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11959. vue.createElementVNode("image", {
  11960. class: "msg-icon",
  11961. src: _imports_1$1
  11962. }),
  11963. vue.createElementVNode("view", { class: "red-dot-badge" })
  11964. ]),
  11965. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11966. vue.createElementVNode("view", { class: "top-row" }, [
  11967. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11968. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11969. ]),
  11970. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11971. ])
  11972. ]),
  11973. vue.createElementVNode("view", {
  11974. class: "message-item",
  11975. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11976. }, [
  11977. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11978. vue.createElementVNode("image", {
  11979. class: "msg-icon",
  11980. src: _imports_2$1
  11981. })
  11982. ]),
  11983. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11984. vue.createElementVNode("view", { class: "top-row" }, [
  11985. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11986. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11987. ]),
  11988. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11989. ])
  11990. ])
  11991. ])
  11992. ]);
  11993. }
  11994. 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"]]);
  11995. const _sfc_main$6 = {
  11996. methods: {
  11997. navBack() {
  11998. uni.navigateBack();
  11999. }
  12000. }
  12001. };
  12002. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  12003. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12004. vue.createElementVNode("view", { class: "nav-bar" }, [
  12005. vue.createElementVNode("view", {
  12006. class: "nav-left",
  12007. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12008. }, [
  12009. vue.createElementVNode("image", {
  12010. class: "back-icon",
  12011. src: _imports_0,
  12012. style: { "transform": "rotate(180deg)" }
  12013. })
  12014. ]),
  12015. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  12016. vue.createElementVNode("view", { class: "nav-right" })
  12017. ]),
  12018. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12019. vue.createElementVNode("view", { class: "msg-group" }, [
  12020. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  12021. vue.createElementVNode("view", { class: "msg-card" }, [
  12022. vue.createElementVNode("view", { class: "card-header" }, [
  12023. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  12024. vue.createElementVNode("view", { class: "red-dot" })
  12025. ]),
  12026. vue.createElementVNode("view", { class: "card-body" }, [
  12027. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  12028. ]),
  12029. vue.createElementVNode("view", { class: "card-footer" }, [
  12030. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  12031. vue.createElementVNode("image", {
  12032. class: "arrow-icon",
  12033. src: _imports_3
  12034. })
  12035. ])
  12036. ]),
  12037. vue.createElementVNode("view", { class: "msg-card" }, [
  12038. vue.createElementVNode("view", { class: "card-header" }, [
  12039. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  12040. ]),
  12041. vue.createElementVNode("view", { class: "card-body" }, [
  12042. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  12043. ]),
  12044. vue.createElementVNode("view", { class: "card-footer" }, [
  12045. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  12046. vue.createElementVNode("image", {
  12047. class: "arrow-icon",
  12048. src: _imports_3
  12049. })
  12050. ])
  12051. ])
  12052. ]),
  12053. vue.createElementVNode("view", { class: "msg-group" }, [
  12054. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  12055. vue.createElementVNode("view", { class: "msg-card" }, [
  12056. vue.createElementVNode("view", { class: "card-header" }, [
  12057. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  12058. ]),
  12059. vue.createElementVNode("view", { class: "card-body" }, [
  12060. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  12061. ]),
  12062. vue.createElementVNode("view", { class: "card-footer" }, [
  12063. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  12064. vue.createElementVNode("image", {
  12065. class: "arrow-icon",
  12066. src: _imports_3
  12067. })
  12068. ])
  12069. ])
  12070. ])
  12071. ]);
  12072. }
  12073. 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"]]);
  12074. const _sfc_main$5 = {
  12075. methods: {
  12076. navBack() {
  12077. uni.navigateBack();
  12078. },
  12079. navToDetail() {
  12080. uni.navigateTo({
  12081. url: "/pages/mine/message/detail"
  12082. });
  12083. }
  12084. }
  12085. };
  12086. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  12087. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12088. vue.createElementVNode("view", { class: "nav-bar" }, [
  12089. vue.createElementVNode("view", {
  12090. class: "nav-left",
  12091. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12092. }, [
  12093. vue.createElementVNode("image", {
  12094. class: "back-icon",
  12095. src: _imports_0,
  12096. style: { "transform": "rotate(180deg)" }
  12097. })
  12098. ]),
  12099. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  12100. vue.createElementVNode("view", { class: "nav-right" })
  12101. ]),
  12102. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12103. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  12104. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  12105. vue.createElementVNode("view", {
  12106. class: "sys-card",
  12107. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12108. }, [
  12109. vue.createElementVNode("view", { class: "sys-header" }, [
  12110. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  12111. vue.createElementVNode("view", { class: "red-dot" })
  12112. ]),
  12113. vue.createElementVNode("view", { class: "sys-content" }, [
  12114. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  12115. ]),
  12116. vue.createElementVNode("view", { class: "sys-footer" }, [
  12117. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  12118. vue.createElementVNode("view", { class: "check-more" }, [
  12119. vue.createElementVNode("text", null, "查看详情"),
  12120. vue.createElementVNode("image", {
  12121. class: "arrow-icon-small",
  12122. src: _imports_3
  12123. })
  12124. ])
  12125. ])
  12126. ]),
  12127. vue.createElementVNode("view", { class: "sys-card" }, [
  12128. vue.createElementVNode("view", { class: "sys-header" }, [
  12129. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  12130. ]),
  12131. vue.createElementVNode("view", { class: "sys-content" }, [
  12132. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  12133. ]),
  12134. vue.createElementVNode("view", { class: "sys-footer" }, [
  12135. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  12136. vue.createElementVNode("view", { class: "check-more" }, [
  12137. vue.createElementVNode("text", null, "查看详情"),
  12138. vue.createElementVNode("image", {
  12139. class: "arrow-icon-small",
  12140. src: _imports_3
  12141. })
  12142. ])
  12143. ])
  12144. ]),
  12145. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  12146. vue.createElementVNode("view", { class: "sys-card" }, [
  12147. vue.createElementVNode("view", { class: "sys-header" }, [
  12148. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  12149. ]),
  12150. vue.createElementVNode("view", { class: "sys-content" }, [
  12151. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  12152. ]),
  12153. vue.createElementVNode("view", { class: "sys-footer" }, [
  12154. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  12155. vue.createElementVNode("view", { class: "check-more" }, [
  12156. vue.createElementVNode("text", null, "查看详情"),
  12157. vue.createElementVNode("image", {
  12158. class: "arrow-icon-small",
  12159. src: _imports_3
  12160. })
  12161. ])
  12162. ])
  12163. ])
  12164. ])
  12165. ]);
  12166. }
  12167. 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"]]);
  12168. const _sfc_main$4 = {
  12169. methods: {
  12170. navBack() {
  12171. uni.navigateBack();
  12172. }
  12173. }
  12174. };
  12175. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  12176. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12177. vue.createElementVNode("view", { class: "nav-bar" }, [
  12178. vue.createElementVNode("view", {
  12179. class: "nav-left",
  12180. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12181. }, [
  12182. vue.createElementVNode("image", {
  12183. class: "back-icon",
  12184. src: _imports_0,
  12185. style: { "transform": "rotate(180deg)" }
  12186. })
  12187. ]),
  12188. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  12189. vue.createElementVNode("view", { class: "nav-right" })
  12190. ]),
  12191. vue.createElementVNode("view", { class: "nav-placeholder" }),
  12192. vue.createElementVNode("view", { class: "detail-content" }, [
  12193. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  12194. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  12195. vue.createElementVNode("view", { class: "detail-body" }, [
  12196. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  12197. ]),
  12198. vue.createElementVNode("view", { class: "detail-footer" }, [
  12199. vue.createElementVNode("view", { class: "divider" }),
  12200. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  12201. ])
  12202. ])
  12203. ]);
  12204. }
  12205. 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"]]);
  12206. const _imports_1 = "/static/icons/diamond_white.svg";
  12207. const _imports_2 = "/static/icons/star_decor.svg";
  12208. const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
  12209. const _sfc_main$3 = {
  12210. data() {
  12211. return {
  12212. points: 0,
  12213. currentTab: 0,
  12214. list: [],
  12215. pageNum: 1,
  12216. pageSize: 10,
  12217. total: 0,
  12218. loading: false
  12219. };
  12220. },
  12221. computed: {
  12222. displayList() {
  12223. if (this.currentTab === 0)
  12224. return this.list;
  12225. const type = this.currentTab === 1 ? "income" : "expense";
  12226. return this.list.filter((item) => item.type === type);
  12227. }
  12228. },
  12229. onShow() {
  12230. this.fetchPoints();
  12231. this.fetchList(true);
  12232. },
  12233. onReachBottom() {
  12234. this.fetchList();
  12235. },
  12236. methods: {
  12237. async fetchPoints() {
  12238. try {
  12239. const res = await pointsOnApp();
  12240. if (res.code === 200) {
  12241. this.points = res.data || 0;
  12242. }
  12243. } catch (error) {
  12244. formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
  12245. }
  12246. },
  12247. async fetchList(reset = false) {
  12248. if (reset) {
  12249. this.pageNum = 1;
  12250. this.list = [];
  12251. this.total = 0;
  12252. }
  12253. if (this.loading)
  12254. return;
  12255. if (!reset && this.list.length >= this.total && this.total !== 0)
  12256. return;
  12257. this.loading = true;
  12258. try {
  12259. const res = await pagePointsOnApp({
  12260. pageNum: this.pageNum,
  12261. pageSize: this.pageSize
  12262. });
  12263. if (res.code === 200) {
  12264. this.total = res.total || 0;
  12265. const rows = res.rows || [];
  12266. const mappedRows = rows.map((item) => {
  12267. const isAdd = item.type === "add";
  12268. const uiType = isAdd ? "income" : "expense";
  12269. const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
  12270. let amountStr = Math.abs(item.amount);
  12271. if (!isAdd) {
  12272. amountStr = "-" + amountStr;
  12273. }
  12274. return {
  12275. ...item,
  12276. title,
  12277. desc: item.reason || "",
  12278. time: item.createTime || "",
  12279. amount: amountStr,
  12280. type: uiType,
  12281. tag: title
  12282. };
  12283. });
  12284. this.list = this.list.concat(mappedRows);
  12285. this.pageNum++;
  12286. }
  12287. } catch (error) {
  12288. formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
  12289. } finally {
  12290. this.loading = false;
  12291. }
  12292. },
  12293. navBack() {
  12294. uni.navigateBack();
  12295. },
  12296. navToDetail() {
  12297. uni.navigateTo({
  12298. url: "/pages/mine/points/detail"
  12299. });
  12300. },
  12301. navToEquity() {
  12302. },
  12303. switchTab(index) {
  12304. this.currentTab = index;
  12305. }
  12306. }
  12307. };
  12308. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  12309. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12310. vue.createElementVNode("view", { class: "nav-bar" }, [
  12311. vue.createElementVNode("view", {
  12312. class: "nav-left",
  12313. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12314. }, [
  12315. vue.createElementVNode("image", {
  12316. class: "back-icon",
  12317. src: _imports_0
  12318. })
  12319. ]),
  12320. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  12321. vue.createElementVNode("view", { class: "nav-right" })
  12322. ]),
  12323. vue.createElementVNode("view", { class: "points-card" }, [
  12324. vue.createElementVNode("view", { class: "card-header" }, [
  12325. vue.createElementVNode("view", {
  12326. class: "equity-btn",
  12327. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  12328. }, [
  12329. vue.createElementVNode("image", {
  12330. class: "equity-icon",
  12331. src: _imports_1
  12332. }),
  12333. vue.createElementVNode("text", null, "积分权益")
  12334. ]),
  12335. vue.createElementVNode("view", {
  12336. class: "detail-link",
  12337. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12338. }, [
  12339. vue.createElementVNode("text", null, "明细")
  12340. ])
  12341. ]),
  12342. vue.createElementVNode("view", { class: "card-body" }, [
  12343. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  12344. vue.createElementVNode(
  12345. "text",
  12346. { class: "value" },
  12347. vue.toDisplayString($data.points),
  12348. 1
  12349. /* TEXT */
  12350. )
  12351. ]),
  12352. vue.createElementVNode("image", {
  12353. class: "bg-decor",
  12354. src: _imports_2,
  12355. mode: "aspectFit"
  12356. })
  12357. ]),
  12358. vue.createElementVNode("view", { class: "record-container" }, [
  12359. vue.createElementVNode("view", { class: "record-header" }, [
  12360. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  12361. vue.createElementVNode("view", {
  12362. class: "header-more",
  12363. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12364. }, [
  12365. vue.createElementVNode("text", null, "查看全部"),
  12366. vue.createElementVNode("image", {
  12367. class: "more-icon",
  12368. src: _imports_3
  12369. })
  12370. ])
  12371. ]),
  12372. vue.createElementVNode("view", { class: "tabs-row" }, [
  12373. vue.createElementVNode(
  12374. "view",
  12375. {
  12376. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12377. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  12378. },
  12379. [
  12380. vue.createElementVNode("text", null, "全部"),
  12381. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12382. key: 0,
  12383. class: "tab-line"
  12384. })) : vue.createCommentVNode("v-if", true)
  12385. ],
  12386. 2
  12387. /* CLASS */
  12388. ),
  12389. vue.createElementVNode(
  12390. "view",
  12391. {
  12392. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12393. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  12394. },
  12395. [
  12396. vue.createElementVNode("text", null, "获取"),
  12397. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12398. key: 0,
  12399. class: "tab-line"
  12400. })) : vue.createCommentVNode("v-if", true)
  12401. ],
  12402. 2
  12403. /* CLASS */
  12404. ),
  12405. vue.createElementVNode(
  12406. "view",
  12407. {
  12408. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12409. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  12410. },
  12411. [
  12412. vue.createElementVNode("text", null, "扣减"),
  12413. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12414. key: 0,
  12415. class: "tab-line"
  12416. })) : vue.createCommentVNode("v-if", true)
  12417. ],
  12418. 2
  12419. /* CLASS */
  12420. )
  12421. ]),
  12422. vue.createElementVNode("view", { class: "record-list" }, [
  12423. (vue.openBlock(true), vue.createElementBlock(
  12424. vue.Fragment,
  12425. null,
  12426. vue.renderList($options.displayList, (item, index) => {
  12427. return vue.openBlock(), vue.createElementBlock("view", {
  12428. class: "list-item",
  12429. key: index
  12430. }, [
  12431. vue.createElementVNode("view", { class: "item-left" }, [
  12432. vue.createElementVNode(
  12433. "text",
  12434. { class: "item-title" },
  12435. vue.toDisplayString(item.title),
  12436. 1
  12437. /* TEXT */
  12438. ),
  12439. vue.createElementVNode(
  12440. "text",
  12441. { class: "item-desc" },
  12442. vue.toDisplayString(item.desc),
  12443. 1
  12444. /* TEXT */
  12445. ),
  12446. vue.createElementVNode(
  12447. "text",
  12448. { class: "item-time" },
  12449. vue.toDisplayString(item.time),
  12450. 1
  12451. /* TEXT */
  12452. )
  12453. ]),
  12454. vue.createElementVNode("view", { class: "item-right" }, [
  12455. vue.createElementVNode(
  12456. "text",
  12457. {
  12458. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12459. },
  12460. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12461. 3
  12462. /* TEXT, CLASS */
  12463. ),
  12464. vue.createElementVNode("view", { class: "item-tag" }, [
  12465. vue.createElementVNode(
  12466. "text",
  12467. null,
  12468. vue.toDisplayString(item.tag),
  12469. 1
  12470. /* TEXT */
  12471. )
  12472. ])
  12473. ])
  12474. ]);
  12475. }),
  12476. 128
  12477. /* KEYED_FRAGMENT */
  12478. ))
  12479. ])
  12480. ])
  12481. ]);
  12482. }
  12483. 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"]]);
  12484. const bizTypeMap = fulfillerEnum.FlfPointsBizType;
  12485. const _sfc_main$2 = {
  12486. data() {
  12487. const d = /* @__PURE__ */ new Date();
  12488. return {
  12489. currentTab: 0,
  12490. year: d.getFullYear(),
  12491. month: d.getMonth() + 1,
  12492. groups: []
  12493. };
  12494. },
  12495. computed: {
  12496. currentDate() {
  12497. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  12498. },
  12499. displayGroups() {
  12500. if (this.currentTab === 0)
  12501. return this.groups;
  12502. return this.groups.map((group) => {
  12503. const filteredItems = group.items.filter((item) => {
  12504. const type = this.currentTab === 1 ? "income" : "expense";
  12505. return item.type === type;
  12506. });
  12507. return {
  12508. ...group,
  12509. items: filteredItems
  12510. };
  12511. }).filter((group) => group.items.length > 0);
  12512. }
  12513. },
  12514. onShow() {
  12515. this.fetchData();
  12516. },
  12517. methods: {
  12518. async fetchData() {
  12519. try {
  12520. const res = await listPointsOnApp({
  12521. year: this.year,
  12522. month: this.month
  12523. });
  12524. if (res.code === 200) {
  12525. const list = res.data || [];
  12526. let incomeTotal = 0;
  12527. let expenseTotal = 0;
  12528. const items = list.map((item) => {
  12529. const isAdd = item.type === "add";
  12530. const uiType = isAdd ? "income" : "expense";
  12531. const title = bizTypeMap[item.bizType] || item.bizType || "其他";
  12532. let amountVal = Math.abs(item.amount);
  12533. if (isAdd) {
  12534. incomeTotal += amountVal;
  12535. } else {
  12536. expenseTotal += amountVal;
  12537. }
  12538. let amountStr = String(amountVal);
  12539. if (!isAdd)
  12540. amountStr = "-" + amountStr;
  12541. let timeStr = item.createTime || "";
  12542. if (timeStr.length >= 16) {
  12543. timeStr = timeStr.substring(5, 16);
  12544. }
  12545. return {
  12546. ...item,
  12547. title,
  12548. desc: item.reason || "",
  12549. time: timeStr,
  12550. amount: amountStr,
  12551. type: uiType,
  12552. tag: title
  12553. };
  12554. });
  12555. this.groups = [
  12556. {
  12557. month: `${this.month}月 ${this.year}`,
  12558. income: String(incomeTotal),
  12559. expense: String(expenseTotal),
  12560. items
  12561. }
  12562. ];
  12563. }
  12564. } catch (error) {
  12565. formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
  12566. }
  12567. },
  12568. onDateChange(e) {
  12569. const val = e.detail.value;
  12570. const [y, m] = val.split("-");
  12571. this.year = parseInt(y, 10);
  12572. this.month = parseInt(m, 10);
  12573. this.fetchData();
  12574. },
  12575. navBack() {
  12576. uni.navigateBack();
  12577. },
  12578. switchTab(index) {
  12579. this.currentTab = index;
  12580. }
  12581. }
  12582. };
  12583. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  12584. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12585. vue.createElementVNode("view", { class: "nav-bar" }, [
  12586. vue.createElementVNode("view", {
  12587. class: "nav-left",
  12588. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12589. }, [
  12590. vue.createElementVNode("image", {
  12591. class: "back-icon",
  12592. src: _imports_0
  12593. })
  12594. ]),
  12595. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  12596. vue.createElementVNode("view", { class: "nav-right" })
  12597. ]),
  12598. vue.createElementVNode("view", { class: "content-area" }, [
  12599. vue.createElementVNode("view", { class: "filter-area" }, [
  12600. vue.createElementVNode("view", { class: "tabs-row" }, [
  12601. vue.createElementVNode(
  12602. "view",
  12603. {
  12604. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12605. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  12606. },
  12607. [
  12608. vue.createElementVNode("text", null, "全部"),
  12609. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12610. key: 0,
  12611. class: "tab-line"
  12612. })) : vue.createCommentVNode("v-if", true)
  12613. ],
  12614. 2
  12615. /* CLASS */
  12616. ),
  12617. vue.createElementVNode(
  12618. "view",
  12619. {
  12620. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12621. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  12622. },
  12623. [
  12624. vue.createElementVNode("text", null, "获取"),
  12625. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12626. key: 0,
  12627. class: "tab-line"
  12628. })) : vue.createCommentVNode("v-if", true)
  12629. ],
  12630. 2
  12631. /* CLASS */
  12632. ),
  12633. vue.createElementVNode(
  12634. "view",
  12635. {
  12636. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12637. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  12638. },
  12639. [
  12640. vue.createElementVNode("text", null, "扣减"),
  12641. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12642. key: 0,
  12643. class: "tab-line"
  12644. })) : vue.createCommentVNode("v-if", true)
  12645. ],
  12646. 2
  12647. /* CLASS */
  12648. )
  12649. ]),
  12650. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  12651. vue.createElementVNode("picker", {
  12652. mode: "date",
  12653. fields: "month",
  12654. value: $options.currentDate,
  12655. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  12656. }, [
  12657. vue.createElementVNode("view", { class: "date-picker" }, [
  12658. vue.createElementVNode(
  12659. "text",
  12660. { class: "date-text" },
  12661. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  12662. 1
  12663. /* TEXT */
  12664. ),
  12665. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  12666. ])
  12667. ], 40, ["value"])
  12668. ])
  12669. ]),
  12670. vue.createElementVNode("scroll-view", {
  12671. "scroll-y": "",
  12672. class: "bill-list"
  12673. }, [
  12674. (vue.openBlock(true), vue.createElementBlock(
  12675. vue.Fragment,
  12676. null,
  12677. vue.renderList($options.displayGroups, (group, gIndex) => {
  12678. return vue.openBlock(), vue.createElementBlock("view", {
  12679. key: gIndex,
  12680. class: "month-group"
  12681. }, [
  12682. vue.createElementVNode("view", { class: "group-header" }, [
  12683. vue.createElementVNode(
  12684. "text",
  12685. { class: "month-title" },
  12686. vue.toDisplayString(group.month),
  12687. 1
  12688. /* TEXT */
  12689. ),
  12690. vue.createElementVNode(
  12691. "text",
  12692. { class: "month-summary" },
  12693. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  12694. 1
  12695. /* TEXT */
  12696. )
  12697. ]),
  12698. (vue.openBlock(true), vue.createElementBlock(
  12699. vue.Fragment,
  12700. null,
  12701. vue.renderList(group.items, (item, index) => {
  12702. return vue.openBlock(), vue.createElementBlock("view", {
  12703. class: "list-item",
  12704. key: index
  12705. }, [
  12706. vue.createElementVNode(
  12707. "view",
  12708. {
  12709. class: vue.normalizeClass(["item-icon-box", item.type])
  12710. },
  12711. [
  12712. vue.createElementVNode(
  12713. "text",
  12714. { class: "item-icon-symbol" },
  12715. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  12716. 1
  12717. /* TEXT */
  12718. )
  12719. ],
  12720. 2
  12721. /* CLASS */
  12722. ),
  12723. vue.createElementVNode("view", { class: "item-center" }, [
  12724. vue.createElementVNode(
  12725. "text",
  12726. { class: "item-title" },
  12727. vue.toDisplayString(item.title),
  12728. 1
  12729. /* TEXT */
  12730. ),
  12731. vue.createElementVNode(
  12732. "text",
  12733. { class: "item-desc" },
  12734. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  12735. 1
  12736. /* TEXT */
  12737. )
  12738. ]),
  12739. vue.createElementVNode("view", { class: "item-right" }, [
  12740. vue.createElementVNode(
  12741. "text",
  12742. {
  12743. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12744. },
  12745. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12746. 3
  12747. /* TEXT, CLASS */
  12748. ),
  12749. vue.createElementVNode("view", { class: "item-tag" }, [
  12750. vue.createElementVNode(
  12751. "text",
  12752. null,
  12753. vue.toDisplayString(item.tag),
  12754. 1
  12755. /* TEXT */
  12756. )
  12757. ])
  12758. ])
  12759. ]);
  12760. }),
  12761. 128
  12762. /* KEYED_FRAGMENT */
  12763. ))
  12764. ]);
  12765. }),
  12766. 128
  12767. /* KEYED_FRAGMENT */
  12768. )),
  12769. vue.createElementVNode("view", { class: "list-padding-bottom" })
  12770. ])
  12771. ])
  12772. ]);
  12773. }
  12774. 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"]]);
  12775. const _sfc_main$1 = {
  12776. data() {
  12777. return {
  12778. id: null,
  12779. title: "",
  12780. content: "",
  12781. loading: false
  12782. };
  12783. },
  12784. onLoad(options) {
  12785. if (options.id) {
  12786. this.id = options.id;
  12787. this.loadDetail();
  12788. }
  12789. },
  12790. methods: {
  12791. async loadDetail() {
  12792. if (!this.id)
  12793. return;
  12794. uni.showLoading({ title: "加载中..." });
  12795. try {
  12796. const res = await getAgreement(this.id);
  12797. if (res.code === 200 && res.data) {
  12798. this.title = res.data.title;
  12799. this.content = res.data.content;
  12800. uni.setNavigationBarTitle({ title: this.title });
  12801. } else {
  12802. uni.showToast({ title: res.msg || "获取失败", icon: "none" });
  12803. }
  12804. } catch (err) {
  12805. formatAppLog("error", "at pages/mine/settings/about/agreement-detail.vue:56", "获取协议详情失败:", err);
  12806. uni.showToast({ title: "网络错误", icon: "none" });
  12807. } finally {
  12808. uni.hideLoading();
  12809. }
  12810. },
  12811. navBack() {
  12812. uni.navigateBack({ delta: 1 });
  12813. }
  12814. }
  12815. };
  12816. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  12817. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12818. vue.createElementVNode("view", { class: "custom-header" }, [
  12819. vue.createElementVNode("view", {
  12820. class: "header-left",
  12821. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12822. }, [
  12823. vue.createElementVNode("image", {
  12824. class: "back-icon",
  12825. src: _imports_0,
  12826. style: { "transform": "rotate(180deg)" }
  12827. })
  12828. ]),
  12829. vue.createElementVNode(
  12830. "text",
  12831. { class: "header-title" },
  12832. vue.toDisplayString($data.title || "协议详情"),
  12833. 1
  12834. /* TEXT */
  12835. ),
  12836. vue.createElementVNode("view", { class: "header-right" })
  12837. ]),
  12838. vue.createElementVNode("view", { class: "header-placeholder" }),
  12839. vue.createElementVNode("scroll-view", {
  12840. "scroll-y": "",
  12841. class: "content-scroll"
  12842. }, [
  12843. vue.createElementVNode("view", { class: "content-card" }, [
  12844. vue.createElementVNode("rich-text", {
  12845. nodes: $data.content,
  12846. class: "rich-text"
  12847. }, null, 8, ["nodes"])
  12848. ]),
  12849. vue.createElementVNode("view", { class: "safe-area-inset-bottom" })
  12850. ])
  12851. ]);
  12852. }
  12853. 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"]]);
  12854. __definePage("pages/login/login", PagesLoginLogin);
  12855. __definePage("pages/recruit/landing", PagesRecruitLanding);
  12856. __definePage("pages/recruit/form", PagesRecruitForm);
  12857. __definePage("pages/recruit/auth", PagesRecruitAuth);
  12858. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  12859. __definePage("pages/recruit/success", PagesRecruitSuccess);
  12860. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  12861. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  12862. __definePage("pages/home/index", PagesHomeIndex);
  12863. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  12864. __definePage("pages/orders/index", PagesOrdersIndex);
  12865. __definePage("pages/orders/detail", PagesOrdersDetail);
  12866. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  12867. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  12868. __definePage("pages/mine/rewards", PagesMineRewards);
  12869. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  12870. __definePage("pages/mine/index", PagesMineIndex);
  12871. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  12872. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  12873. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  12874. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  12875. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  12876. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  12877. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  12878. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  12879. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  12880. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  12881. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  12882. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  12883. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  12884. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  12885. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  12886. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  12887. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  12888. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  12889. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  12890. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  12891. __definePage("pages/mine/settings/about/agreement-detail", PagesMineSettingsAboutAgreementDetail);
  12892. const _sfc_main = {
  12893. onLaunch: function() {
  12894. formatAppLog("log", "at App.vue:7", "App Launch");
  12895. if (isLoggedIn()) {
  12896. startGpsTimer();
  12897. uni.switchTab({
  12898. url: "/pages/home/index"
  12899. });
  12900. }
  12901. },
  12902. onShow: function() {
  12903. formatAppLog("log", "at App.vue:17", "App Show");
  12904. },
  12905. onHide: function() {
  12906. formatAppLog("log", "at App.vue:20", "App Hide");
  12907. }
  12908. };
  12909. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  12910. function createApp() {
  12911. const app = vue.createVueApp(App);
  12912. return {
  12913. app
  12914. };
  12915. }
  12916. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  12917. uni.Vuex = __Vuex__;
  12918. uni.Pinia = __Pinia__;
  12919. __app__.provide("__globalStyles", __uniConfig.styles);
  12920. __app__._component.mpType = "app";
  12921. __app__._component.render = () => {
  12922. };
  12923. __app__.mount("#app");
  12924. })(Vue);