app.html 259 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>FashionCraft - 服装DIY设计</title>
  7. <style>
  8. * {
  9. box-sizing: border-box;
  10. margin: 0;
  11. padding: 0;
  12. }
  13. body {
  14. font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  15. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  16. min-height: 100vh;
  17. color: #333;
  18. }
  19. /* 容器样式 */
  20. .app-container {
  21. max-width: 414px;
  22. margin: 0 auto;
  23. background: #fff;
  24. min-height: 100vh;
  25. box-shadow: 0 0 30px rgba(0,0,0,0.3);
  26. overflow: hidden;
  27. position: relative;
  28. }
  29. /* 头部导航 */
  30. .header {
  31. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  32. padding: 20px 20px 15px;
  33. color: white;
  34. position: relative;
  35. overflow: hidden;
  36. }
  37. .header::before {
  38. content: '';
  39. position: absolute;
  40. top: -50%;
  41. left: -50%;
  42. width: 200%;
  43. height: 200%;
  44. background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  45. animation: float 20s infinite linear;
  46. }
  47. @keyframes float {
  48. 0% { transform: translate(-50%, -50%) rotate(0deg); }
  49. 100% { transform: translate(-50%, -50%) rotate(360deg); }
  50. }
  51. .header-content {
  52. position: relative;
  53. z-index: 2;
  54. }
  55. .header h1 {
  56. font-size: 28px;
  57. font-weight: 700;
  58. margin-bottom: 5px;
  59. text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  60. }
  61. .header p {
  62. opacity: 0.9;
  63. font-size: 14px;
  64. }
  65. /* 主要内容区域 */
  66. .main-content {
  67. flex: 1;
  68. overflow-y: auto;
  69. padding-bottom: 80px;
  70. }
  71. /* 轮播区域 */
  72. .banner-section {
  73. position: relative;
  74. height: 200px;
  75. overflow: hidden;
  76. margin: 20px;
  77. border-radius: 20px;
  78. box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  79. }
  80. .banner-slider {
  81. display: flex;
  82. transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  83. height: 100%;
  84. }
  85. .banner-slide {
  86. min-width: 100%;
  87. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  88. display: flex;
  89. align-items: center;
  90. justify-content: center;
  91. color: white;
  92. font-size: 18px;
  93. font-weight: 600;
  94. position: relative;
  95. overflow: hidden;
  96. cursor: pointer;
  97. transition: transform 0.3s ease;
  98. }
  99. .banner-slide:hover {
  100. transform: scale(0.98);
  101. }
  102. .banner-slide::before {
  103. content: '';
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. right: 0;
  108. bottom: 0;
  109. background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%" style="stop-color:rgba(255,255,255,0)"/></linearGradient></defs><polygon points="0,0 100,0 0,100" fill="url(%23grad)"/></svg>');
  110. pointer-events: none;
  111. }
  112. .banner-indicators {
  113. position: absolute;
  114. bottom: 15px;
  115. left: 50%;
  116. transform: translateX(-50%);
  117. display: flex;
  118. gap: 8px;
  119. }
  120. .indicator {
  121. width: 8px;
  122. height: 8px;
  123. border-radius: 50%;
  124. background: rgba(255,255,255,0.5);
  125. cursor: pointer;
  126. transition: all 0.3s ease;
  127. }
  128. .indicator.active {
  129. background: white;
  130. transform: scale(1.2);
  131. }
  132. /* 快速设计入口 */
  133. .quick-design {
  134. margin: 20px;
  135. padding: 25px;
  136. background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  137. border-radius: 20px;
  138. text-align: center;
  139. box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
  140. position: relative;
  141. overflow: hidden;
  142. cursor: pointer;
  143. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  144. }
  145. .quick-design:hover {
  146. transform: translateY(-5px);
  147. box-shadow: 0 15px 35px rgba(255, 154, 158, 0.6);
  148. }
  149. .quick-design::before {
  150. content: '✨';
  151. position: absolute;
  152. top: 15px;
  153. right: 20px;
  154. font-size: 24px;
  155. animation: sparkle 2s infinite;
  156. }
  157. @keyframes sparkle {
  158. 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  159. 50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
  160. }
  161. .quick-design h2 {
  162. font-size: 22px;
  163. color: #fff;
  164. margin-bottom: 8px;
  165. text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  166. }
  167. .quick-design p {
  168. color: rgba(255,255,255,0.9);
  169. font-size: 14px;
  170. }
  171. /* 热门作品区 */
  172. .popular-works {
  173. margin: 20px;
  174. }
  175. .section-title {
  176. font-size: 20px;
  177. font-weight: 700;
  178. margin-bottom: 15px;
  179. color: #333;
  180. position: relative;
  181. padding-left: 15px;
  182. }
  183. .section-title::before {
  184. content: '';
  185. position: absolute;
  186. left: 0;
  187. top: 50%;
  188. transform: translateY(-50%);
  189. width: 4px;
  190. height: 20px;
  191. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  192. border-radius: 2px;
  193. }
  194. .works-grid {
  195. display: grid;
  196. grid-template-columns: repeat(2, 1fr);
  197. gap: 15px;
  198. }
  199. .work-item {
  200. background: #fff;
  201. border-radius: 15px;
  202. overflow: hidden;
  203. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  204. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  205. cursor: pointer;
  206. }
  207. .work-item:hover {
  208. transform: translateY(-8px);
  209. box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  210. }
  211. .work-image {
  212. height: 120px;
  213. background: linear-gradient(45deg, #a8edea 0%, #fed6e3 100%);
  214. position: relative;
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. font-size: 36px;
  219. }
  220. .work-info {
  221. padding: 12px;
  222. }
  223. .work-title {
  224. font-size: 14px;
  225. font-weight: 600;
  226. margin-bottom: 4px;
  227. color: #333;
  228. }
  229. .work-stats {
  230. display: flex;
  231. justify-content: space-between;
  232. font-size: 12px;
  233. color: #666;
  234. }
  235. /* AI推荐引擎样式 */
  236. .ai-recommend-engine {
  237. margin: 20px;
  238. }
  239. .ai-engine-card {
  240. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  241. border-radius: 20px;
  242. padding: 25px;
  243. color: white;
  244. box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  245. }
  246. .ai-engine-header {
  247. display: flex;
  248. justify-content: space-between;
  249. align-items: center;
  250. margin-bottom: 20px;
  251. }
  252. .ai-brand {
  253. display: flex;
  254. align-items: center;
  255. gap: 12px;
  256. }
  257. .ai-logo {
  258. font-size: 32px;
  259. animation: pulse 2s infinite;
  260. }
  261. .ai-brand-text h3 {
  262. font-size: 20px;
  263. margin: 0 0 4px 0;
  264. font-weight: 700;
  265. }
  266. .ai-brand-text p {
  267. font-size: 14px;
  268. opacity: 0.9;
  269. margin: 0;
  270. }
  271. .ai-status {
  272. display: flex;
  273. align-items: center;
  274. gap: 6px;
  275. font-size: 12px;
  276. opacity: 0.9;
  277. }
  278. .status-dot {
  279. width: 8px;
  280. height: 8px;
  281. background: #4ade80;
  282. border-radius: 50%;
  283. animation: pulse 2s infinite;
  284. }
  285. .ai-quick-actions {
  286. display: grid;
  287. grid-template-columns: repeat(2, 1fr);
  288. gap: 12px;
  289. margin-bottom: 20px;
  290. }
  291. .quick-action {
  292. background: rgba(255,255,255,0.15);
  293. border-radius: 15px;
  294. padding: 15px 12px;
  295. display: flex;
  296. align-items: center;
  297. gap: 10px;
  298. cursor: pointer;
  299. transition: all 0.3s ease;
  300. backdrop-filter: blur(10px);
  301. min-height: 50px;
  302. text-align: left;
  303. }
  304. .quick-action:hover {
  305. background: rgba(255,255,255,0.25);
  306. transform: translateY(-2px);
  307. box-shadow: 0 5px 15px rgba(255,255,255,0.1);
  308. }
  309. .action-icon {
  310. font-size: 20px;
  311. }
  312. .action-text {
  313. font-size: 14px;
  314. font-weight: 500;
  315. }
  316. /* AI悬浮球样式 */
  317. .ai-floating-ball {
  318. position: fixed;
  319. bottom: 90px;
  320. right: 20px;
  321. width: 60px;
  322. height: 60px;
  323. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  324. border-radius: 50%;
  325. display: flex;
  326. align-items: center;
  327. justify-content: center;
  328. cursor: pointer;
  329. z-index: 999;
  330. box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  331. transition: all 0.3s ease;
  332. }
  333. .ai-floating-ball:hover {
  334. transform: scale(1.1);
  335. box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
  336. }
  337. .floating-ball-icon {
  338. font-size: 24px;
  339. color: white;
  340. z-index: 2;
  341. position: relative;
  342. }
  343. .breathing-ring {
  344. position: absolute;
  345. top: -3px;
  346. left: -3px;
  347. right: -3px;
  348. bottom: -3px;
  349. border: 2px solid rgba(102, 126, 234, 0.6);
  350. border-radius: 50%;
  351. animation: breathing 2s ease-in-out infinite;
  352. }
  353. @keyframes breathing {
  354. 0%, 100% {
  355. transform: scale(1);
  356. opacity: 1;
  357. }
  358. 50% {
  359. transform: scale(1.1);
  360. opacity: 0.7;
  361. }
  362. }
  363. /* AI全屏对话界面样式 */
  364. .ai-chat-modal {
  365. position: fixed;
  366. top: 0;
  367. left: 0;
  368. width: 100%;
  369. height: 100%;
  370. background: rgba(0,0,0,0.95);
  371. backdrop-filter: blur(10px);
  372. z-index: 2000;
  373. display: flex;
  374. align-items: center;
  375. justify-content: center;
  376. animation: fadeIn 0.3s ease;
  377. }
  378. .ai-chat-container {
  379. width: 100%;
  380. max-width: 414px;
  381. height: 100%;
  382. background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  383. display: flex;
  384. flex-direction: column;
  385. position: relative;
  386. }
  387. .ai-chat-header {
  388. padding: 20px;
  389. display: flex;
  390. align-items: center;
  391. gap: 15px;
  392. border-bottom: 1px solid rgba(255,255,255,0.2);
  393. background: rgba(255,255,255,0.1);
  394. backdrop-filter: blur(10px);
  395. }
  396. .ai-chat-avatar {
  397. position: relative;
  398. width: 50px;
  399. height: 50px;
  400. background: rgba(255,255,255,0.2);
  401. border-radius: 50%;
  402. display: flex;
  403. align-items: center;
  404. justify-content: center;
  405. }
  406. .avatar-icon {
  407. font-size: 24px;
  408. color: white;
  409. }
  410. .avatar-status {
  411. position: absolute;
  412. bottom: 2px;
  413. right: 2px;
  414. width: 12px;
  415. height: 12px;
  416. background: #4ade80;
  417. border: 2px solid white;
  418. border-radius: 50%;
  419. }
  420. .ai-chat-info {
  421. flex: 1;
  422. color: white;
  423. }
  424. .ai-chat-info h3 {
  425. font-size: 18px;
  426. margin: 0 0 4px 0;
  427. font-weight: 600;
  428. }
  429. .ai-chat-info p {
  430. font-size: 14px;
  431. margin: 0;
  432. opacity: 0.9;
  433. }
  434. .ai-chat-close {
  435. width: 40px;
  436. height: 40px;
  437. background: rgba(255,255,255,0.2);
  438. border: none;
  439. border-radius: 50%;
  440. color: white;
  441. font-size: 18px;
  442. cursor: pointer;
  443. transition: all 0.3s ease;
  444. }
  445. .ai-chat-close:hover {
  446. background: rgba(255,255,255,0.3);
  447. }
  448. .ai-chat-messages {
  449. flex: 1;
  450. overflow-y: auto;
  451. padding: 20px;
  452. display: flex;
  453. flex-direction: column;
  454. gap: 15px;
  455. }
  456. .ai-message {
  457. display: flex;
  458. align-items: flex-start;
  459. gap: 12px;
  460. }
  461. .user-message {
  462. display: flex;
  463. align-items: flex-start;
  464. gap: 12px;
  465. flex-direction: row-reverse;
  466. }
  467. .message-avatar {
  468. width: 35px;
  469. height: 35px;
  470. background: rgba(255,255,255,0.2);
  471. border-radius: 50%;
  472. display: flex;
  473. align-items: center;
  474. justify-content: center;
  475. font-size: 16px;
  476. flex-shrink: 0;
  477. }
  478. .user-message .message-avatar {
  479. background: rgba(255,255,255,0.9);
  480. }
  481. .message-content {
  482. flex: 1;
  483. max-width: 80%;
  484. }
  485. .message-text {
  486. background: rgba(255,255,255,0.15);
  487. padding: 12px 16px;
  488. border-radius: 18px;
  489. color: white;
  490. font-size: 14px;
  491. line-height: 1.5;
  492. backdrop-filter: blur(10px);
  493. }
  494. .user-message .message-text {
  495. background: rgba(255,255,255,0.9);
  496. color: #333;
  497. }
  498. .message-time {
  499. font-size: 11px;
  500. color: rgba(255,255,255,0.7);
  501. margin-top: 4px;
  502. padding-left: 16px;
  503. }
  504. .user-message .message-time {
  505. color: rgba(0,0,0,0.5);
  506. text-align: right;
  507. padding-left: 0;
  508. padding-right: 16px;
  509. }
  510. .ai-quick-commands {
  511. padding: 15px 20px;
  512. display: flex;
  513. gap: 10px;
  514. overflow-x: auto;
  515. background: rgba(255,255,255,0.05);
  516. }
  517. .quick-command {
  518. min-width: 120px;
  519. background: rgba(255,255,255,0.1);
  520. border-radius: 20px;
  521. padding: 10px 15px;
  522. display: flex;
  523. align-items: center;
  524. gap: 8px;
  525. cursor: pointer;
  526. transition: all 0.3s ease;
  527. color: white;
  528. font-size: 13px;
  529. }
  530. .quick-command:hover {
  531. background: rgba(255,255,255,0.2);
  532. transform: translateY(-2px);
  533. }
  534. .command-icon {
  535. font-size: 16px;
  536. }
  537. .ai-chat-input-area {
  538. padding: 20px;
  539. background: rgba(255,255,255,0.1);
  540. backdrop-filter: blur(10px);
  541. }
  542. .input-toolbar {
  543. display: flex;
  544. gap: 10px;
  545. margin-bottom: 12px;
  546. }
  547. .input-tool {
  548. color: white;
  549. cursor: pointer;
  550. transition: all 0.3s ease;
  551. display: flex;
  552. align-items: center;
  553. justify-content: center;
  554. padding: 2px;
  555. outline: none;
  556. background: none;
  557. border: none;
  558. }
  559. .input-tool:hover {
  560. transform: scale(1.1);
  561. }
  562. .input-tool:focus {
  563. outline: none;
  564. }
  565. .tool-icon {
  566. font-size: 14px;
  567. display: flex;
  568. align-items: center;
  569. justify-content: center;
  570. border: none;
  571. }
  572. .input-container {
  573. display: flex;
  574. gap: 10px;
  575. align-items: center;
  576. }
  577. .input-container input {
  578. flex: 1;
  579. background: rgba(255,255,255,0.9);
  580. border: none;
  581. border-radius: 25px;
  582. padding: 12px 20px;
  583. font-size: 14px;
  584. outline: none;
  585. color: #333;
  586. }
  587. .input-container input::placeholder {
  588. color: #999;
  589. }
  590. .send-button {
  591. width: 45px;
  592. height: 45px;
  593. background: linear-gradient(135deg, #ff6b6b, #ffa726);
  594. border: none;
  595. border-radius: 50%;
  596. color: white;
  597. cursor: pointer;
  598. transition: all 0.3s ease;
  599. display: flex;
  600. align-items: center;
  601. justify-content: center;
  602. }
  603. .send-button:hover {
  604. transform: scale(1.05);
  605. box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
  606. }
  607. .send-icon {
  608. font-size: 18px;
  609. }
  610. /* AI推荐结果页面样式 */
  611. .ai-recommendation-modal {
  612. position: fixed;
  613. top: 0;
  614. left: 0;
  615. width: 100%;
  616. height: 100%;
  617. background: rgba(0,0,0,0.95);
  618. backdrop-filter: blur(10px);
  619. z-index: 2000;
  620. display: flex;
  621. align-items: center;
  622. justify-content: center;
  623. animation: fadeIn 0.3s ease;
  624. }
  625. .recommendation-container {
  626. width: 100%;
  627. max-width: 414px;
  628. height: 100%;
  629. background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  630. display: flex;
  631. flex-direction: column;
  632. overflow-y: auto;
  633. }
  634. .recommendation-header {
  635. padding: 20px;
  636. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  637. color: white;
  638. display: flex;
  639. justify-content: space-between;
  640. align-items: center;
  641. }
  642. .recommendation-header h2 {
  643. font-size: 20px;
  644. margin: 0;
  645. font-weight: 600;
  646. }
  647. .close-recommendation {
  648. width: 40px;
  649. height: 40px;
  650. background: rgba(255,255,255,0.2);
  651. border: none;
  652. border-radius: 50%;
  653. color: white;
  654. font-size: 18px;
  655. cursor: pointer;
  656. transition: all 0.3s ease;
  657. }
  658. .close-recommendation:hover {
  659. background: rgba(255,255,255,0.3);
  660. }
  661. .recommendation-content {
  662. flex: 1;
  663. padding: 20px;
  664. }
  665. .recommendation-3d-section {
  666. background: white;
  667. border-radius: 20px;
  668. padding: 20px;
  669. margin-bottom: 20px;
  670. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  671. }
  672. .recommendation-3d-viewer {
  673. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  674. border-radius: 15px;
  675. height: 250px;
  676. margin-bottom: 20px;
  677. display: flex;
  678. align-items: center;
  679. justify-content: center;
  680. position: relative;
  681. overflow: hidden;
  682. }
  683. .model-3d-container {
  684. text-align: center;
  685. color: white;
  686. }
  687. .model-3d-display {
  688. font-size: 80px;
  689. margin-bottom: 15px;
  690. animation: float 3s ease-in-out infinite;
  691. }
  692. @keyframes float {
  693. 0%, 100% { transform: translateY(0px); }
  694. 50% { transform: translateY(-10px); }
  695. }
  696. .model-controls {
  697. display: flex;
  698. gap: 10px;
  699. justify-content: center;
  700. }
  701. .model-control {
  702. width: 40px;
  703. height: 40px;
  704. background: rgba(255,255,255,0.2);
  705. border: none;
  706. border-radius: 50%;
  707. color: white;
  708. font-size: 16px;
  709. cursor: pointer;
  710. transition: all 0.3s ease;
  711. }
  712. .model-control:hover {
  713. background: rgba(255,255,255,0.3);
  714. transform: scale(1.05);
  715. }
  716. .scheme-selector h4 {
  717. font-size: 16px;
  718. margin-bottom: 15px;
  719. color: #333;
  720. }
  721. .scheme-tabs {
  722. display: flex;
  723. gap: 10px;
  724. }
  725. .scheme-tab {
  726. flex: 1;
  727. padding: 10px;
  728. background: #f8f9fa;
  729. border-radius: 10px;
  730. text-align: center;
  731. cursor: pointer;
  732. transition: all 0.3s ease;
  733. font-size: 14px;
  734. font-weight: 500;
  735. }
  736. .scheme-tab.active {
  737. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  738. color: white;
  739. }
  740. .color-theory-section {
  741. background: white;
  742. border-radius: 20px;
  743. padding: 20px;
  744. margin-bottom: 20px;
  745. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  746. }
  747. .color-theory-section h4 {
  748. font-size: 18px;
  749. margin-bottom: 20px;
  750. color: #333;
  751. }
  752. .theory-content {
  753. display: flex;
  754. flex-direction: column;
  755. gap: 15px;
  756. }
  757. .theory-card {
  758. display: flex;
  759. align-items: flex-start;
  760. gap: 15px;
  761. padding: 15px;
  762. background: #f8f9fa;
  763. border-radius: 15px;
  764. }
  765. .theory-icon {
  766. width: 40px;
  767. height: 40px;
  768. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  769. border-radius: 50%;
  770. display: flex;
  771. align-items: center;
  772. justify-content: center;
  773. font-size: 18px;
  774. flex-shrink: 0;
  775. }
  776. .theory-text h5 {
  777. font-size: 16px;
  778. margin: 0 0 8px 0;
  779. color: #333;
  780. font-weight: 600;
  781. }
  782. .theory-text p {
  783. font-size: 14px;
  784. color: #666;
  785. margin: 0;
  786. line-height: 1.5;
  787. }
  788. .recommendation-actions {
  789. display: flex;
  790. gap: 12px;
  791. margin-top: 20px;
  792. }
  793. .action-btn {
  794. flex: 1;
  795. padding: 15px;
  796. border: none;
  797. border-radius: 15px;
  798. font-size: 14px;
  799. font-weight: 600;
  800. cursor: pointer;
  801. transition: all 0.3s ease;
  802. display: flex;
  803. align-items: center;
  804. justify-content: center;
  805. gap: 8px;
  806. }
  807. .action-btn.primary {
  808. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  809. color: white;
  810. }
  811. .action-btn.secondary {
  812. background: #f8f9fa;
  813. color: #666;
  814. border: 1px solid #e9ecef;
  815. }
  816. .action-btn:hover {
  817. transform: translateY(-2px);
  818. box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  819. }
  820. .btn-icon {
  821. font-size: 16px;
  822. }
  823. /* 底部导航 */
  824. .bottom-nav {
  825. position: fixed;
  826. bottom: 0;
  827. left: 50%;
  828. transform: translateX(-50%);
  829. width: 414px;
  830. max-width: 100%;
  831. background: rgba(255,255,255,0.95);
  832. backdrop-filter: blur(20px);
  833. border-top: 1px solid rgba(0,0,0,0.1);
  834. display: flex;
  835. justify-content: space-around;
  836. padding: 12px 0;
  837. z-index: 100;
  838. }
  839. .nav-item {
  840. display: flex;
  841. flex-direction: column;
  842. align-items: center;
  843. gap: 4px;
  844. cursor: pointer;
  845. transition: all 0.3s ease;
  846. padding: 8px;
  847. border-radius: 12px;
  848. min-width: 60px;
  849. }
  850. .nav-item.active {
  851. background: linear-gradient(135deg, #ff6b6b, #ffa726);
  852. color: white;
  853. }
  854. .nav-item:not(.active):hover {
  855. background: rgba(0,0,0,0.05);
  856. }
  857. .nav-icon {
  858. font-size: 20px;
  859. }
  860. .nav-text {
  861. font-size: 10px;
  862. font-weight: 500;
  863. }
  864. /* 上传按钮特殊样式 */
  865. .upload-btn {
  866. position: relative;
  867. background: linear-gradient(135deg, #ff6b6b, #ffa726) !important;
  868. color: white !important;
  869. border-radius: 50%;
  870. width: 56px;
  871. height: 56px;
  872. margin-top: -20px;
  873. box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
  874. }
  875. .upload-btn:hover {
  876. transform: translateY(-2px);
  877. box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
  878. }
  879. .upload-icon {
  880. font-size: 28px;
  881. font-weight: bold;
  882. }
  883. /* 模态框样式 */
  884. .modal {
  885. position: fixed;
  886. top: 0;
  887. left: 0;
  888. width: 100%;
  889. height: 100%;
  890. background: rgba(0,0,0,0.8);
  891. backdrop-filter: blur(10px);
  892. display: none;
  893. align-items: center;
  894. justify-content: center;
  895. z-index: 1000;
  896. animation: fadeIn 0.3s ease;
  897. }
  898. @keyframes fadeIn {
  899. from { opacity: 0; }
  900. to { opacity: 1; }
  901. }
  902. .modal-content {
  903. background: white;
  904. border-radius: 25px;
  905. padding: 30px;
  906. margin: 20px;
  907. max-width: 350px;
  908. width: 100%;
  909. text-align: center;
  910. transform: scale(0.9);
  911. animation: modalPop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  912. }
  913. @keyframes modalPop {
  914. to { transform: scale(1); }
  915. }
  916. .modal h3 {
  917. font-size: 24px;
  918. margin-bottom: 15px;
  919. color: #333;
  920. }
  921. .modal p {
  922. color: #666;
  923. margin-bottom: 25px;
  924. line-height: 1.5;
  925. }
  926. .modal-actions {
  927. display: flex;
  928. gap: 12px;
  929. }
  930. .btn {
  931. flex: 1;
  932. padding: 12px;
  933. border: none;
  934. border-radius: 12px;
  935. font-size: 16px;
  936. font-weight: 600;
  937. cursor: pointer;
  938. transition: all 0.3s ease;
  939. }
  940. .btn-primary {
  941. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  942. color: white;
  943. }
  944. .btn-primary:hover {
  945. transform: translateY(-2px);
  946. box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
  947. }
  948. .btn-secondary {
  949. background: #f8f9fa;
  950. color: #666;
  951. }
  952. .btn-secondary:hover {
  953. background: #e9ecef;
  954. }
  955. /* 设置模态框样式 */
  956. .settings-modal {
  957. display: none;
  958. position: fixed;
  959. z-index: 2000;
  960. left: 0;
  961. top: 0;
  962. width: 100%;
  963. height: 100%;
  964. background: rgba(0,0,0,0.6);
  965. backdrop-filter: blur(5px);
  966. animation: fadeIn 0.3s ease;
  967. }
  968. .settings-modal-content {
  969. position: absolute;
  970. left: 50%;
  971. top: 50%;
  972. transform: translate(-50%, -50%);
  973. width: 90%;
  974. max-width: 480px;
  975. max-height: 85vh;
  976. background: white;
  977. border-radius: 20px;
  978. box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  979. overflow: hidden;
  980. animation: slideIn 0.3s ease;
  981. }
  982. @keyframes slideIn {
  983. from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  984. to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  985. }
  986. .settings-header {
  987. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  988. color: white;
  989. padding: 20px;
  990. display: flex;
  991. justify-content: space-between;
  992. align-items: center;
  993. }
  994. .settings-header h2 {
  995. font-size: 20px;
  996. font-weight: 600;
  997. margin: 0;
  998. }
  999. .close-btn {
  1000. background: none;
  1001. border: none;
  1002. color: white;
  1003. font-size: 24px;
  1004. cursor: pointer;
  1005. padding: 5px;
  1006. border-radius: 50%;
  1007. width: 35px;
  1008. height: 35px;
  1009. display: flex;
  1010. align-items: center;
  1011. justify-content: center;
  1012. transition: background 0.3s ease;
  1013. }
  1014. .close-btn:hover {
  1015. background: rgba(255,255,255,0.2);
  1016. }
  1017. .settings-body {
  1018. padding: 0;
  1019. max-height: 60vh;
  1020. overflow-y: auto;
  1021. }
  1022. .settings-section {
  1023. padding: 20px;
  1024. border-bottom: 1px solid #f0f0f0;
  1025. }
  1026. .settings-section:last-child {
  1027. border-bottom: none;
  1028. }
  1029. .settings-section h3 {
  1030. font-size: 16px;
  1031. font-weight: 600;
  1032. color: #333;
  1033. margin: 0 0 15px 0;
  1034. }
  1035. /* 个人资料样式 */
  1036. .profile-info {
  1037. display: flex;
  1038. flex-direction: column;
  1039. gap: 20px;
  1040. }
  1041. .profile-avatar {
  1042. display: flex;
  1043. justify-content: center;
  1044. }
  1045. .avatar-circle {
  1046. position: relative;
  1047. cursor: pointer;
  1048. }
  1049. .avatar-circle img {
  1050. width: 80px;
  1051. height: 80px;
  1052. border-radius: 50%;
  1053. border: 3px solid #ff6b6b;
  1054. }
  1055. .avatar-edit {
  1056. position: absolute;
  1057. bottom: 0;
  1058. right: 0;
  1059. background: #ff6b6b;
  1060. color: white;
  1061. width: 25px;
  1062. height: 25px;
  1063. border-radius: 50%;
  1064. display: flex;
  1065. align-items: center;
  1066. justify-content: center;
  1067. font-size: 12px;
  1068. border: 2px solid white;
  1069. }
  1070. .profile-details .form-group {
  1071. margin-bottom: 15px;
  1072. }
  1073. .profile-details label {
  1074. display: block;
  1075. font-size: 14px;
  1076. font-weight: 500;
  1077. color: #555;
  1078. margin-bottom: 5px;
  1079. }
  1080. .profile-details input,
  1081. .profile-details textarea {
  1082. width: 100%;
  1083. padding: 10px;
  1084. border: 1px solid #ddd;
  1085. border-radius: 8px;
  1086. font-size: 14px;
  1087. font-family: inherit;
  1088. transition: border-color 0.3s ease;
  1089. box-sizing: border-box;
  1090. }
  1091. .profile-details input:focus,
  1092. .profile-details textarea:focus {
  1093. outline: none;
  1094. border-color: #ff6b6b;
  1095. }
  1096. .profile-details textarea {
  1097. resize: vertical;
  1098. min-height: 60px;
  1099. }
  1100. /* 安全设置样式 */
  1101. .security-items {
  1102. display: flex;
  1103. flex-direction: column;
  1104. gap: 12px;
  1105. }
  1106. .security-item {
  1107. display: flex;
  1108. align-items: center;
  1109. justify-content: space-between;
  1110. padding: 12px;
  1111. background: #f8f9fa;
  1112. border-radius: 10px;
  1113. cursor: pointer;
  1114. transition: background 0.3s ease;
  1115. }
  1116. .security-item:hover {
  1117. background: #e9ecef;
  1118. }
  1119. .security-left {
  1120. display: flex;
  1121. align-items: center;
  1122. gap: 12px;
  1123. }
  1124. .security-icon {
  1125. font-size: 20px;
  1126. }
  1127. .security-title {
  1128. font-size: 14px;
  1129. font-weight: 500;
  1130. color: #333;
  1131. }
  1132. .security-desc {
  1133. font-size: 12px;
  1134. color: #666;
  1135. margin-top: 2px;
  1136. }
  1137. .arrow {
  1138. color: #999;
  1139. font-size: 16px;
  1140. }
  1141. /* 隐私设置样式 */
  1142. .privacy-items {
  1143. display: flex;
  1144. flex-direction: column;
  1145. gap: 15px;
  1146. }
  1147. .privacy-item {
  1148. display: flex;
  1149. align-items: center;
  1150. justify-content: space-between;
  1151. }
  1152. .privacy-left {
  1153. display: flex;
  1154. align-items: center;
  1155. gap: 12px;
  1156. flex: 1;
  1157. }
  1158. .privacy-icon {
  1159. font-size: 18px;
  1160. }
  1161. .privacy-title {
  1162. font-size: 14px;
  1163. font-weight: 500;
  1164. color: #333;
  1165. }
  1166. .privacy-desc {
  1167. font-size: 12px;
  1168. color: #666;
  1169. margin-top: 2px;
  1170. }
  1171. .privacy-select {
  1172. padding: 6px 10px;
  1173. border: 1px solid #ddd;
  1174. border-radius: 6px;
  1175. font-size: 12px;
  1176. background: white;
  1177. }
  1178. /* 开关样式 */
  1179. .switch {
  1180. position: relative;
  1181. display: inline-block;
  1182. width: 44px;
  1183. height: 24px;
  1184. }
  1185. .switch input {
  1186. opacity: 0;
  1187. width: 0;
  1188. height: 0;
  1189. }
  1190. .slider {
  1191. position: absolute;
  1192. cursor: pointer;
  1193. top: 0;
  1194. left: 0;
  1195. right: 0;
  1196. bottom: 0;
  1197. background-color: #ccc;
  1198. transition: 0.3s;
  1199. border-radius: 24px;
  1200. }
  1201. .slider:before {
  1202. position: absolute;
  1203. content: "";
  1204. height: 18px;
  1205. width: 18px;
  1206. left: 3px;
  1207. bottom: 3px;
  1208. background-color: white;
  1209. transition: 0.3s;
  1210. border-radius: 50%;
  1211. }
  1212. input:checked + .slider {
  1213. background-color: #ff6b6b;
  1214. }
  1215. input:checked + .slider:before {
  1216. transform: translateX(20px);
  1217. }
  1218. /* 应用设置样式 */
  1219. .app-items {
  1220. display: flex;
  1221. flex-direction: column;
  1222. gap: 12px;
  1223. }
  1224. .app-item {
  1225. display: flex;
  1226. align-items: center;
  1227. justify-content: space-between;
  1228. padding: 12px;
  1229. background: #f8f9fa;
  1230. border-radius: 10px;
  1231. cursor: pointer;
  1232. transition: background 0.3s ease;
  1233. }
  1234. .app-item:hover {
  1235. background: #e9ecef;
  1236. }
  1237. .app-left {
  1238. display: flex;
  1239. align-items: center;
  1240. gap: 12px;
  1241. }
  1242. .app-icon {
  1243. font-size: 18px;
  1244. }
  1245. .app-title {
  1246. font-size: 14px;
  1247. font-weight: 500;
  1248. color: #333;
  1249. }
  1250. .app-right {
  1251. display: flex;
  1252. align-items: center;
  1253. gap: 8px;
  1254. }
  1255. .version,
  1256. .cache-size {
  1257. font-size: 12px;
  1258. color: #666;
  1259. }
  1260. /* 设置底部 */
  1261. .settings-footer {
  1262. padding: 20px;
  1263. background: #f8f9fa;
  1264. display: flex;
  1265. gap: 12px;
  1266. }
  1267. .save-btn {
  1268. flex: 1;
  1269. padding: 12px;
  1270. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1271. color: white;
  1272. border: none;
  1273. border-radius: 8px;
  1274. font-size: 14px;
  1275. font-weight: 500;
  1276. cursor: pointer;
  1277. transition: transform 0.2s ease;
  1278. }
  1279. .save-btn:hover {
  1280. transform: translateY(-1px);
  1281. }
  1282. .logout-btn {
  1283. flex: 1;
  1284. padding: 12px;
  1285. background: #dc3545;
  1286. color: white;
  1287. border: none;
  1288. border-radius: 8px;
  1289. font-size: 14px;
  1290. font-weight: 500;
  1291. cursor: pointer;
  1292. transition: background 0.3s ease;
  1293. }
  1294. .logout-btn:hover {
  1295. background: #c82333;
  1296. }
  1297. /* 新版设计中心样式 */
  1298. .design-preview-system {
  1299. margin: 20px;
  1300. margin-bottom: 25px;
  1301. }
  1302. .preview-container {
  1303. background: white;
  1304. border-radius: 20px;
  1305. padding: 20px;
  1306. box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  1307. position: relative;
  1308. }
  1309. .preview-3d-enhanced {
  1310. position: relative;
  1311. height: 280px;
  1312. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  1313. border-radius: 15px;
  1314. overflow: hidden;
  1315. margin-bottom: 15px;
  1316. }
  1317. .model-3d-wrapper {
  1318. position: relative;
  1319. width: 100%;
  1320. height: 100%;
  1321. display: flex;
  1322. align-items: center;
  1323. justify-content: center;
  1324. }
  1325. #main3DModel {
  1326. font-size: 100px;
  1327. color: white;
  1328. z-index: 2;
  1329. position: relative;
  1330. animation: float 6s ease-in-out infinite;
  1331. transition: all 0.5s ease;
  1332. }
  1333. @keyframes float {
  1334. 0%, 100% { transform: translateY(0px) rotate(0deg); }
  1335. 50% { transform: translateY(-10px) rotate(5deg); }
  1336. }
  1337. .model-highlights {
  1338. position: absolute;
  1339. top: 0;
  1340. left: 0;
  1341. right: 0;
  1342. bottom: 0;
  1343. pointer-events: none;
  1344. z-index: 3;
  1345. }
  1346. .preview-controls {
  1347. position: absolute;
  1348. bottom: 15px;
  1349. right: 15px;
  1350. z-index: 4;
  1351. }
  1352. .control-group {
  1353. display: flex;
  1354. gap: 8px;
  1355. }
  1356. .control-btn {
  1357. width: 35px;
  1358. height: 35px;
  1359. border-radius: 50%;
  1360. background: rgba(255, 255, 255, 0.9);
  1361. border: none;
  1362. cursor: pointer;
  1363. font-size: 16px;
  1364. display: flex;
  1365. align-items: center;
  1366. justify-content: center;
  1367. transition: all 0.3s ease;
  1368. backdrop-filter: blur(10px);
  1369. }
  1370. .control-btn:hover {
  1371. background: white;
  1372. transform: scale(1.1);
  1373. }
  1374. /* 3D分区控制面板样式 */
  1375. .zone-control-panel {
  1376. margin: 20px;
  1377. background: white;
  1378. border-radius: 20px;
  1379. box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  1380. overflow: hidden;
  1381. }
  1382. .panel-header {
  1383. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1384. color: white;
  1385. padding: 15px 20px;
  1386. display: flex;
  1387. justify-content: space-between;
  1388. align-items: center;
  1389. }
  1390. .panel-header h3 {
  1391. margin: 0;
  1392. font-size: 16px;
  1393. font-weight: 600;
  1394. }
  1395. .expand-btn {
  1396. background: none;
  1397. border: none;
  1398. color: white;
  1399. font-size: 18px;
  1400. cursor: pointer;
  1401. transition: transform 0.3s ease;
  1402. }
  1403. .expand-btn:hover {
  1404. transform: scale(1.1);
  1405. }
  1406. .panel-content {
  1407. padding: 20px;
  1408. }
  1409. /* 部位选择器(胶囊式Tab)样式 */
  1410. .body-part-selector {
  1411. margin-bottom: 25px;
  1412. }
  1413. .part-tabs {
  1414. display: flex;
  1415. gap: 8px;
  1416. flex-wrap: wrap;
  1417. }
  1418. .part-tab {
  1419. background: #f8f9fa;
  1420. border: 2px solid transparent;
  1421. border-radius: 25px;
  1422. padding: 10px 15px;
  1423. cursor: pointer;
  1424. transition: all 0.3s ease;
  1425. display: flex;
  1426. align-items: center;
  1427. gap: 6px;
  1428. flex: 1;
  1429. min-width: 70px;
  1430. justify-content: center;
  1431. }
  1432. .part-tab:hover {
  1433. background: rgba(255, 107, 107, 0.1);
  1434. border-color: rgba(255, 107, 107, 0.3);
  1435. }
  1436. .part-tab.active {
  1437. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1438. color: white;
  1439. border-color: #ff6b6b;
  1440. transform: translateY(-2px);
  1441. box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
  1442. }
  1443. .tab-icon {
  1444. font-size: 14px;
  1445. }
  1446. .tab-text {
  1447. font-size: 12px;
  1448. font-weight: 500;
  1449. }
  1450. /* 色盘管理系统样式 */
  1451. .color-management-system {
  1452. margin: 20px;
  1453. background: white;
  1454. border-radius: 20px;
  1455. box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  1456. overflow: hidden;
  1457. }
  1458. .color-system-header {
  1459. background: linear-gradient(45deg, #667eea, #764ba2);
  1460. color: white;
  1461. padding: 15px 20px;
  1462. display: flex;
  1463. justify-content: space-between;
  1464. align-items: center;
  1465. }
  1466. .color-system-header h3 {
  1467. margin: 0;
  1468. font-size: 16px;
  1469. font-weight: 600;
  1470. }
  1471. .color-actions {
  1472. display: flex;
  1473. gap: 8px;
  1474. }
  1475. .action-btn {
  1476. width: 32px;
  1477. height: 32px;
  1478. border-radius: 50%;
  1479. background: rgba(255, 255, 255, 0.2);
  1480. border: none;
  1481. color: white;
  1482. font-size: 14px;
  1483. cursor: pointer;
  1484. transition: all 0.3s ease;
  1485. display: flex;
  1486. align-items: center;
  1487. justify-content: center;
  1488. }
  1489. .action-btn:hover {
  1490. background: rgba(255, 255, 255, 0.3);
  1491. transform: scale(1.1);
  1492. }
  1493. .zone-color-memory {
  1494. padding: 15px 20px;
  1495. background: #f8f9fa;
  1496. border-bottom: 1px solid #e9ecef;
  1497. }
  1498. .current-part-info {
  1499. display: flex;
  1500. align-items: center;
  1501. gap: 10px;
  1502. }
  1503. .part-label {
  1504. font-size: 12px;
  1505. color: #666;
  1506. }
  1507. .part-name {
  1508. font-size: 14px;
  1509. font-weight: 600;
  1510. color: #333;
  1511. }
  1512. .color-indicator {
  1513. width: 20px;
  1514. height: 20px;
  1515. border-radius: 50%;
  1516. border: 2px solid white;
  1517. box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  1518. }
  1519. .master-color-picker {
  1520. padding: 20px;
  1521. }
  1522. .color-picker-section {
  1523. margin-bottom: 25px;
  1524. }
  1525. .color-picker-section:last-child {
  1526. margin-bottom: 0;
  1527. }
  1528. .color-picker-section h4 {
  1529. font-size: 14px;
  1530. font-weight: 600;
  1531. color: #333;
  1532. margin-bottom: 12px;
  1533. }
  1534. .enhanced-palette {
  1535. display: grid;
  1536. grid-template-columns: repeat(8, 1fr);
  1537. gap: 8px;
  1538. }
  1539. .color-swatch {
  1540. width: 35px;
  1541. height: 35px;
  1542. border-radius: 8px;
  1543. cursor: pointer;
  1544. transition: all 0.3s ease;
  1545. border: 2px solid transparent;
  1546. position: relative;
  1547. }
  1548. .color-swatch:hover {
  1549. transform: scale(1.1);
  1550. border-color: #333;
  1551. }
  1552. .color-swatch.active {
  1553. transform: scale(1.15);
  1554. border-color: #333;
  1555. box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  1556. }
  1557. .custom-color-controls {
  1558. display: flex;
  1559. gap: 12px;
  1560. align-items: center;
  1561. }
  1562. #customColorPicker {
  1563. width: 40px;
  1564. height: 40px;
  1565. border: none;
  1566. border-radius: 8px;
  1567. cursor: pointer;
  1568. }
  1569. .add-custom-btn {
  1570. flex: 1;
  1571. padding: 8px 12px;
  1572. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1573. color: white;
  1574. border: none;
  1575. border-radius: 6px;
  1576. font-size: 12px;
  1577. cursor: pointer;
  1578. transition: transform 0.2s ease;
  1579. }
  1580. .add-custom-btn:hover {
  1581. transform: translateY(-1px);
  1582. }
  1583. /* 历史配色库样式 */
  1584. .color-history-section {
  1585. padding: 20px;
  1586. border-top: 1px solid #e9ecef;
  1587. }
  1588. .color-history-section h4 {
  1589. font-size: 14px;
  1590. font-weight: 600;
  1591. color: #333;
  1592. margin-bottom: 15px;
  1593. }
  1594. .history-schemes {
  1595. display: flex;
  1596. flex-direction: column;
  1597. gap: 10px;
  1598. }
  1599. .scheme-item {
  1600. display: flex;
  1601. align-items: center;
  1602. gap: 12px;
  1603. padding: 10px;
  1604. background: #f8f9fa;
  1605. border-radius: 8px;
  1606. cursor: pointer;
  1607. transition: all 0.3s ease;
  1608. }
  1609. .scheme-item:hover {
  1610. background: rgba(255, 107, 107, 0.1);
  1611. }
  1612. .scheme-preview {
  1613. display: flex;
  1614. gap: 2px;
  1615. }
  1616. .scheme-color {
  1617. width: 20px;
  1618. height: 20px;
  1619. border-radius: 50%;
  1620. }
  1621. .scheme-name {
  1622. font-size: 12px;
  1623. color: #666;
  1624. }
  1625. /* 高级定制工具样式 */
  1626. .advanced-tools {
  1627. margin: 20px;
  1628. background: white;
  1629. border-radius: 20px;
  1630. box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  1631. overflow: hidden;
  1632. }
  1633. .tools-header {
  1634. background: linear-gradient(45deg, #43e97b, #38f9d7);
  1635. color: white;
  1636. padding: 15px 20px;
  1637. }
  1638. .tools-header h3 {
  1639. margin: 0;
  1640. font-size: 16px;
  1641. font-weight: 600;
  1642. }
  1643. .advanced-tool-grid {
  1644. padding: 20px;
  1645. display: grid;
  1646. grid-template-columns: repeat(2, 1fr);
  1647. gap: 15px;
  1648. }
  1649. .advanced-tool-card {
  1650. background: #f8f9fa;
  1651. border-radius: 12px;
  1652. padding: 15px;
  1653. display: flex;
  1654. align-items: center;
  1655. gap: 12px;
  1656. cursor: pointer;
  1657. transition: all 0.3s ease;
  1658. border: 2px solid transparent;
  1659. }
  1660. .advanced-tool-card:hover {
  1661. background: white;
  1662. border-color: rgba(67, 233, 123, 0.3);
  1663. transform: translateY(-2px);
  1664. box-shadow: 0 8px 25px rgba(67, 233, 123, 0.2);
  1665. }
  1666. .advanced-tool-card .tool-icon {
  1667. font-size: 24px;
  1668. }
  1669. .tool-content {
  1670. flex: 1;
  1671. }
  1672. .advanced-tool-card .tool-title {
  1673. font-size: 14px;
  1674. font-weight: 600;
  1675. color: #333;
  1676. margin-bottom: 2px;
  1677. }
  1678. .tool-desc {
  1679. font-size: 11px;
  1680. color: #666;
  1681. }
  1682. /* 设计工具区域 */
  1683. .design-tools {
  1684. margin: 20px;
  1685. display: none;
  1686. }
  1687. .tool-grid {
  1688. display: grid;
  1689. grid-template-columns: repeat(2, 1fr);
  1690. gap: 15px;
  1691. margin-bottom: 20px;
  1692. }
  1693. .tool-card {
  1694. background: white;
  1695. border-radius: 15px;
  1696. padding: 20px;
  1697. text-align: center;
  1698. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  1699. cursor: pointer;
  1700. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  1701. }
  1702. .tool-card:hover {
  1703. transform: translateY(-5px);
  1704. box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  1705. }
  1706. .tool-icon {
  1707. font-size: 40px;
  1708. margin-bottom: 10px;
  1709. display: block;
  1710. }
  1711. .tool-title {
  1712. font-size: 16px;
  1713. font-weight: 600;
  1714. color: #333;
  1715. }
  1716. /* 颜色选择器 */
  1717. .color-picker {
  1718. background: white;
  1719. border-radius: 15px;
  1720. padding: 20px;
  1721. margin-bottom: 20px;
  1722. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  1723. }
  1724. .color-palette {
  1725. display: grid;
  1726. grid-template-columns: repeat(7, 1fr);
  1727. gap: 8px;
  1728. margin-top: 15px;
  1729. }
  1730. @media (max-width: 380px) {
  1731. .color-palette {
  1732. grid-template-columns: repeat(5, 1fr);
  1733. gap: 6px;
  1734. }
  1735. }
  1736. .color-swatch {
  1737. width: 30px;
  1738. height: 30px;
  1739. border-radius: 50%;
  1740. cursor: pointer;
  1741. transition: all 0.3s ease;
  1742. border: 2px solid transparent;
  1743. }
  1744. .color-swatch:hover,
  1745. .color-swatch.active {
  1746. transform: scale(1.2);
  1747. border-color: #333;
  1748. box-shadow: 0 0 15px rgba(0,0,0,0.3);
  1749. }
  1750. .color-swatch[data-color="白色"]:hover,
  1751. .color-swatch[data-color="白色"].active {
  1752. border-color: #ff6b6b;
  1753. box-shadow: 0 0 15px rgba(255,107,107,0.5);
  1754. }
  1755. .color-swatch[title*="白色"] {
  1756. border: 2px solid #ddd !important;
  1757. }
  1758. .color-swatch[title*="白色"]:hover {
  1759. border-color: #ff6b6b !important;
  1760. }
  1761. /* 3D预览区 */
  1762. .preview-3d {
  1763. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  1764. border-radius: 15px;
  1765. height: 300px;
  1766. display: flex;
  1767. align-items: center;
  1768. justify-content: center;
  1769. color: white;
  1770. font-size: 18px;
  1771. margin-bottom: 20px;
  1772. box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  1773. position: relative;
  1774. overflow: hidden;
  1775. }
  1776. .preview-3d::before {
  1777. content: '';
  1778. position: absolute;
  1779. top: 0;
  1780. left: 0;
  1781. right: 0;
  1782. bottom: 0;
  1783. background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  1784. }
  1785. .model-3d {
  1786. font-size: 80px;
  1787. z-index: 2;
  1788. position: relative;
  1789. animation: rotate3d 10s infinite linear;
  1790. }
  1791. @keyframes rotate3d {
  1792. 0% { transform: rotateY(0deg); }
  1793. 100% { transform: rotateY(360deg); }
  1794. }
  1795. /* 服装预览样式 */
  1796. .clothing-preview {
  1797. position: relative;
  1798. width: 280px;
  1799. height: 280px;
  1800. display: flex;
  1801. align-items: center;
  1802. justify-content: center;
  1803. z-index: 2;
  1804. }
  1805. .clothing-layer {
  1806. position: absolute;
  1807. top: 0;
  1808. left: 0;
  1809. width: 100%;
  1810. height: 100%;
  1811. display: flex;
  1812. align-items: center;
  1813. justify-content: center;
  1814. }
  1815. .part-image {
  1816. max-width: 100%;
  1817. max-height: 100%;
  1818. object-fit: contain;
  1819. transition: all 0.3s ease;
  1820. filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  1821. }
  1822. .part-image.highlighted {
  1823. filter: drop-shadow(0 0 20px #ffa726) drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  1824. transform: scale(1.05);
  1825. }
  1826. .part-image.selected {
  1827. filter: drop-shadow(0 0 15px #ff6b6b) drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  1828. }
  1829. /* 社区页面 */
  1830. .community-page {
  1831. display: none;
  1832. }
  1833. .community-header {
  1834. background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  1835. padding: 20px;
  1836. color: white;
  1837. text-align: center;
  1838. }
  1839. .community-header-top {
  1840. display: flex;
  1841. justify-content: space-between;
  1842. align-items: center;
  1843. margin-bottom: 10px;
  1844. }
  1845. /* 发布按钮样式 */
  1846. .publish-btn {
  1847. background: rgba(255, 255, 255, 0.2);
  1848. border: 1px solid rgba(255, 255, 255, 0.3);
  1849. color: white;
  1850. padding: 8px 16px;
  1851. border-radius: 20px;
  1852. font-size: 14px;
  1853. cursor: pointer;
  1854. transition: all 0.3s ease;
  1855. display: flex;
  1856. align-items: center;
  1857. gap: 6px;
  1858. }
  1859. .publish-btn:hover {
  1860. background: rgba(255, 255, 255, 0.3);
  1861. transform: translateY(-2px);
  1862. }
  1863. .publish-icon {
  1864. font-size: 16px;
  1865. }
  1866. /* 上传模态框样式 */
  1867. .upload-modal {
  1868. position: fixed;
  1869. top: 0;
  1870. left: 0;
  1871. width: 100%;
  1872. height: 100%;
  1873. background: rgba(0, 0, 0, 0.8);
  1874. backdrop-filter: blur(10px);
  1875. display: none;
  1876. align-items: center;
  1877. justify-content: center;
  1878. z-index: 1000;
  1879. animation: fadeIn 0.3s ease;
  1880. }
  1881. .upload-modal-content {
  1882. background: white;
  1883. border-radius: 25px;
  1884. padding: 0;
  1885. margin: 20px;
  1886. max-width: 380px;
  1887. width: 100%;
  1888. max-height: 90vh;
  1889. overflow-y: auto;
  1890. transform: scale(0.9);
  1891. animation: modalPop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  1892. }
  1893. /* 步骤指示器 */
  1894. .upload-steps {
  1895. display: flex;
  1896. justify-content: space-between;
  1897. padding: 20px 30px 0;
  1898. margin-bottom: 20px;
  1899. }
  1900. .step {
  1901. display: flex;
  1902. flex-direction: column;
  1903. align-items: center;
  1904. flex: 1;
  1905. position: relative;
  1906. }
  1907. .step:not(:last-child)::after {
  1908. content: '';
  1909. position: absolute;
  1910. top: 15px;
  1911. left: 60%;
  1912. width: 40px;
  1913. height: 2px;
  1914. background: #e9ecef;
  1915. z-index: 1;
  1916. }
  1917. .step.active:not(:last-child)::after {
  1918. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1919. }
  1920. .step-number {
  1921. width: 30px;
  1922. height: 30px;
  1923. border-radius: 50%;
  1924. background: #e9ecef;
  1925. color: #666;
  1926. display: flex;
  1927. align-items: center;
  1928. justify-content: center;
  1929. font-size: 14px;
  1930. font-weight: 600;
  1931. margin-bottom: 8px;
  1932. position: relative;
  1933. z-index: 2;
  1934. transition: all 0.3s ease;
  1935. }
  1936. .step.active .step-number {
  1937. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  1938. color: white;
  1939. }
  1940. .step-label {
  1941. font-size: 12px;
  1942. color: #666;
  1943. text-align: center;
  1944. }
  1945. .step.active .step-label {
  1946. color: #333;
  1947. font-weight: 600;
  1948. }
  1949. /* 上传步骤内容 */
  1950. .upload-step {
  1951. display: none;
  1952. padding: 0 30px 20px;
  1953. }
  1954. .upload-step.active {
  1955. display: block;
  1956. }
  1957. .upload-step h3 {
  1958. font-size: 20px;
  1959. margin-bottom: 20px;
  1960. color: #333;
  1961. text-align: center;
  1962. }
  1963. /* 作品类型选择 */
  1964. .work-types {
  1965. display: flex;
  1966. flex-direction: column;
  1967. gap: 12px;
  1968. }
  1969. .work-type {
  1970. border: 2px solid #e9ecef;
  1971. border-radius: 15px;
  1972. padding: 20px;
  1973. cursor: pointer;
  1974. transition: all 0.3s ease;
  1975. text-align: center;
  1976. }
  1977. .work-type:hover {
  1978. border-color: #ff6b6b;
  1979. background: rgba(255, 107, 107, 0.05);
  1980. }
  1981. .work-type.selected {
  1982. border-color: #ff6b6b;
  1983. background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 167, 38, 0.1));
  1984. }
  1985. .type-icon {
  1986. font-size: 32px;
  1987. margin-bottom: 10px;
  1988. }
  1989. .type-name {
  1990. font-size: 16px;
  1991. font-weight: 600;
  1992. color: #333;
  1993. margin-bottom: 5px;
  1994. }
  1995. .type-desc {
  1996. font-size: 12px;
  1997. color: #666;
  1998. }
  1999. /* 上传选项 */
  2000. .upload-options {
  2001. display: flex;
  2002. flex-direction: column;
  2003. gap: 20px;
  2004. }
  2005. .upload-section {
  2006. border: 1px solid #e9ecef;
  2007. border-radius: 15px;
  2008. padding: 20px;
  2009. }
  2010. .upload-section h4 {
  2011. font-size: 14px;
  2012. font-weight: 600;
  2013. color: #333;
  2014. margin-bottom: 15px;
  2015. }
  2016. /* 文件上传区域 */
  2017. .file-upload-area {
  2018. border: 2px dashed #ddd;
  2019. border-radius: 12px;
  2020. padding: 30px 20px;
  2021. text-align: center;
  2022. cursor: pointer;
  2023. transition: all 0.3s ease;
  2024. background: #fafafa;
  2025. }
  2026. .file-upload-area:hover {
  2027. border-color: #ff6b6b;
  2028. background: rgba(255, 107, 107, 0.05);
  2029. }
  2030. .upload-placeholder {
  2031. display: flex;
  2032. flex-direction: column;
  2033. align-items: center;
  2034. gap: 8px;
  2035. }
  2036. .upload-icon {
  2037. font-size: 32px;
  2038. color: #666;
  2039. }
  2040. .upload-text {
  2041. font-size: 14px;
  2042. font-weight: 600;
  2043. color: #333;
  2044. }
  2045. .upload-hint {
  2046. font-size: 12px;
  2047. color: #666;
  2048. }
  2049. /* 上传预览 */
  2050. .upload-preview {
  2051. display: grid;
  2052. grid-template-columns: repeat(3, 1fr);
  2053. gap: 10px;
  2054. margin-top: 15px;
  2055. }
  2056. .preview-item {
  2057. position: relative;
  2058. aspect-ratio: 1;
  2059. border-radius: 8px;
  2060. overflow: hidden;
  2061. background: #f8f9fa;
  2062. }
  2063. .preview-item img {
  2064. width: 100%;
  2065. height: 100%;
  2066. object-fit: cover;
  2067. }
  2068. .preview-remove {
  2069. position: absolute;
  2070. top: 5px;
  2071. right: 5px;
  2072. width: 20px;
  2073. height: 20px;
  2074. border-radius: 50%;
  2075. background: rgba(0, 0, 0, 0.7);
  2076. color: white;
  2077. border: none;
  2078. cursor: pointer;
  2079. font-size: 12px;
  2080. display: flex;
  2081. align-items: center;
  2082. justify-content: center;
  2083. }
  2084. /* 我的设计网格 */
  2085. .my-designs-grid {
  2086. display: grid;
  2087. grid-template-columns: repeat(3, 1fr);
  2088. gap: 10px;
  2089. }
  2090. .design-item {
  2091. text-align: center;
  2092. cursor: pointer;
  2093. padding: 10px;
  2094. border-radius: 8px;
  2095. transition: all 0.3s ease;
  2096. }
  2097. .design-item:hover {
  2098. background: rgba(255, 107, 107, 0.05);
  2099. }
  2100. .design-item.selected {
  2101. background: rgba(255, 107, 107, 0.1);
  2102. border: 2px solid #ff6b6b;
  2103. }
  2104. .design-preview {
  2105. width: 60px;
  2106. height: 60px;
  2107. border-radius: 8px;
  2108. background: linear-gradient(45deg, #a8edea 0%, #fed6e3 100%);
  2109. display: flex;
  2110. align-items: center;
  2111. justify-content: center;
  2112. font-size: 24px;
  2113. margin: 0 auto 8px;
  2114. }
  2115. .design-name {
  2116. font-size: 12px;
  2117. color: #666;
  2118. }
  2119. /* 描述表单 */
  2120. .description-form {
  2121. display: flex;
  2122. flex-direction: column;
  2123. gap: 20px;
  2124. }
  2125. .form-group {
  2126. position: relative;
  2127. }
  2128. .form-group label {
  2129. display: block;
  2130. font-size: 14px;
  2131. font-weight: 600;
  2132. color: #333;
  2133. margin-bottom: 8px;
  2134. }
  2135. .form-group input,
  2136. .form-group textarea,
  2137. .form-group select {
  2138. width: 100%;
  2139. padding: 12px;
  2140. border: 2px solid #e9ecef;
  2141. border-radius: 8px;
  2142. font-size: 14px;
  2143. transition: all 0.3s ease;
  2144. resize: none;
  2145. }
  2146. .form-group input:focus,
  2147. .form-group textarea:focus,
  2148. .form-group select:focus {
  2149. outline: none;
  2150. border-color: #ff6b6b;
  2151. box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
  2152. }
  2153. .form-group textarea {
  2154. height: 80px;
  2155. }
  2156. .char-count {
  2157. position: absolute;
  2158. bottom: -20px;
  2159. right: 0;
  2160. font-size: 12px;
  2161. color: #666;
  2162. }
  2163. /* 标签容器 */
  2164. .tags-container {
  2165. display: flex;
  2166. flex-direction: column;
  2167. gap: 12px;
  2168. }
  2169. .popular-tags {
  2170. display: flex;
  2171. flex-wrap: wrap;
  2172. gap: 8px;
  2173. }
  2174. .tag {
  2175. background: #f8f9fa;
  2176. color: #666;
  2177. padding: 6px 12px;
  2178. border-radius: 20px;
  2179. font-size: 12px;
  2180. cursor: pointer;
  2181. transition: all 0.3s ease;
  2182. border: 1px solid transparent;
  2183. }
  2184. .tag:hover {
  2185. background: rgba(255, 107, 107, 0.1);
  2186. color: #ff6b6b;
  2187. }
  2188. .tag.selected {
  2189. background: #ff6b6b;
  2190. color: white;
  2191. }
  2192. /* 发布设置 */
  2193. .publish-settings {
  2194. display: flex;
  2195. flex-direction: column;
  2196. gap: 25px;
  2197. }
  2198. .setting-group {
  2199. border: 1px solid #e9ecef;
  2200. border-radius: 12px;
  2201. padding: 20px;
  2202. }
  2203. .setting-group > label {
  2204. display: block;
  2205. font-size: 16px;
  2206. font-weight: 600;
  2207. color: #333;
  2208. margin-bottom: 15px;
  2209. }
  2210. .radio-group {
  2211. display: flex;
  2212. flex-direction: column;
  2213. gap: 12px;
  2214. }
  2215. .radio-option,
  2216. .checkbox-option {
  2217. display: flex;
  2218. align-items: flex-start;
  2219. gap: 12px;
  2220. cursor: pointer;
  2221. padding: 12px;
  2222. border-radius: 8px;
  2223. transition: all 0.3s ease;
  2224. }
  2225. .radio-option:hover,
  2226. .checkbox-option:hover {
  2227. background: rgba(255, 107, 107, 0.05);
  2228. }
  2229. .radio-option input,
  2230. .checkbox-option input {
  2231. display: none;
  2232. }
  2233. .radio-custom,
  2234. .checkbox-custom {
  2235. width: 20px;
  2236. height: 20px;
  2237. border: 2px solid #ddd;
  2238. border-radius: 50%;
  2239. position: relative;
  2240. transition: all 0.3s ease;
  2241. flex-shrink: 0;
  2242. margin-top: 2px;
  2243. }
  2244. .checkbox-custom {
  2245. border-radius: 4px;
  2246. }
  2247. .radio-option input:checked + .radio-custom,
  2248. .checkbox-option input:checked + .checkbox-custom {
  2249. border-color: #ff6b6b;
  2250. background: #ff6b6b;
  2251. }
  2252. .radio-option input:checked + .radio-custom::after {
  2253. content: '';
  2254. position: absolute;
  2255. top: 50%;
  2256. left: 50%;
  2257. transform: translate(-50%, -50%);
  2258. width: 8px;
  2259. height: 8px;
  2260. border-radius: 50%;
  2261. background: white;
  2262. }
  2263. .checkbox-option input:checked + .checkbox-custom::after {
  2264. content: '✓';
  2265. position: absolute;
  2266. top: 50%;
  2267. left: 50%;
  2268. transform: translate(-50%, -50%);
  2269. color: white;
  2270. font-size: 12px;
  2271. font-weight: bold;
  2272. }
  2273. .option-content {
  2274. flex: 1;
  2275. }
  2276. .option-title {
  2277. font-size: 14px;
  2278. font-weight: 600;
  2279. color: #333;
  2280. margin-bottom: 4px;
  2281. }
  2282. .option-desc {
  2283. font-size: 12px;
  2284. color: #666;
  2285. line-height: 1.4;
  2286. }
  2287. /* 模态框底部 */
  2288. .upload-modal-footer {
  2289. padding: 20px 30px;
  2290. border-top: 1px solid #e9ecef;
  2291. display: flex;
  2292. gap: 12px;
  2293. justify-content: flex-end;
  2294. }
  2295. .btn-outline {
  2296. background: transparent;
  2297. border: 2px solid #ff6b6b;
  2298. color: #ff6b6b;
  2299. }
  2300. .btn-outline:hover {
  2301. background: #ff6b6b;
  2302. color: white;
  2303. }
  2304. /* 草稿箱和我的作品样式 */
  2305. .drafts-content,
  2306. .my-works-content {
  2307. max-width: 400px;
  2308. max-height: 80vh;
  2309. overflow-y: auto;
  2310. }
  2311. .drafts-list,
  2312. .works-content {
  2313. max-height: 400px;
  2314. overflow-y: auto;
  2315. margin-bottom: 20px;
  2316. }
  2317. .draft-item,
  2318. .work-item {
  2319. display: flex;
  2320. align-items: center;
  2321. gap: 15px;
  2322. padding: 15px;
  2323. border: 1px solid #e9ecef;
  2324. border-radius: 12px;
  2325. margin-bottom: 12px;
  2326. transition: all 0.3s ease;
  2327. }
  2328. .draft-item:hover,
  2329. .work-item:hover {
  2330. border-color: #ff6b6b;
  2331. background: rgba(255, 107, 107, 0.05);
  2332. }
  2333. .draft-preview,
  2334. .work-preview {
  2335. width: 50px;
  2336. height: 50px;
  2337. border-radius: 8px;
  2338. background: linear-gradient(45deg, #a8edea 0%, #fed6e3 100%);
  2339. display: flex;
  2340. align-items: center;
  2341. justify-content: center;
  2342. font-size: 20px;
  2343. flex-shrink: 0;
  2344. }
  2345. .draft-info,
  2346. .work-info {
  2347. flex: 1;
  2348. }
  2349. .draft-title,
  2350. .work-title {
  2351. font-size: 14px;
  2352. font-weight: 600;
  2353. color: #333;
  2354. margin-bottom: 4px;
  2355. }
  2356. .draft-time {
  2357. font-size: 12px;
  2358. color: #666;
  2359. }
  2360. .work-stats {
  2361. display: flex;
  2362. gap: 12px;
  2363. font-size: 12px;
  2364. color: #666;
  2365. }
  2366. .draft-actions,
  2367. .work-actions {
  2368. display: flex;
  2369. gap: 8px;
  2370. }
  2371. .draft-actions button,
  2372. .work-actions button {
  2373. padding: 6px 12px;
  2374. border: 1px solid #ddd;
  2375. border-radius: 6px;
  2376. background: white;
  2377. color: #666;
  2378. font-size: 12px;
  2379. cursor: pointer;
  2380. transition: all 0.3s ease;
  2381. }
  2382. .draft-actions button:hover,
  2383. .work-actions button:hover {
  2384. border-color: #ff6b6b;
  2385. color: #ff6b6b;
  2386. }
  2387. /* 作品标签页 */
  2388. .works-tabs {
  2389. display: flex;
  2390. border-bottom: 1px solid #e9ecef;
  2391. margin-bottom: 20px;
  2392. }
  2393. .tab {
  2394. flex: 1;
  2395. padding: 12px;
  2396. text-align: center;
  2397. cursor: pointer;
  2398. border-bottom: 2px solid transparent;
  2399. transition: all 0.3s ease;
  2400. font-size: 14px;
  2401. font-weight: 500;
  2402. }
  2403. .tab.active {
  2404. color: #ff6b6b;
  2405. border-bottom-color: #ff6b6b;
  2406. }
  2407. .tab:hover {
  2408. background: rgba(255, 107, 107, 0.05);
  2409. }
  2410. /* 数据分析 */
  2411. .analytics-summary {
  2412. display: grid;
  2413. grid-template-columns: repeat(3, 1fr);
  2414. gap: 15px;
  2415. text-align: center;
  2416. }
  2417. .analytics-item {
  2418. padding: 20px;
  2419. border: 1px solid #e9ecef;
  2420. border-radius: 12px;
  2421. background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 167, 38, 0.05));
  2422. }
  2423. .analytics-number {
  2424. font-size: 24px;
  2425. font-weight: 700;
  2426. color: #ff6b6b;
  2427. margin-bottom: 5px;
  2428. }
  2429. .analytics-label {
  2430. font-size: 12px;
  2431. color: #666;
  2432. }
  2433. /* 响应式调整 */
  2434. @media (max-width: 380px) {
  2435. .upload-modal-content {
  2436. margin: 10px;
  2437. max-width: calc(100% - 20px);
  2438. }
  2439. .upload-steps {
  2440. padding: 15px 20px 0;
  2441. }
  2442. .upload-step {
  2443. padding: 0 20px 15px;
  2444. }
  2445. .upload-modal-footer {
  2446. padding: 15px 20px;
  2447. }
  2448. /* AI推荐引擎小屏幕优化 */
  2449. .ai-engine-card {
  2450. margin: 15px;
  2451. padding: 20px;
  2452. }
  2453. .ai-quick-actions {
  2454. gap: 10px;
  2455. }
  2456. .quick-action {
  2457. padding: 12px 10px;
  2458. min-height: 45px;
  2459. }
  2460. .action-text {
  2461. font-size: 13px;
  2462. }
  2463. .preview-items {
  2464. gap: 10px;
  2465. }
  2466. .preview-item {
  2467. padding: 12px 10px;
  2468. min-height: 65px;
  2469. gap: 10px;
  2470. }
  2471. .preview-image {
  2472. width: 40px;
  2473. height: 40px;
  2474. font-size: 20px;
  2475. }
  2476. .preview-title {
  2477. font-size: 13px;
  2478. }
  2479. .preview-tags {
  2480. font-size: 10px;
  2481. }
  2482. .ai-preview-results h4 {
  2483. font-size: 15px;
  2484. margin-bottom: 12px;
  2485. }
  2486. }
  2487. @media (max-width: 320px) {
  2488. /* 极小屏幕优化 */
  2489. .ai-quick-actions {
  2490. grid-template-columns: 1fr;
  2491. gap: 8px;
  2492. }
  2493. .quick-action {
  2494. justify-content: center;
  2495. text-align: center;
  2496. }
  2497. .preview-items {
  2498. grid-template-columns: 1fr;
  2499. gap: 8px;
  2500. }
  2501. }
  2502. .community-stats {
  2503. display: flex;
  2504. justify-content: space-around;
  2505. margin: 20px 0;
  2506. }
  2507. .stat-item {
  2508. text-align: center;
  2509. }
  2510. .stat-number {
  2511. font-size: 24px;
  2512. font-weight: 700;
  2513. }
  2514. .stat-label {
  2515. font-size: 12px;
  2516. opacity: 0.8;
  2517. }
  2518. /* 个人中心 */
  2519. .profile-page {
  2520. display: none;
  2521. }
  2522. .profile-header {
  2523. background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
  2524. padding: 30px 20px;
  2525. text-align: center;
  2526. color: white;
  2527. }
  2528. .avatar {
  2529. width: 80px;
  2530. height: 80px;
  2531. border-radius: 50%;
  2532. background: rgba(255,255,255,0.3);
  2533. display: flex;
  2534. align-items: center;
  2535. justify-content: center;
  2536. font-size: 36px;
  2537. margin: 0 auto 15px;
  2538. border: 3px solid rgba(255,255,255,0.5);
  2539. }
  2540. .profile-menu {
  2541. padding: 20px;
  2542. }
  2543. .menu-item {
  2544. display: flex;
  2545. align-items: center;
  2546. justify-content: space-between;
  2547. padding: 15px;
  2548. background: white;
  2549. border-radius: 12px;
  2550. margin-bottom: 10px;
  2551. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  2552. cursor: pointer;
  2553. transition: all 0.3s ease;
  2554. }
  2555. .menu-item:hover {
  2556. transform: translateX(5px);
  2557. box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  2558. }
  2559. .menu-left {
  2560. display: flex;
  2561. align-items: center;
  2562. gap: 12px;
  2563. }
  2564. .menu-icon {
  2565. font-size: 18px;
  2566. color: #667eea;
  2567. }
  2568. /* 响应式设计 */
  2569. @media (max-width: 480px) {
  2570. .app-container {
  2571. max-width: 100%;
  2572. }
  2573. .bottom-nav {
  2574. width: 100%;
  2575. }
  2576. }
  2577. /* 滚动条样式 */
  2578. ::-webkit-scrollbar {
  2579. width: 4px;
  2580. }
  2581. ::-webkit-scrollbar-track {
  2582. background: transparent;
  2583. }
  2584. ::-webkit-scrollbar-thumb {
  2585. background: rgba(0,0,0,0.2);
  2586. border-radius: 2px;
  2587. }
  2588. /* 页面切换动画 */
  2589. .page {
  2590. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  2591. }
  2592. .page.fade-out {
  2593. opacity: 0;
  2594. transform: translateX(-20px);
  2595. }
  2596. .page.fade-in {
  2597. opacity: 1;
  2598. transform: translateX(0);
  2599. }
  2600. /* 3D试衣间样式 */
  2601. .fitting-flow-nav {
  2602. display: flex;
  2603. justify-content: center;
  2604. margin: 20px 0;
  2605. padding: 0 20px;
  2606. }
  2607. .flow-step {
  2608. display: flex;
  2609. flex-direction: column;
  2610. align-items: center;
  2611. padding: 15px 20px;
  2612. margin: 0 10px;
  2613. border-radius: 12px;
  2614. background: #f8f9fa;
  2615. border: 2px solid transparent;
  2616. cursor: pointer;
  2617. transition: all 0.3s ease;
  2618. min-width: 80px;
  2619. }
  2620. .flow-step.active {
  2621. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  2622. color: white;
  2623. border-color: #667eea;
  2624. }
  2625. .step-icon {
  2626. font-size: 20px;
  2627. margin-bottom: 5px;
  2628. }
  2629. .step-text {
  2630. font-size: 12px;
  2631. font-weight: 600;
  2632. text-align: center;
  2633. }
  2634. .fitting-step {
  2635. margin: 0 20px;
  2636. }
  2637. .step-container {
  2638. background: white;
  2639. border-radius: 15px;
  2640. padding: 25px;
  2641. box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  2642. }
  2643. .step-title {
  2644. font-size: 18px;
  2645. font-weight: 700;
  2646. margin-bottom: 20px;
  2647. color: #333;
  2648. text-align: center;
  2649. }
  2650. /* 照片上传样式 */
  2651. .upload-methods {
  2652. display: grid;
  2653. grid-template-columns: repeat(2, 1fr);
  2654. gap: 15px;
  2655. margin-bottom: 25px;
  2656. }
  2657. .upload-method {
  2658. padding: 20px;
  2659. border: 2px solid #e9ecef;
  2660. border-radius: 12px;
  2661. text-align: center;
  2662. cursor: pointer;
  2663. transition: all 0.3s ease;
  2664. }
  2665. .upload-method.active {
  2666. border-color: #667eea;
  2667. background: #f8f9ff;
  2668. }
  2669. .method-icon {
  2670. font-size: 24px;
  2671. margin-bottom: 10px;
  2672. }
  2673. .method-title {
  2674. font-weight: 600;
  2675. font-size: 14px;
  2676. margin-bottom: 5px;
  2677. }
  2678. .method-desc {
  2679. font-size: 12px;
  2680. color: #666;
  2681. }
  2682. .camera-interface, .gallery-interface {
  2683. margin: 20px 0;
  2684. }
  2685. .camera-preview {
  2686. height: 300px;
  2687. background: #f8f9fa;
  2688. border-radius: 12px;
  2689. position: relative;
  2690. display: flex;
  2691. align-items: center;
  2692. justify-content: center;
  2693. margin-bottom: 15px;
  2694. border: 2px dashed #dee2e6;
  2695. }
  2696. .camera-placeholder {
  2697. text-align: center;
  2698. color: #666;
  2699. }
  2700. .camera-icon {
  2701. font-size: 48px;
  2702. margin-bottom: 15px;
  2703. }
  2704. .camera-text {
  2705. font-size: 16px;
  2706. font-weight: 600;
  2707. margin-bottom: 5px;
  2708. }
  2709. .camera-hint {
  2710. font-size: 12px;
  2711. opacity: 0.7;
  2712. }
  2713. .pose-guide {
  2714. position: absolute;
  2715. top: 20px;
  2716. right: 20px;
  2717. background: rgba(0,0,0,0.7);
  2718. color: white;
  2719. padding: 10px;
  2720. border-radius: 8px;
  2721. text-align: center;
  2722. font-size: 12px;
  2723. }
  2724. .guide-silhouette {
  2725. font-size: 24px;
  2726. margin-bottom: 5px;
  2727. }
  2728. .camera-controls {
  2729. display: flex;
  2730. justify-content: center;
  2731. gap: 10px;
  2732. }
  2733. .camera-btn {
  2734. padding: 10px 20px;
  2735. border: none;
  2736. border-radius: 8px;
  2737. background: #667eea;
  2738. color: white;
  2739. font-size: 14px;
  2740. cursor: pointer;
  2741. transition: all 0.3s ease;
  2742. }
  2743. .camera-btn:hover {
  2744. background: #5a6fd8;
  2745. transform: translateY(-2px);
  2746. }
  2747. .camera-btn.capture {
  2748. background: #ff6b6b;
  2749. }
  2750. .camera-btn.switch {
  2751. background: #4ecdc4;
  2752. }
  2753. .upload-zone {
  2754. height: 200px;
  2755. border: 2px dashed #dee2e6;
  2756. border-radius: 12px;
  2757. display: flex;
  2758. flex-direction: column;
  2759. align-items: center;
  2760. justify-content: center;
  2761. cursor: pointer;
  2762. transition: all 0.3s ease;
  2763. }
  2764. .upload-zone:hover {
  2765. border-color: #667eea;
  2766. background: #f8f9ff;
  2767. }
  2768. .upload-icon {
  2769. font-size: 36px;
  2770. margin-bottom: 10px;
  2771. }
  2772. .upload-text {
  2773. font-weight: 600;
  2774. margin-bottom: 5px;
  2775. }
  2776. .upload-hint {
  2777. font-size: 12px;
  2778. color: #666;
  2779. }
  2780. .crop-area {
  2781. margin-top: 20px;
  2782. }
  2783. .crop-container {
  2784. position: relative;
  2785. height: 300px;
  2786. background: #f8f9fa;
  2787. border-radius: 12px;
  2788. overflow: hidden;
  2789. }
  2790. .crop-controls {
  2791. display: flex;
  2792. justify-content: center;
  2793. gap: 10px;
  2794. margin-top: 15px;
  2795. }
  2796. .crop-btn {
  2797. padding: 8px 16px;
  2798. border: 1px solid #dee2e6;
  2799. border-radius: 6px;
  2800. background: white;
  2801. cursor: pointer;
  2802. transition: all 0.3s ease;
  2803. }
  2804. .crop-btn.confirm {
  2805. background: #28a745;
  2806. color: white;
  2807. border-color: #28a745;
  2808. }
  2809. /* 姿势校准样式 */
  2810. .pose-calibration {
  2811. margin-top: 25px;
  2812. padding: 20px;
  2813. background: #f8f9fa;
  2814. border-radius: 12px;
  2815. }
  2816. .calibration-display {
  2817. display: grid;
  2818. grid-template-columns: 1fr 1fr;
  2819. gap: 20px;
  2820. margin: 20px 0;
  2821. }
  2822. .body-keypoints {
  2823. display: flex;
  2824. flex-direction: column;
  2825. gap: 10px;
  2826. }
  2827. .keypoint {
  2828. padding: 10px;
  2829. background: white;
  2830. border-radius: 8px;
  2831. border-left: 4px solid #28a745;
  2832. font-size: 14px;
  2833. }
  2834. .calibration-status {
  2835. display: flex;
  2836. flex-direction: column;
  2837. gap: 10px;
  2838. }
  2839. .status-item {
  2840. display: flex;
  2841. align-items: center;
  2842. gap: 10px;
  2843. font-size: 14px;
  2844. }
  2845. .status-icon {
  2846. font-size: 16px;
  2847. }
  2848. .calibration-actions {
  2849. display: flex;
  2850. justify-content: center;
  2851. gap: 15px;
  2852. margin-top: 20px;
  2853. }
  2854. .calib-btn {
  2855. padding: 10px 20px;
  2856. border: 1px solid #dee2e6;
  2857. border-radius: 8px;
  2858. background: white;
  2859. cursor: pointer;
  2860. transition: all 0.3s ease;
  2861. }
  2862. .calib-btn.next {
  2863. background: #28a745;
  2864. color: white;
  2865. border-color: #28a745;
  2866. }
  2867. /* 服装选择器样式 */
  2868. .clothing-tabs {
  2869. display: flex;
  2870. margin-bottom: 25px;
  2871. border-bottom: 1px solid #e9ecef;
  2872. }
  2873. .clothing-tab {
  2874. flex: 1;
  2875. display: flex;
  2876. align-items: center;
  2877. justify-content: center;
  2878. gap: 8px;
  2879. padding: 15px 10px;
  2880. cursor: pointer;
  2881. border-bottom: 2px solid transparent;
  2882. transition: all 0.3s ease;
  2883. }
  2884. .clothing-tab.active {
  2885. border-bottom-color: #667eea;
  2886. color: #667eea;
  2887. }
  2888. .tab-icon {
  2889. font-size: 16px;
  2890. }
  2891. .tab-text {
  2892. font-weight: 600;
  2893. font-size: 14px;
  2894. }
  2895. .tab-count {
  2896. background: #e9ecef;
  2897. color: #666;
  2898. padding: 2px 6px;
  2899. border-radius: 10px;
  2900. font-size: 11px;
  2901. }
  2902. .clothing-tab.active .tab-count {
  2903. background: #667eea;
  2904. color: white;
  2905. }
  2906. .design-grid, .trending-grid, .brand-grid {
  2907. display: grid;
  2908. grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  2909. gap: 15px;
  2910. }
  2911. .design-item, .trending-item, .brand-item {
  2912. background: white;
  2913. border-radius: 12px;
  2914. overflow: hidden;
  2915. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  2916. cursor: pointer;
  2917. transition: all 0.3s ease;
  2918. }
  2919. .design-item:hover, .trending-item:hover, .brand-item:hover {
  2920. transform: translateY(-5px);
  2921. box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  2922. }
  2923. .design-preview, .trending-preview, .brand-preview {
  2924. position: relative;
  2925. height: 120px;
  2926. overflow: hidden;
  2927. }
  2928. .design-image, .trending-image, .brand-image {
  2929. width: 100%;
  2930. height: 100%;
  2931. object-fit: cover;
  2932. }
  2933. .design-overlay {
  2934. position: absolute;
  2935. top: 0;
  2936. left: 0;
  2937. right: 0;
  2938. bottom: 0;
  2939. background: rgba(0,0,0,0.7);
  2940. color: white;
  2941. display: flex;
  2942. align-items: center;
  2943. justify-content: center;
  2944. opacity: 0;
  2945. transition: opacity 0.3s ease;
  2946. }
  2947. .design-item:hover .design-overlay {
  2948. opacity: 1;
  2949. }
  2950. .preview-btn {
  2951. padding: 6px 12px;
  2952. background: #667eea;
  2953. border-radius: 6px;
  2954. font-size: 12px;
  2955. font-weight: 600;
  2956. }
  2957. .design-info, .trending-info, .brand-item-info {
  2958. padding: 12px;
  2959. }
  2960. .design-name, .trending-name, .item-name {
  2961. font-weight: 600;
  2962. font-size: 13px;
  2963. margin-bottom: 4px;
  2964. }
  2965. .design-meta, .trending-author {
  2966. font-size: 11px;
  2967. color: #666;
  2968. }
  2969. .trending-stats {
  2970. position: absolute;
  2971. top: 8px;
  2972. right: 8px;
  2973. display: flex;
  2974. gap: 8px;
  2975. }
  2976. .stat {
  2977. background: rgba(0,0,0,0.7);
  2978. color: white;
  2979. padding: 4px 6px;
  2980. border-radius: 4px;
  2981. font-size: 10px;
  2982. }
  2983. .brand-tag {
  2984. position: absolute;
  2985. top: 8px;
  2986. left: 8px;
  2987. background: #ff6b6b;
  2988. color: white;
  2989. padding: 4px 8px;
  2990. border-radius: 4px;
  2991. font-size: 10px;
  2992. font-weight: 600;
  2993. }
  2994. .item-price {
  2995. color: #ff6b6b;
  2996. font-weight: 700;
  2997. font-size: 12px;
  2998. }
  2999. .trending-filter {
  3000. margin-bottom: 20px;
  3001. }
  3002. .filter-select {
  3003. padding: 8px 12px;
  3004. border: 1px solid #dee2e6;
  3005. border-radius: 6px;
  3006. background: white;
  3007. font-size: 14px;
  3008. }
  3009. .brand-collection {
  3010. margin-bottom: 25px;
  3011. }
  3012. .brand-header {
  3013. display: flex;
  3014. align-items: center;
  3015. gap: 15px;
  3016. margin-bottom: 20px;
  3017. padding: 15px;
  3018. background: #f8f9fa;
  3019. border-radius: 12px;
  3020. }
  3021. .brand-logo {
  3022. font-size: 32px;
  3023. }
  3024. .brand-name {
  3025. font-weight: 700;
  3026. font-size: 16px;
  3027. margin-bottom: 4px;
  3028. }
  3029. .brand-desc {
  3030. font-size: 12px;
  3031. color: #666;
  3032. }
  3033. .clothing-actions, .fitting-actions {
  3034. display: flex;
  3035. justify-content: space-between;
  3036. margin-top: 25px;
  3037. }
  3038. .clothing-btn, .fitting-btn {
  3039. padding: 12px 24px;
  3040. border: 1px solid #dee2e6;
  3041. border-radius: 8px;
  3042. background: white;
  3043. cursor: pointer;
  3044. font-weight: 600;
  3045. transition: all 0.3s ease;
  3046. }
  3047. .clothing-btn.next, .fitting-btn.next {
  3048. background: #28a745;
  3049. color: white;
  3050. border-color: #28a745;
  3051. }
  3052. .clothing-btn.back, .fitting-btn.back {
  3053. background: #6c757d;
  3054. color: white;
  3055. border-color: #6c757d;
  3056. }
  3057. /* 试衣展示系统样式 */
  3058. .fitting-display {
  3059. margin-bottom: 30px;
  3060. }
  3061. .fitting-viewport {
  3062. height: 400px;
  3063. background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  3064. border-radius: 15px;
  3065. position: relative;
  3066. overflow: hidden;
  3067. display: flex;
  3068. align-items: center;
  3069. justify-content: center;
  3070. }
  3071. .user-photo-layer, .clothing-layer {
  3072. position: absolute;
  3073. top: 0;
  3074. left: 0;
  3075. right: 0;
  3076. bottom: 0;
  3077. display: flex;
  3078. align-items: center;
  3079. justify-content: center;
  3080. }
  3081. .photo-placeholder, .clothing-placeholder {
  3082. font-size: 16px;
  3083. color: #666;
  3084. background: rgba(255,255,255,0.8);
  3085. padding: 20px;
  3086. border-radius: 12px;
  3087. text-align: center;
  3088. }
  3089. .fitting-indicators {
  3090. position: absolute;
  3091. bottom: 20px;
  3092. left: 20px;
  3093. display: flex;
  3094. flex-direction: column;
  3095. gap: 10px;
  3096. }
  3097. .fit-indicator {
  3098. display: flex;
  3099. align-items: center;
  3100. gap: 8px;
  3101. background: rgba(255,255,255,0.9);
  3102. padding: 8px 12px;
  3103. border-radius: 8px;
  3104. font-size: 12px;
  3105. }
  3106. .fit-indicator.active {
  3107. background: rgba(102, 126, 234, 0.9);
  3108. color: white;
  3109. }
  3110. .indicator-icon {
  3111. font-size: 14px;
  3112. }
  3113. /* 交互控制面板样式 */
  3114. .interaction-panel {
  3115. background: #f8f9fa;
  3116. border-radius: 15px;
  3117. padding: 20px;
  3118. margin-bottom: 25px;
  3119. }
  3120. .control-sections {
  3121. display: grid;
  3122. grid-template-columns: 1fr;
  3123. gap: 20px;
  3124. }
  3125. .control-section {
  3126. background: white;
  3127. padding: 15px;
  3128. border-radius: 12px;
  3129. }
  3130. .section-title {
  3131. font-weight: 600;
  3132. font-size: 14px;
  3133. margin-bottom: 15px;
  3134. color: #333;
  3135. }
  3136. .rotation-controls, .lighting-controls, .compare-controls {
  3137. display: flex;
  3138. justify-content: center;
  3139. gap: 10px;
  3140. flex-wrap: wrap;
  3141. }
  3142. .rotation-btn, .lighting-btn, .compare-btn {
  3143. padding: 8px 16px;
  3144. border: 1px solid #dee2e6;
  3145. border-radius: 8px;
  3146. background: white;
  3147. cursor: pointer;
  3148. transition: all 0.3s ease;
  3149. font-size: 12px;
  3150. display: flex;
  3151. align-items: center;
  3152. gap: 6px;
  3153. }
  3154. .rotation-btn:hover, .lighting-btn:hover, .compare-btn:hover {
  3155. background: #f8f9fa;
  3156. transform: translateY(-2px);
  3157. }
  3158. .lighting-btn.active, .compare-btn.active {
  3159. background: #667eea;
  3160. color: white;
  3161. border-color: #667eea;
  3162. }
  3163. .gesture-hint {
  3164. text-align: center;
  3165. font-size: 11px;
  3166. color: #666;
  3167. margin-top: 10px;
  3168. }
  3169. .light-icon, .compare-icon {
  3170. font-size: 14px;
  3171. }
  3172. /* 输出功能样式 */
  3173. .output-panel {
  3174. background: white;
  3175. border-radius: 15px;
  3176. padding: 20px;
  3177. border: 2px solid #e9ecef;
  3178. margin-bottom: 25px;
  3179. }
  3180. .output-actions {
  3181. display: grid;
  3182. grid-template-columns: 1fr;
  3183. gap: 15px;
  3184. }
  3185. .output-btn {
  3186. display: flex;
  3187. align-items: center;
  3188. gap: 15px;
  3189. padding: 15px;
  3190. border: 2px solid #e9ecef;
  3191. border-radius: 12px;
  3192. background: white;
  3193. cursor: pointer;
  3194. transition: all 0.3s ease;
  3195. }
  3196. .output-btn:hover {
  3197. border-color: #667eea;
  3198. background: #f8f9ff;
  3199. transform: translateY(-2px);
  3200. }
  3201. .output-btn.save {
  3202. border-color: #28a745;
  3203. }
  3204. .output-btn.share {
  3205. border-color: #17a2b8;
  3206. }
  3207. .output-btn.purchase {
  3208. border-color: #ff6b6b;
  3209. }
  3210. .output-icon {
  3211. font-size: 24px;
  3212. flex-shrink: 0;
  3213. }
  3214. .output-text {
  3215. flex: 1;
  3216. }
  3217. .output-title {
  3218. font-weight: 600;
  3219. font-size: 14px;
  3220. margin-bottom: 4px;
  3221. }
  3222. .output-desc {
  3223. font-size: 12px;
  3224. color: #666;
  3225. }
  3226. .fitting-btn.retry {
  3227. background: #ffc107;
  3228. color: #212529;
  3229. border-color: #ffc107;
  3230. }
  3231. /* 移动端适配 */
  3232. @media (max-width: 768px) {
  3233. .fitting-flow-nav {
  3234. padding: 0 10px;
  3235. }
  3236. .flow-step {
  3237. margin: 0 5px;
  3238. padding: 10px 15px;
  3239. min-width: 60px;
  3240. }
  3241. .step-icon {
  3242. font-size: 16px;
  3243. }
  3244. .step-text {
  3245. font-size: 10px;
  3246. }
  3247. .upload-methods {
  3248. grid-template-columns: 1fr;
  3249. }
  3250. .design-grid, .trending-grid, .brand-grid {
  3251. grid-template-columns: repeat(2, 1fr);
  3252. }
  3253. .control-sections {
  3254. grid-template-columns: 1fr;
  3255. }
  3256. .rotation-controls, .lighting-controls, .compare-controls {
  3257. justify-content: space-around;
  3258. }
  3259. .clothing-actions, .fitting-actions {
  3260. flex-direction: column;
  3261. gap: 10px;
  3262. }
  3263. .clothing-btn, .fitting-btn {
  3264. width: 100%;
  3265. }
  3266. }
  3267. </style>
  3268. </head>
  3269. <body>
  3270. <div class="app-container">
  3271. <!-- 首页 -->
  3272. <div id="home-page" class="page">
  3273. <header class="header">
  3274. <div class="header-content">
  3275. <h1>FashionCraft</h1>
  3276. <p>让创意穿在身上</p>
  3277. </div>
  3278. </header>
  3279. <main class="main-content">
  3280. <!-- 轮播区域 -->
  3281. <section class="banner-section">
  3282. <div class="banner-slider" id="bannerSlider">
  3283. <div class="banner-slide">
  3284. <div>
  3285. <div style="font-size: 24px; margin-bottom: 10px;">🎨</div>
  3286. <div>春季新品发布</div>
  3287. <div style="font-size: 14px; opacity: 0.8;">个性化设计,独一无二</div>
  3288. </div>
  3289. </div>
  3290. <div class="banner-slide" style="background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);">
  3291. <div>
  3292. <div style="font-size: 24px; margin-bottom: 10px;">✨</div>
  3293. <div>AI智能搭配</div>
  3294. <div style="font-size: 14px; opacity: 0.8;">科技赋能时尚创意</div>
  3295. </div>
  3296. </div>
  3297. <div class="banner-slide" style="background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);">
  3298. <div>
  3299. <div style="font-size: 24px; margin-bottom: 10px;">🏆</div>
  3300. <div>设计大赛进行中</div>
  3301. <div style="font-size: 14px; opacity: 0.8;">万元奖金等你来拿</div>
  3302. </div>
  3303. </div>
  3304. </div>
  3305. <div class="banner-indicators">
  3306. <div class="indicator active" data-slide="0"></div>
  3307. <div class="indicator" data-slide="1"></div>
  3308. <div class="indicator" data-slide="2"></div>
  3309. </div>
  3310. </section>
  3311. <!-- 快速设计入口 -->
  3312. <section class="quick-design" onclick="showDesignModal()">
  3313. <h2>开始设计</h2>
  3314. <p>点击开启你的创意之旅</p>
  3315. </section>
  3316. <!-- 热门作品 -->
  3317. <section class="popular-works">
  3318. <h3 class="section-title">热门作品</h3>
  3319. <div class="works-grid">
  3320. <div class="work-item" onclick="showWorkDetail('森系小清新')">
  3321. <div class="work-image">🌿</div>
  3322. <div class="work-info">
  3323. <div class="work-title">森系小清新</div>
  3324. <div class="work-stats">
  3325. <span>❤️ 2.3k</span>
  3326. <span>💬 186</span>
  3327. </div>
  3328. </div>
  3329. </div>
  3330. <div class="work-item" onclick="showWorkDetail('复古摩登')">
  3331. <div class="work-image" style="background: linear-gradient(45deg, #ffd89b 0%, #19547b 100%);">🎭</div>
  3332. <div class="work-info">
  3333. <div class="work-title">复古摩登</div>
  3334. <div class="work-stats">
  3335. <span>❤️ 1.8k</span>
  3336. <span>💬 142</span>
  3337. </div>
  3338. </div>
  3339. </div>
  3340. <div class="work-item" onclick="showWorkDetail('未来科技')">
  3341. <div class="work-image" style="background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);">🚀</div>
  3342. <div class="work-info">
  3343. <div class="work-title">未来科技</div>
  3344. <div class="work-stats">
  3345. <span>❤️ 3.1k</span>
  3346. <span>💬 256</span>
  3347. </div>
  3348. </div>
  3349. </div>
  3350. <div class="work-item" onclick="showWorkDetail('简约现代')">
  3351. <div class="work-image" style="background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);">🏛️</div>
  3352. <div class="work-info">
  3353. <div class="work-title">简约现代</div>
  3354. <div class="work-stats">
  3355. <span>❤️ 1.5k</span>
  3356. <span>💬 98</span>
  3357. </div>
  3358. </div>
  3359. </div>
  3360. </div>
  3361. </section>
  3362. <!-- AI推荐引擎入口 -->
  3363. <section class="ai-recommend-engine">
  3364. <div class="ai-engine-card">
  3365. <div class="ai-engine-header">
  3366. <div class="ai-brand">
  3367. <span class="ai-logo">🤖</span>
  3368. <div class="ai-brand-text">
  3369. <h3>AI时尚顾问</h3>
  3370. <p>专业搭配 · 智能推荐</p>
  3371. </div>
  3372. </div>
  3373. <div class="ai-status">
  3374. <span class="status-dot"></span>
  3375. <span class="status-text">在线</span>
  3376. </div>
  3377. </div>
  3378. <div class="ai-quick-actions">
  3379. <div class="quick-action" onclick="openAIChat('occasion')">
  3380. <span class="action-icon">🎯</span>
  3381. <span class="action-text">场合搭配</span>
  3382. </div>
  3383. <div class="quick-action" onclick="openAIChat('color')">
  3384. <span class="action-icon">🎨</span>
  3385. <span class="action-text">配色建议</span>
  3386. </div>
  3387. <div class="quick-action" onclick="openAIChat('style')">
  3388. <span class="action-icon">✨</span>
  3389. <span class="action-text">风格分析</span>
  3390. </div>
  3391. <div class="quick-action" onclick="openAIChat('free')">
  3392. <span class="action-icon">💬</span>
  3393. <span class="action-text">自由对话</span>
  3394. </div>
  3395. </div>
  3396. </div>
  3397. </section>
  3398. </main>
  3399. </div>
  3400. <!-- 设计中心页面 -->
  3401. <div id="design-page" class="page design-tools">
  3402. <header class="header">
  3403. <div class="header-content">
  3404. <h1>3D设计中心</h1>
  3405. <p>专业级颜色DIY设计器</p>
  3406. </div>
  3407. </header>
  3408. <main class="main-content">
  3409. <!-- 实时3D预览系统 -->
  3410. <div class="design-preview-system">
  3411. <div class="preview-container">
  3412. <div class="preview-3d-enhanced">
  3413. <div class="model-3d-wrapper">
  3414. <div class="clothing-preview" id="main3DModel">
  3415. <div class="clothing-layer" id="layer-s1">
  3416. <img src="切片图共7个/切片图共7个/蓝色/S1.png" alt="S1部位" class="part-image" data-part="s1">
  3417. </div>
  3418. <div class="clothing-layer" id="layer-t1">
  3419. <img src="切片图共7个/切片图共7个/蓝色/T1.png" alt="T1部位" class="part-image" data-part="t1">
  3420. </div>
  3421. <div class="clothing-layer" id="layer-y1">
  3422. <img src="切片图共7个/切片图共7个/蓝色/Y1.png" alt="Y1部位" class="part-image" data-part="y1">
  3423. </div>
  3424. <div class="clothing-layer" id="layer-z1">
  3425. <img src="切片图共7个/切片图共7个/蓝色/Z1.png" alt="Z1部位" class="part-image" data-part="z1">
  3426. </div>
  3427. </div>
  3428. <div class="model-highlights" id="modelHighlights"></div>
  3429. </div>
  3430. <!-- 3D控制面板 -->
  3431. <div class="preview-controls">
  3432. <div class="control-group">
  3433. <button class="control-btn" onclick="rotateModel('left')" title="向左旋转">↻</button>
  3434. <button class="control-btn" onclick="rotateModel('right')" title="向右旋转">↺</button>
  3435. <button class="control-btn" onclick="resetModelView()" title="重置视角">⌂</button>
  3436. </div>
  3437. </div>
  3438. </div>
  3439. </div>
  3440. </div>
  3441. <!-- 3D分区控制面板 -->
  3442. <div class="zone-control-panel">
  3443. <div class="panel-header">
  3444. <h3>分区控制面板</h3>
  3445. <button class="expand-btn" onclick="toggleZonePanel()">⌄</button>
  3446. </div>
  3447. <div class="panel-content">
  3448. <!-- 部位选择器(胶囊式Tab) -->
  3449. <div class="body-part-selector">
  3450. <div class="part-tabs">
  3451. <button class="part-tab active" data-part="overall" onclick="selectBodyPart('overall')">
  3452. <span class="tab-icon">🎯</span>
  3453. <span class="tab-text">整体</span>
  3454. </button>
  3455. <button class="part-tab" data-part="s1" onclick="selectBodyPart('s1')">
  3456. <span class="tab-icon">👔</span>
  3457. <span class="tab-text">S1部位</span>
  3458. </button>
  3459. <button class="part-tab" data-part="t1" onclick="selectBodyPart('t1')">
  3460. <span class="tab-icon">👕</span>
  3461. <span class="tab-text">T1部位</span>
  3462. </button>
  3463. <button class="part-tab" data-part="y1" onclick="selectBodyPart('y1')">
  3464. <span class="tab-icon">🎽</span>
  3465. <span class="tab-text">Y1部位</span>
  3466. </button>
  3467. <button class="part-tab" data-part="z1" onclick="selectBodyPart('z1')">
  3468. <span class="tab-icon">🧥</span>
  3469. <span class="tab-text">Z1部位</span>
  3470. </button>
  3471. </div>
  3472. </div>
  3473. </div>
  3474. </div>
  3475. <!-- 色盘管理系统 -->
  3476. <div class="color-management-system">
  3477. <div class="color-system-header">
  3478. <h3>智能色盘系统</h3>
  3479. <div class="color-actions">
  3480. <button class="action-btn" onclick="syncColorToAll()" title="同步当前色到所有部位">🔄</button>
  3481. <button class="action-btn" onclick="showColorHistory()" title="查看配色历史">📚</button>
  3482. <button class="action-btn" onclick="saveColorScheme()" title="保存配色方案">💾</button>
  3483. </div>
  3484. </div>
  3485. <!-- 分区色盘记忆 -->
  3486. <div class="zone-color-memory">
  3487. <div class="current-part-info">
  3488. <span class="part-label">当前部位:</span>
  3489. <span class="part-name" id="currentPartName">整体</span>
  3490. <span class="color-indicator" id="currentPartColor" style="background: #ff6b6b;"></span>
  3491. </div>
  3492. </div>
  3493. <!-- 主色盘 -->
  3494. <div class="master-color-picker">
  3495. <div class="color-picker-section">
  3496. <h4>基础色盘</h4>
  3497. <div class="color-palette enhanced-palette">
  3498. <!-- 原有颜色 -->
  3499. <div class="color-swatch" style="background: #3498db" onclick="selectClothingColor('蓝色')" data-color="蓝色" title="蓝色"></div>
  3500. <div class="color-swatch" style="background: #e91e63" onclick="selectClothingColor('粉色')" data-color="粉色" title="粉色"></div>
  3501. <div class="color-swatch" style="background: #8bc34a" onclick="selectClothingColor('牛油果绿')" data-color="牛油果绿" title="牛油果绿"></div>
  3502. <div class="color-swatch" style="background: #ffffff; border: 2px solid #ddd" onclick="selectClothingColor('白色')" data-color="白色" title="白色"></div>
  3503. <div class="color-swatch" style="background: #2c3e50" onclick="selectClothingColor('黑色')" data-color="黑色" title="黑色"></div>
  3504. <div class="color-swatch" style="background: #ff9800" onclick="selectClothingColor('橘色')" data-color="橘色" title="橘色"></div>
  3505. <div class="color-swatch" style="background: #9e9e9e" onclick="selectClothingColor('利灰')" data-color="利灰" title="利灰"></div>
  3506. <!-- 新增颜色 -->
  3507. <div class="color-swatch" style="background: #1e40af" onclick="selectClothingColor('宝蓝色')" data-color="宝蓝色" title="宝蓝色"></div>
  3508. <div class="color-swatch" style="background: #d2b48c" onclick="selectClothingColor('浅驼色')" data-color="浅驼色" title="浅驼色"></div>
  3509. <div class="color-swatch" style="background: #9ca3af" onclick="selectClothingColor('测试色')" data-color="测试色" title="测试色"></div>
  3510. <div class="color-swatch" style="background: #374151" onclick="selectClothingColor('深灰绿')" data-color="深灰绿" title="深灰绿"></div>
  3511. <div class="color-swatch" style="background: #581c87" onclick="selectClothingColor('深紫色')" data-color="深紫色" title="深紫色"></div>
  3512. <div class="color-swatch" style="background: #14532d" onclick="selectClothingColor('深绿色')" data-color="深绿色" title="深绿色"></div>
  3513. <div class="color-swatch" style="background: #dc2626" onclick="selectClothingColor('真朱')" data-color="真朱" title="真朱"></div>
  3514. <div class="color-swatch" style="background: #fbbf24" onclick="selectClothingColor('睿智金')" data-color="睿智金" title="睿智金"></div>
  3515. <div class="color-swatch" style="background: #ef4444" onclick="selectClothingColor('红色')" data-color="红色" title="红色"></div>
  3516. <div class="color-swatch" style="background: #84cc16" onclick="selectClothingColor('萌萌绿')" data-color="萌萌绿" title="萌萌绿"></div>
  3517. <div class="color-swatch" style="background: #0891b2" onclick="selectClothingColor('蒂芙尼蓝')" data-color="蒂芙尼蓝" title="蒂芙尼蓝"></div>
  3518. <div class="color-swatch" style="background: #3b82f6" onclick="selectClothingColor('长春花蓝')" data-color="长春花蓝" title="长春花蓝"></div>
  3519. <div class="color-swatch" style="background: #6b46c1" onclick="selectClothingColor('青紫')" data-color="青紫" title="青紫"></div>
  3520. <div class="color-swatch" style="background: #eab308" onclick="selectClothingColor('靓丽黄')" data-color="靓丽黄" title="靓丽黄"></div>
  3521. </div>
  3522. </div>
  3523. <!-- 自定义颜色 -->
  3524. <div class="color-picker-section">
  3525. <h4>自定义颜色</h4>
  3526. <div class="custom-color-controls">
  3527. <input type="color" id="customColorPicker" value="#ff6b6b" onchange="selectCustomColor(this.value)">
  3528. <button class="add-custom-btn" onclick="addCustomColor()">添加到色盘</button>
  3529. </div>
  3530. </div>
  3531. </div>
  3532. <!-- 历史配色库 -->
  3533. <div class="color-history-section" id="colorHistorySection" style="display: none;">
  3534. <h4>配色历史</h4>
  3535. <div class="history-schemes">
  3536. <div class="scheme-item" onclick="loadColorScheme('scheme1')">
  3537. <div class="scheme-preview">
  3538. <div class="scheme-color" style="background: #ff6b6b;"></div>
  3539. <div class="scheme-color" style="background: #4ecdc4;"></div>
  3540. <div class="scheme-color" style="background: #ffeaa7;"></div>
  3541. </div>
  3542. <span class="scheme-name">夏日活力</span>
  3543. </div>
  3544. <div class="scheme-item" onclick="loadColorScheme('scheme2')">
  3545. <div class="scheme-preview">
  3546. <div class="scheme-color" style="background: #667eea;"></div>
  3547. <div class="scheme-color" style="background: #764ba2;"></div>
  3548. <div class="scheme-color" style="background: #a29bfe;"></div>
  3549. </div>
  3550. <span class="scheme-name">深海紫韵</span>
  3551. </div>
  3552. </div>
  3553. </div>
  3554. </div>
  3555. <!-- 高级定制工具 -->
  3556. <div class="advanced-tools">
  3557. <div class="tools-header">
  3558. <h3>高级定制</h3>
  3559. </div>
  3560. <div class="advanced-tool-grid">
  3561. <div class="advanced-tool-card" onclick="openAdvancedEmbroidery()">
  3562. <span class="tool-icon">🧵</span>
  3563. <div class="tool-content">
  3564. <div class="tool-title">刺绣编辑器</div>
  3565. <div class="tool-desc">支持按部位精确定位</div>
  3566. </div>
  3567. </div>
  3568. <div class="advanced-tool-card" onclick="openTextureSystem()">
  3569. <span class="tool-icon">🎨</span>
  3570. <div class="tool-content">
  3571. <div class="tool-title">贴图系统</div>
  3572. <div class="tool-desc">可指定应用区域</div>
  3573. </div>
  3574. </div>
  3575. <div class="advanced-tool-card" onclick="openPatternLibrary()">
  3576. <span class="tool-icon">✨</span>
  3577. <div class="tool-content">
  3578. <div class="tool-title">图案库</div>
  3579. <div class="tool-desc">海量设计素材</div>
  3580. </div>
  3581. </div>
  3582. <div class="advanced-tool-card" onclick="openAIDesigner()">
  3583. <span class="tool-icon">🤖</span>
  3584. <div class="tool-content">
  3585. <div class="tool-title">AI设计师</div>
  3586. <div class="tool-desc">智能配色建议</div>
  3587. </div>
  3588. </div>
  3589. </div>
  3590. </div>
  3591. </main>
  3592. </div>
  3593. <!-- 3D试衣间页面 -->
  3594. <div id="ar-page" class="page" style="display: none;">
  3595. <header class="header">
  3596. <div class="header-content">
  3597. <h1>3D试衣间</h1>
  3598. <p>智能试穿,完美贴合</p>
  3599. </div>
  3600. </header>
  3601. <main class="main-content">
  3602. <!-- 核心流程导航 -->
  3603. <div class="fitting-flow-nav">
  3604. <div class="flow-step active" data-step="upload">
  3605. <div class="step-icon">📷</div>
  3606. <div class="step-text">照片上传</div>
  3607. </div>
  3608. <div class="flow-step" data-step="clothing">
  3609. <div class="step-icon">👕</div>
  3610. <div class="step-text">服装选择</div>
  3611. </div>
  3612. <div class="flow-step" data-step="fitting">
  3613. <div class="step-icon">✨</div>
  3614. <div class="step-text">试衣展示</div>
  3615. </div>
  3616. </div>
  3617. <!-- 步骤1: 照片上传入口 -->
  3618. <div class="fitting-step" id="upload-step">
  3619. <div class="step-container">
  3620. <h3 class="step-title">📷 照片上传入口</h3>
  3621. <!-- 上传方式选择 -->
  3622. <div class="upload-methods">
  3623. <div class="upload-method active" data-method="camera" onclick="selectUploadMethod('camera')">
  3624. <div class="method-icon">📹</div>
  3625. <div class="method-title">拍照模式</div>
  3626. <div class="method-desc">实时摄像头拍摄</div>
  3627. </div>
  3628. <div class="upload-method" data-method="gallery" onclick="selectUploadMethod('gallery')">
  3629. <div class="method-icon">🖼️</div>
  3630. <div class="method-title">相册选择</div>
  3631. <div class="method-desc">支持裁剪调整</div>
  3632. </div>
  3633. </div>
  3634. <!-- 拍照模式界面 -->
  3635. <div class="camera-interface" id="camera-mode">
  3636. <div class="camera-preview">
  3637. <div class="camera-placeholder">
  3638. <div class="camera-icon">📷</div>
  3639. <div class="camera-text">点击启动摄像头</div>
  3640. <div class="camera-hint">请确保良好的光线条件</div>
  3641. </div>
  3642. <!-- 姿势引导框 -->
  3643. <div class="pose-guide">
  3644. <div class="guide-silhouette">🧑‍🦱</div>
  3645. <div class="guide-text">请保持正面站立姿势</div>
  3646. </div>
  3647. </div>
  3648. <div class="camera-controls">
  3649. <button class="camera-btn" onclick="startCamera()">启动摄像头</button>
  3650. <button class="camera-btn capture" onclick="capturePhoto()">拍摄照片</button>
  3651. <button class="camera-btn switch" onclick="switchCamera()">切换摄像头</button>
  3652. </div>
  3653. </div>
  3654. <!-- 相册选择界面 -->
  3655. <div class="gallery-interface" id="gallery-mode" style="display: none;">
  3656. <div class="gallery-upload">
  3657. <input type="file" id="photo-upload" accept="image/*" style="display: none;" onchange="handlePhotoUpload(this)">
  3658. <div class="upload-zone" onclick="document.getElementById('photo-upload').click()">
  3659. <div class="upload-icon">📁</div>
  3660. <div class="upload-text">选择照片</div>
  3661. <div class="upload-hint">支持JPG、PNG格式</div>
  3662. </div>
  3663. </div>
  3664. <!-- 图片裁剪区域 -->
  3665. <div class="crop-area" id="crop-area" style="display: none;">
  3666. <div class="crop-container">
  3667. <canvas id="crop-canvas"></canvas>
  3668. <div class="crop-overlay"></div>
  3669. </div>
  3670. <div class="crop-controls">
  3671. <button class="crop-btn" onclick="resetCrop()">重置</button>
  3672. <button class="crop-btn confirm" onclick="confirmCrop()">确认裁剪</button>
  3673. </div>
  3674. </div>
  3675. </div>
  3676. <!-- 姿势校准系统 -->
  3677. <div class="pose-calibration" id="pose-calibration" style="display: none;">
  3678. <h4>🎯 姿势校准</h4>
  3679. <div class="calibration-display">
  3680. <div class="body-keypoints">
  3681. <div class="keypoint head" data-point="head">头部</div>
  3682. <div class="keypoint shoulder-left" data-point="shoulder-left">左肩</div>
  3683. <div class="keypoint shoulder-right" data-point="shoulder-right">右肩</div>
  3684. <div class="keypoint waist" data-point="waist">腰部</div>
  3685. <div class="keypoint hip" data-point="hip">臀部</div>
  3686. </div>
  3687. <div class="calibration-status">
  3688. <div class="status-item">
  3689. <span class="status-icon">✅</span>
  3690. <span>人体识别成功</span>
  3691. </div>
  3692. <div class="status-item">
  3693. <span class="status-icon">✅</span>
  3694. <span>关键点定位完成</span>
  3695. </div>
  3696. <div class="status-item">
  3697. <span class="status-icon">⏳</span>
  3698. <span>身形分析中...</span>
  3699. </div>
  3700. </div>
  3701. </div>
  3702. <div class="calibration-actions">
  3703. <button class="calib-btn" onclick="recalibrate()">重新校准</button>
  3704. <button class="calib-btn next" onclick="nextStep('clothing')">下一步:选择服装</button>
  3705. </div>
  3706. </div>
  3707. </div>
  3708. </div>
  3709. <!-- 步骤2: 服装选择器 -->
  3710. <div class="fitting-step" id="clothing-step" style="display: none;">
  3711. <div class="step-container">
  3712. <h3 class="step-title">👕 服装选择器</h3>
  3713. <!-- 服装分类标签 -->
  3714. <div class="clothing-tabs">
  3715. <div class="clothing-tab active" data-tab="my-designs" onclick="switchClothingTab('my-designs')">
  3716. <span class="tab-icon">🎨</span>
  3717. <span class="tab-text">我的设计</span>
  3718. <span class="tab-count">12</span>
  3719. </div>
  3720. <div class="clothing-tab" data-tab="community" onclick="switchClothingTab('community')">
  3721. <span class="tab-icon">🔥</span>
  3722. <span class="tab-text">社区热门</span>
  3723. <span class="tab-count">156</span>
  3724. </div>
  3725. <div class="clothing-tab" data-tab="brands" onclick="switchClothingTab('brands')">
  3726. <span class="tab-icon">🏷️</span>
  3727. <span class="tab-text">品牌合作</span>
  3728. <span class="tab-count">89</span>
  3729. </div>
  3730. </div>
  3731. <!-- 我的设计列表 -->
  3732. <div class="clothing-content" id="my-designs-content">
  3733. <div class="design-grid">
  3734. <div class="design-item" onclick="selectClothing('my-design-1')">
  3735. <div class="design-preview">
  3736. <img src="切片图/切片图/宝蓝色/宝蓝色.png" alt="我的设计1" class="design-image">
  3737. <div class="design-overlay">
  3738. <div class="preview-btn">预览效果</div>
  3739. </div>
  3740. </div>
  3741. <div class="design-info">
  3742. <div class="design-name">经典商务款</div>
  3743. <div class="design-meta">创建于 2024-01-15</div>
  3744. </div>
  3745. </div>
  3746. <div class="design-item" onclick="selectClothing('my-design-2')">
  3747. <div class="design-preview">
  3748. <img src="切片图/切片图/靓丽黄/靓丽黄.png" alt="我的设计2" class="design-image">
  3749. <div class="design-overlay">
  3750. <div class="preview-btn">预览效果</div>
  3751. </div>
  3752. </div>
  3753. <div class="design-info">
  3754. <div class="design-name">活力运动款</div>
  3755. <div class="design-meta">创建于 2024-01-12</div>
  3756. </div>
  3757. </div>
  3758. <div class="design-item" onclick="selectClothing('my-design-3')">
  3759. <div class="design-preview">
  3760. <img src="切片图/切片图/蒂芙尼蓝/蒂芙尼蓝.png" alt="我的设计3" class="design-image">
  3761. <div class="design-overlay">
  3762. <div class="preview-btn">预览效果</div>
  3763. </div>
  3764. </div>
  3765. <div class="design-info">
  3766. <div class="design-name">优雅晚装</div>
  3767. <div class="design-meta">创建于 2024-01-10</div>
  3768. </div>
  3769. </div>
  3770. </div>
  3771. </div>
  3772. <!-- 社区热门列表 -->
  3773. <div class="clothing-content" id="community-content" style="display: none;">
  3774. <div class="trending-filter">
  3775. <select class="filter-select">
  3776. <option>今日热门</option>
  3777. <option>本周热门</option>
  3778. <option>本月热门</option>
  3779. </select>
  3780. </div>
  3781. <div class="trending-grid">
  3782. <div class="trending-item" onclick="selectClothing('trending-1')">
  3783. <div class="trending-preview">
  3784. <img src="切片图/切片图/深紫色/深紫色.png" alt="热门设计1" class="trending-image">
  3785. <div class="trending-stats">
  3786. <span class="stat">❤️ 2.3k</span>
  3787. <span class="stat">💬 156</span>
  3788. </div>
  3789. </div>
  3790. <div class="trending-info">
  3791. <div class="trending-name">神秘紫韵</div>
  3792. <div class="trending-author">by 设计师Anna</div>
  3793. </div>
  3794. </div>
  3795. <div class="trending-item" onclick="selectClothing('trending-2')">
  3796. <div class="trending-preview">
  3797. <img src="切片图/切片图/萌萌绿/萌萌绿.png" alt="热门设计2" class="trending-image">
  3798. <div class="trending-stats">
  3799. <span class="stat">❤️ 1.8k</span>
  3800. <span class="stat">💬 89</span>
  3801. </div>
  3802. </div>
  3803. <div class="trending-info">
  3804. <div class="trending-name">春日萌动</div>
  3805. <div class="trending-author">by 创意大师Leo</div>
  3806. </div>
  3807. </div>
  3808. </div>
  3809. </div>
  3810. <!-- 品牌合作列表 -->
  3811. <div class="clothing-content" id="brands-content" style="display: none;">
  3812. <div class="brand-collection">
  3813. <div class="brand-header">
  3814. <div class="brand-logo">🏷️</div>
  3815. <div class="brand-info">
  3816. <div class="brand-name">时尚前线</div>
  3817. <div class="brand-desc">2024春季新品系列</div>
  3818. </div>
  3819. </div>
  3820. <div class="brand-grid">
  3821. <div class="brand-item" onclick="selectClothing('brand-1')">
  3822. <div class="brand-preview">
  3823. <img src="切片图/切片图/真朱/真朱.png" alt="品牌设计1" class="brand-image">
  3824. <div class="brand-tag">限量款</div>
  3825. </div>
  3826. <div class="brand-item-info">
  3827. <div class="item-name">经典红韵</div>
  3828. <div class="item-price">¥899</div>
  3829. </div>
  3830. </div>
  3831. <div class="brand-item" onclick="selectClothing('brand-2')">
  3832. <div class="brand-preview">
  3833. <img src="切片图/切片图/睿智金/睿智金.png" alt="品牌设计2" class="brand-image">
  3834. <div class="brand-tag">新品</div>
  3835. </div>
  3836. <div class="brand-item-info">
  3837. <div class="item-name">智慧金辉</div>
  3838. <div class="item-price">¥1299</div>
  3839. </div>
  3840. </div>
  3841. </div>
  3842. </div>
  3843. </div>
  3844. <div class="clothing-actions">
  3845. <button class="clothing-btn back" onclick="previousStep('upload')">上一步</button>
  3846. <button class="clothing-btn next" onclick="nextStep('fitting')">开始试穿</button>
  3847. </div>
  3848. </div>
  3849. </div>
  3850. <!-- 步骤3: 试衣展示系统 -->
  3851. <div class="fitting-step" id="fitting-step" style="display: none;">
  3852. <div class="step-container">
  3853. <h3 class="step-title">✨ 试衣展示系统</h3>
  3854. <!-- 试穿预览区域 -->
  3855. <div class="fitting-display">
  3856. <div class="fitting-viewport">
  3857. <div class="user-photo-layer">
  3858. <div class="photo-placeholder">用户照片将显示在这里</div>
  3859. </div>
  3860. <div class="clothing-layer">
  3861. <div class="clothing-placeholder">选中的服装将叠加在这里</div>
  3862. </div>
  3863. <!-- 智能贴合引擎指示器 -->
  3864. <div class="fitting-indicators">
  3865. <div class="fit-indicator active" data-status="processing">
  3866. <span class="indicator-icon">🔄</span>
  3867. <span class="indicator-text">布料物理模拟</span>
  3868. </div>
  3869. <div class="fit-indicator" data-status="completed">
  3870. <span class="indicator-icon">✅</span>
  3871. <span class="indicator-text">身形适配完成</span>
  3872. </div>
  3873. </div>
  3874. </div>
  3875. </div>
  3876. <!-- 交互控制面板 -->
  3877. <div class="interaction-panel">
  3878. <h4>🎮 交互控制面板</h4>
  3879. <div class="control-sections">
  3880. <!-- 旋转查看 -->
  3881. <div class="control-section">
  3882. <div class="section-title">旋转查看</div>
  3883. <div class="rotation-controls">
  3884. <button class="rotation-btn" onclick="rotateFitting('left')">⬅️ 左转</button>
  3885. <button class="rotation-btn" onclick="rotateFitting('reset')">🎯 正面</button>
  3886. <button class="rotation-btn" onclick="rotateFitting('right')">右转 ➡️</button>
  3887. </div>
  3888. <div class="gesture-hint">💡 支持手势滑动控制</div>
  3889. </div>
  3890. <!-- 光照调节 -->
  3891. <div class="control-section">
  3892. <div class="section-title">光照调节</div>
  3893. <div class="lighting-controls">
  3894. <button class="lighting-btn active" onclick="setFittingLight('natural')">
  3895. <span class="light-icon">☀️</span>
  3896. <span>自然光</span>
  3897. </button>
  3898. <button class="lighting-btn" onclick="setFittingLight('indoor')">
  3899. <span class="light-icon">💡</span>
  3900. <span>室内光</span>
  3901. </button>
  3902. <button class="lighting-btn" onclick="setFittingLight('studio')">
  3903. <span class="light-icon">🎬</span>
  3904. <span>摄影光</span>
  3905. </button>
  3906. </div>
  3907. </div>
  3908. <!-- 对比模式 -->
  3909. <div class="control-section">
  3910. <div class="section-title">对比模式</div>
  3911. <div class="compare-controls">
  3912. <button class="compare-btn active" onclick="toggleCompare('split')">
  3913. <span class="compare-icon">⚖️</span>
  3914. <span>左右对比</span>
  3915. </button>
  3916. <button class="compare-btn" onclick="toggleCompare('overlay')">
  3917. <span class="compare-icon">🔄</span>
  3918. <span>叠加对比</span>
  3919. </button>
  3920. </div>
  3921. </div>
  3922. </div>
  3923. </div>
  3924. <!-- 输出功能 -->
  3925. <div class="output-panel">
  3926. <h4>💾 输出功能</h4>
  3927. <div class="output-actions">
  3928. <button class="output-btn save" onclick="saveImageCard()">
  3929. <span class="output-icon">💳</span>
  3930. <div class="output-text">
  3931. <div class="output-title">保存形象卡</div>
  3932. <div class="output-desc">含服装信息和试穿效果</div>
  3933. </div>
  3934. </button>
  3935. <button class="output-btn share" onclick="shareToCommunity()">
  3936. <span class="output-icon">🌐</span>
  3937. <div class="output-text">
  3938. <div class="output-title">分享到社区</div>
  3939. <div class="output-desc">让好友看到你的搭配</div>
  3940. </div>
  3941. </button>
  3942. <button class="output-btn purchase" onclick="buyNow()">
  3943. <span class="output-icon">🛒</span>
  3944. <div class="output-text">
  3945. <div class="output-title">一键购买</div>
  3946. <div class="output-desc">立即下单同款服装</div>
  3947. </div>
  3948. </button>
  3949. </div>
  3950. </div>
  3951. <div class="fitting-actions">
  3952. <button class="fitting-btn back" onclick="previousStep('clothing')">重新选择</button>
  3953. <button class="fitting-btn retry" onclick="retryFitting()">重新试穿</button>
  3954. </div>
  3955. </div>
  3956. </div>
  3957. </main>
  3958. </div>
  3959. <!-- 社区页面 -->
  3960. <div id="community-page" class="page community-page">
  3961. <div class="community-header">
  3962. <div class="community-header-top">
  3963. <h1>设计社区</h1>
  3964. <!-- 新增:社区页面发布按钮 -->
  3965. <button class="publish-btn" onclick="openUploadModal()">
  3966. <span class="publish-icon">📝</span>
  3967. 发布作品
  3968. </button>
  3969. </div>
  3970. <p>与全球设计师交流创意</p>
  3971. <div class="community-stats">
  3972. <div class="stat-item">
  3973. <div class="stat-number">12.8k</div>
  3974. <div class="stat-label">活跃用户</div>
  3975. </div>
  3976. <div class="stat-item">
  3977. <div class="stat-number">3.2k</div>
  3978. <div class="stat-label">今日作品</div>
  3979. </div>
  3980. <div class="stat-item">
  3981. <div class="stat-number">156</div>
  3982. <div class="stat-label">在线设计师</div>
  3983. </div>
  3984. </div>
  3985. </div>
  3986. <main class="main-content">
  3987. <div style="margin: 20px;">
  3988. <!-- 热门话题 -->
  3989. <div style="background: white; border-radius: 15px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
  3990. <h4 style="margin-bottom: 15px; font-size: 16px;">🔥 热门话题</h4>
  3991. <div style="display: flex; flex-wrap: wrap; gap: 8px;">
  3992. <span style="background: #ff6b6b; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#春季时尚</span>
  3993. <span style="background: #4ecdc4; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#环保设计</span>
  3994. <span style="background: #45b7d1; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#极简主义</span>
  3995. <span style="background: #96ceb4; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#复古回潮</span>
  3996. </div>
  3997. </div>
  3998. <!-- 设计师排行榜 -->
  3999. <div style="background: white; border-radius: 15px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
  4000. <h4 style="margin-bottom: 15px; font-size: 16px;">🏆 本周设计师排行</h4>
  4001. <div style="display: flex; flex-direction: column; gap: 12px;">
  4002. <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
  4003. <div style="display: flex; align-items: center; gap: 12px;">
  4004. <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #ff6b6b, #ffa726); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">1</div>
  4005. <div>
  4006. <div style="font-weight: 600; font-size: 14px;">设计大师Alex</div>
  4007. <div style="font-size: 12px; color: #666;">点赞数: 8.9k</div>
  4008. </div>
  4009. </div>
  4010. <div style="font-size: 20px;">👑</div>
  4011. </div>
  4012. <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
  4013. <div style="display: flex; align-items: center; gap: 12px;">
  4014. <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #4ecdc4, #44a08d); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">2</div>
  4015. <div>
  4016. <div style="font-weight: 600; font-size: 14px;">时尚达人Lisa</div>
  4017. <div style="font-size: 12px; color: #666;">点赞数: 7.2k</div>
  4018. </div>
  4019. </div>
  4020. <div style="font-size: 20px;">🥈</div>
  4021. </div>
  4022. <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
  4023. <div style="display: flex; align-items: center; gap: 12px;">
  4024. <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">3</div>
  4025. <div>
  4026. <div style="font-weight: 600; font-size: 14px;">创意师Mike</div>
  4027. <div style="font-size: 12px; color: #666;">点赞数: 5.8k</div>
  4028. </div>
  4029. </div>
  4030. <div style="font-size: 20px;">🥉</div>
  4031. </div>
  4032. </div>
  4033. </div>
  4034. <!-- 最新作品 -->
  4035. <div style="background: white; border-radius: 15px; padding: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
  4036. <h4 style="margin-bottom: 15px; font-size: 16px;">✨ 最新作品</h4>
  4037. <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;">
  4038. <div style="background: linear-gradient(45deg, #a8edea 0%, #fed6e3 100%); border-radius: 12px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; transition: all 0.3s ease;" onclick="likeWork(this)">🌸</div>
  4039. <div style="background: linear-gradient(45deg, #667eea 0%, #764ba2 100%); border-radius: 12px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; transition: all 0.3s ease;" onclick="likeWork(this)">⚡</div>
  4040. </div>
  4041. </div>
  4042. </div>
  4043. </main>
  4044. </div>
  4045. <!-- 个人中心页面 -->
  4046. <div id="profile-page" class="page profile-page">
  4047. <div class="profile-header">
  4048. <div class="avatar">👤</div>
  4049. <h2>时尚设计师</h2>
  4050. <p>让创意成为生活的一部分</p>
  4051. </div>
  4052. <div class="profile-menu">
  4053. <div class="menu-item" onclick="showDrafts()">
  4054. <div class="menu-left">
  4055. <span class="menu-icon">🎨</span>
  4056. <span>我的设计稿</span>
  4057. </div>
  4058. <span>></span>
  4059. </div>
  4060. <div class="menu-item" onclick="showMyWorks()">
  4061. <div class="menu-left">
  4062. <span class="menu-icon">📋</span>
  4063. <span>我的作品</span>
  4064. </div>
  4065. <span>></span>
  4066. </div>
  4067. <div class="menu-item" onclick="showTryOnHistory()">
  4068. <div class="menu-left">
  4069. <span class="menu-icon">👕</span>
  4070. <span>试穿历史</span>
  4071. </div>
  4072. <span>></span>
  4073. </div>
  4074. <div class="menu-item" onclick="showOrders()">
  4075. <div class="menu-left">
  4076. <span class="menu-icon">📦</span>
  4077. <span>订单管理</span>
  4078. </div>
  4079. <span>></span>
  4080. </div>
  4081. <div class="menu-item" onclick="showCollections()">
  4082. <div class="menu-left">
  4083. <span class="menu-icon">❤️</span>
  4084. <span>收藏夹</span>
  4085. </div>
  4086. <span>></span>
  4087. </div>
  4088. <div class="menu-item" onclick="showFollowers()">
  4089. <div class="menu-left">
  4090. <span class="menu-icon">👥</span>
  4091. <span>粉丝管理</span>
  4092. </div>
  4093. <span>></span>
  4094. </div>
  4095. <div class="menu-item" onclick="showSettings()">
  4096. <div class="menu-left">
  4097. <span class="menu-icon">⚙️</span>
  4098. <span>设置</span>
  4099. </div>
  4100. <span>></span>
  4101. </div>
  4102. </div>
  4103. </div>
  4104. <!-- 底部导航 -->
  4105. <nav class="bottom-nav">
  4106. <div class="nav-item active" data-page="home">
  4107. <div class="nav-icon">🏠</div>
  4108. <div class="nav-text">首页</div>
  4109. </div>
  4110. <div class="nav-item" data-page="design">
  4111. <div class="nav-icon">🎨</div>
  4112. <div class="nav-text">设计</div>
  4113. </div>
  4114. <div class="nav-item" data-page="ar">
  4115. <div class="nav-icon">📱</div>
  4116. <div class="nav-text">试衣</div>
  4117. </div>
  4118. <div class="nav-item" data-page="community">
  4119. <div class="nav-icon">👥</div>
  4120. <div class="nav-text">社区</div>
  4121. </div>
  4122. <div class="nav-item" data-page="profile">
  4123. <div class="nav-icon">👤</div>
  4124. <div class="nav-text">我的</div>
  4125. </div>
  4126. </nav>
  4127. <!-- AI对话悬浮球 -->
  4128. <div id="aiFloatingBall" class="ai-floating-ball">
  4129. <div class="floating-ball-icon">🤖</div>
  4130. <div class="breathing-ring"></div>
  4131. </div>
  4132. <!-- AI全屏对话界面 -->
  4133. <div id="aiChatModal" class="ai-chat-modal" style="display: none;">
  4134. <div class="ai-chat-container">
  4135. <!-- 对话头部 -->
  4136. <div class="ai-chat-header">
  4137. <div class="ai-chat-avatar">
  4138. <span class="avatar-icon">🤖</span>
  4139. <div class="avatar-status"></div>
  4140. </div>
  4141. <div class="ai-chat-info">
  4142. <h3>AI时尚顾问</h3>
  4143. <p id="aiChatSubtitle">智能搭配助手在线中...</p>
  4144. </div>
  4145. <button class="ai-chat-close" onclick="closeAIChat()">✕</button>
  4146. </div>
  4147. <!-- 对话消息区 -->
  4148. <div class="ai-chat-messages" id="aiChatMessages">
  4149. <div class="ai-message">
  4150. <div class="message-avatar">🤖</div>
  4151. <div class="message-content">
  4152. <div class="message-text">
  4153. 你好!我是你的专属AI时尚顾问✨<br>
  4154. 我可以帮你进行服装搭配、配色建议、风格分析等。<br>
  4155. 有什么可以帮助你的吗?
  4156. </div>
  4157. <div class="message-time">刚刚</div>
  4158. </div>
  4159. </div>
  4160. </div>
  4161. <!-- 快捷指令 -->
  4162. <div class="ai-quick-commands" id="aiQuickCommands">
  4163. <div class="quick-command" onclick="sendQuickCommand('帮我搭配一套商务装')">
  4164. <span class="command-icon">👔</span>
  4165. <span>商务装搭配</span>
  4166. </div>
  4167. <div class="quick-command" onclick="sendQuickCommand('推荐春季流行色')">
  4168. <span class="command-icon">🌸</span>
  4169. <span>春季流行色</span>
  4170. </div>
  4171. <div class="quick-command" onclick="sendQuickCommand('分析我的穿衣风格')">
  4172. <span class="command-icon">✨</span>
  4173. <span>风格分析</span>
  4174. </div>
  4175. <div class="quick-command" onclick="sendQuickCommand('约会穿什么好看')">
  4176. <span class="command-icon">💕</span>
  4177. <span>约会搭配</span>
  4178. </div>
  4179. </div>
  4180. <!-- 输入工具栏 -->
  4181. <div class="ai-chat-input-area">
  4182. <div class="input-toolbar">
  4183. <button class="input-tool" onclick="startVoiceInput()" title="语音输入">
  4184. <span class="tool-icon">🎤</span>
  4185. </button>
  4186. <button class="input-tool" onclick="uploadImage()" title="图片识别">
  4187. <span class="tool-icon">📷</span>
  4188. </button>
  4189. <button class="input-tool" onclick="showEmoji()" title="表情">
  4190. <span class="tool-icon">😊</span>
  4191. </button>
  4192. </div>
  4193. <div class="input-container">
  4194. <input
  4195. type="text"
  4196. id="aiChatInput"
  4197. placeholder="说说你的搭配需求..."
  4198. onkeypress="handleChatInputKeypress(event)"
  4199. >
  4200. <button class="send-button" onclick="sendMessage()">
  4201. <span class="send-icon">➤</span>
  4202. </button>
  4203. </div>
  4204. </div>
  4205. </div>
  4206. </div>
  4207. <!-- AI推荐结果页面 -->
  4208. <div id="aiRecommendationModal" class="ai-recommendation-modal" style="display: none;">
  4209. <div class="recommendation-container">
  4210. <div class="recommendation-header">
  4211. <h2>🎯 专属推荐方案</h2>
  4212. <button class="close-recommendation" onclick="closeRecommendation()">✕</button>
  4213. </div>
  4214. <div class="recommendation-content">
  4215. <!-- 3D穿搭展示 -->
  4216. <div class="recommendation-3d-section">
  4217. <div class="recommendation-3d-viewer">
  4218. <div class="model-3d-container">
  4219. <div class="model-3d-display">👤</div>
  4220. <div class="model-controls">
  4221. <button class="model-control" onclick="rotateModel('left')">↶</button>
  4222. <button class="model-control" onclick="rotateModel('right')">↷</button>
  4223. <button class="model-control" onclick="resetModel()">⌂</button>
  4224. </div>
  4225. </div>
  4226. </div>
  4227. <!-- 方案选择器 -->
  4228. <div class="scheme-selector">
  4229. <h4>推荐方案</h4>
  4230. <div class="scheme-tabs">
  4231. <div class="scheme-tab active" onclick="selectScheme('scheme1')">方案1</div>
  4232. <div class="scheme-tab" onclick="selectScheme('scheme2')">方案2</div>
  4233. <div class="scheme-tab" onclick="selectScheme('scheme3')">方案3</div>
  4234. </div>
  4235. </div>
  4236. </div>
  4237. <!-- 配色原理说明 -->
  4238. <div class="color-theory-section">
  4239. <h4>🎨 配色原理解析</h4>
  4240. <div class="theory-content" id="colorTheoryContent">
  4241. <div class="theory-card">
  4242. <div class="theory-icon">🎯</div>
  4243. <div class="theory-text">
  4244. <h5>主色调选择</h5>
  4245. <p>基于您的肤色和喜好,选择了温暖的蓝色作为主色调,既显稳重又不失活力。</p>
  4246. </div>
  4247. </div>
  4248. <div class="theory-card">
  4249. <div class="theory-icon">🌈</div>
  4250. <div class="theory-text">
  4251. <h5>色彩搭配</h5>
  4252. <p>采用邻近色搭配法,蓝色与紫色的组合营造出和谐优雅的视觉效果。</p>
  4253. </div>
  4254. </div>
  4255. <div class="theory-card">
  4256. <div class="theory-icon">✨</div>
  4257. <div class="theory-text">
  4258. <h5>层次感营造</h5>
  4259. <p>通过深浅不同的蓝色系形成层次,增加整体造型的丰富度和立体感。</p>
  4260. </div>
  4261. </div>
  4262. </div>
  4263. </div>
  4264. <!-- 操作按钮 -->
  4265. <div class="recommendation-actions">
  4266. <button class="action-btn secondary" onclick="shareRecommendation()">
  4267. <span class="btn-icon">📤</span>
  4268. <span>分享方案</span>
  4269. </button>
  4270. <button class="action-btn secondary" onclick="saveRecommendation()">
  4271. <span class="btn-icon">💾</span>
  4272. <span>收藏方案</span>
  4273. </button>
  4274. <button class="action-btn primary" onclick="importToDesignCenter()">
  4275. <span class="btn-icon">🎨</span>
  4276. <span>导入设计中心</span>
  4277. </button>
  4278. </div>
  4279. </div>
  4280. </div>
  4281. </div>
  4282. <!-- 模态框 -->
  4283. <div id="modal" class="modal">
  4284. <div class="modal-content">
  4285. <h3 id="modalTitle">开始设计</h3>
  4286. <p id="modalText">选择你想要设计的服装类型</p>
  4287. <div class="modal-actions">
  4288. <button class="btn btn-secondary" onclick="closeModal()">取消</button>
  4289. <button class="btn btn-primary" onclick="startDesign()">开始</button>
  4290. </div>
  4291. </div>
  4292. </div>
  4293. <!-- 设置模态框 -->
  4294. <div id="settingsModal" class="settings-modal">
  4295. <div class="settings-modal-content">
  4296. <div class="settings-header">
  4297. <h2>设置</h2>
  4298. <button class="close-btn" onclick="closeSettingsModal()">×</button>
  4299. </div>
  4300. <div class="settings-body">
  4301. <!-- 个人资料部分 -->
  4302. <div class="settings-section">
  4303. <h3>个人资料</h3>
  4304. <div class="profile-info">
  4305. <div class="profile-avatar">
  4306. <div class="avatar-circle" onclick="changeAvatar()">
  4307. <img id="userAvatar" src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='30' fill='%23ff6b6b'/><circle cx='30' cy='22' r='8' fill='white'/><ellipse cx='30' cy='45' rx='15' ry='10' fill='white'/></svg>" alt="头像">
  4308. <div class="avatar-edit">📷</div>
  4309. </div>
  4310. </div>
  4311. <div class="profile-details">
  4312. <div class="form-group">
  4313. <label for="userName">用户名</label>
  4314. <input type="text" id="userName" value="时尚设计师" placeholder="输入您的用户名">
  4315. </div>
  4316. <div class="form-group">
  4317. <label for="userBio">个人简介</label>
  4318. <textarea id="userBio" placeholder="介绍一下您自己...">热爱时尚设计,专注于创新与美学的完美结合</textarea>
  4319. </div>
  4320. <div class="form-group">
  4321. <label for="userLocation">所在地</label>
  4322. <input type="text" id="userLocation" value="上海" placeholder="您的所在城市">
  4323. </div>
  4324. </div>
  4325. </div>
  4326. </div>
  4327. <!-- 账户安全 -->
  4328. <div class="settings-section">
  4329. <h3>账户安全</h3>
  4330. <div class="security-items">
  4331. <div class="security-item" onclick="changePassword()">
  4332. <div class="security-left">
  4333. <span class="security-icon">🔒</span>
  4334. <div>
  4335. <div class="security-title">修改密码</div>
  4336. <div class="security-desc">定期更新密码保护账户安全</div>
  4337. </div>
  4338. </div>
  4339. <span class="arrow">></span>
  4340. </div>
  4341. <div class="security-item" onclick="bindPhone()">
  4342. <div class="security-left">
  4343. <span class="security-icon">📱</span>
  4344. <div>
  4345. <div class="security-title">手机号绑定</div>
  4346. <div class="security-desc">已绑定:138****8888</div>
  4347. </div>
  4348. </div>
  4349. <span class="arrow">></span>
  4350. </div>
  4351. <div class="security-item" onclick="bindEmail()">
  4352. <div class="security-left">
  4353. <span class="security-icon">📧</span>
  4354. <div>
  4355. <div class="security-title">邮箱绑定</div>
  4356. <div class="security-desc">user@example.com</div>
  4357. </div>
  4358. </div>
  4359. <span class="arrow">></span>
  4360. </div>
  4361. </div>
  4362. </div>
  4363. <!-- 隐私设置 -->
  4364. <div class="settings-section">
  4365. <h3>隐私设置</h3>
  4366. <div class="privacy-items">
  4367. <div class="privacy-item">
  4368. <div class="privacy-left">
  4369. <span class="privacy-icon">👁️</span>
  4370. <div>
  4371. <div class="privacy-title">作品可见性</div>
  4372. <div class="privacy-desc">设置谁可以查看您的作品</div>
  4373. </div>
  4374. </div>
  4375. <select class="privacy-select">
  4376. <option value="public">公开</option>
  4377. <option value="followers">仅粉丝</option>
  4378. <option value="private">私人</option>
  4379. </select>
  4380. </div>
  4381. <div class="privacy-item">
  4382. <div class="privacy-left">
  4383. <span class="privacy-icon">🔔</span>
  4384. <div>
  4385. <div class="privacy-title">消息通知</div>
  4386. <div class="privacy-desc">接收点赞、评论等通知</div>
  4387. </div>
  4388. </div>
  4389. <label class="switch">
  4390. <input type="checkbox" checked>
  4391. <span class="slider"></span>
  4392. </label>
  4393. </div>
  4394. <div class="privacy-item">
  4395. <div class="privacy-left">
  4396. <span class="privacy-icon">📊</span>
  4397. <div>
  4398. <div class="privacy-title">数据分析</div>
  4399. <div class="privacy-desc">允许匿名数据分析</div>
  4400. </div>
  4401. </div>
  4402. <label class="switch">
  4403. <input type="checkbox" checked>
  4404. <span class="slider"></span>
  4405. </label>
  4406. </div>
  4407. </div>
  4408. </div>
  4409. <!-- 应用设置 -->
  4410. <div class="settings-section">
  4411. <h3>应用设置</h3>
  4412. <div class="app-items">
  4413. <div class="app-item" onclick="showAbout()">
  4414. <div class="app-left">
  4415. <span class="app-icon">ℹ️</span>
  4416. <span class="app-title">关于应用</span>
  4417. </div>
  4418. <div class="app-right">
  4419. <span class="version">v1.0.0</span>
  4420. <span class="arrow">></span>
  4421. </div>
  4422. </div>
  4423. <div class="app-item" onclick="clearCache()">
  4424. <div class="app-left">
  4425. <span class="app-icon">🗑️</span>
  4426. <span class="app-title">清除缓存</span>
  4427. </div>
  4428. <div class="app-right">
  4429. <span class="cache-size">23.5MB</span>
  4430. <span class="arrow">></span>
  4431. </div>
  4432. </div>
  4433. <div class="app-item" onclick="feedback()">
  4434. <div class="app-left">
  4435. <span class="app-icon">💬</span>
  4436. <span class="app-title">意见反馈</span>
  4437. </div>
  4438. <span class="arrow">></span>
  4439. </div>
  4440. </div>
  4441. </div>
  4442. </div>
  4443. <div class="settings-footer">
  4444. <button class="save-btn" onclick="saveSettings()">保存设置</button>
  4445. <button class="logout-btn" onclick="confirmLogout()">退出登录</button>
  4446. </div>
  4447. </div>
  4448. </div>
  4449. <!-- 上传作品模态框 -->
  4450. <div id="uploadModal" class="upload-modal">
  4451. <div class="upload-modal-content">
  4452. <!-- 步骤指示器 -->
  4453. <div class="upload-steps">
  4454. <div class="step active">
  4455. <div class="step-number">1</div>
  4456. <div class="step-label">选择类型</div>
  4457. </div>
  4458. <div class="step">
  4459. <div class="step-number">2</div>
  4460. <div class="step-label">上传内容</div>
  4461. </div>
  4462. <div class="step">
  4463. <div class="step-number">3</div>
  4464. <div class="step-label">作品信息</div>
  4465. </div>
  4466. <div class="step">
  4467. <div class="step-number">4</div>
  4468. <div class="step-label">发布设置</div>
  4469. </div>
  4470. </div>
  4471. <!-- 步骤1: 选择作品类型 -->
  4472. <div class="upload-step active">
  4473. <h3>选择作品类型</h3>
  4474. <div class="work-types">
  4475. <div class="work-type" data-type="design" onclick="selectWorkType('design')">
  4476. <div class="type-icon">🎨</div>
  4477. <div class="type-name">设计稿</div>
  4478. <div class="type-desc">分享你的原创设计图稿</div>
  4479. </div>
  4480. <div class="work-type" data-type="photo" onclick="selectWorkType('photo')">
  4481. <div class="type-icon">📸</div>
  4482. <div class="type-name">实物照片</div>
  4483. <div class="type-desc">展示制作完成的服装作品</div>
  4484. </div>
  4485. <div class="work-type" data-type="video" onclick="selectWorkType('video')">
  4486. <div class="type-icon">🎬</div>
  4487. <div class="type-name">视频展示</div>
  4488. <div class="type-desc">动态展示服装效果</div>
  4489. </div>
  4490. <div class="work-type" data-type="3d" onclick="selectWorkType('3d')">
  4491. <div class="type-icon">🎭</div>
  4492. <div class="type-name">3D模型</div>
  4493. <div class="type-desc">上传3D服装模型文件</div>
  4494. </div>
  4495. </div>
  4496. </div>
  4497. <!-- 步骤2: 上传内容 -->
  4498. <div class="upload-step">
  4499. <h3>上传内容</h3>
  4500. <div class="upload-options">
  4501. <!-- 文件上传区域 -->
  4502. <div class="upload-section">
  4503. <h4>📁 上传文件</h4>
  4504. <div class="file-upload-area" onclick="triggerFileUpload()">
  4505. <div class="upload-placeholder">
  4506. <div class="upload-icon">📤</div>
  4507. <div class="upload-text">点击上传文件</div>
  4508. <div class="upload-hint">支持图片、视频格式,最多9个文件</div>
  4509. </div>
  4510. </div>
  4511. <input type="file" id="fileInput" multiple accept="image/*,video/*" style="display: none;" onchange="handleFileUpload(event)">
  4512. <div id="uploadPreview" class="upload-preview"></div>
  4513. </div>
  4514. <!-- 3D文件上传 -->
  4515. <div class="upload-section" id="3dUploadSection" style="display: none;">
  4516. <h4>🎭 上传3D模型</h4>
  4517. <div class="file-upload-area" onclick="trigger3DUpload()">
  4518. <div class="upload-placeholder">
  4519. <div class="upload-icon">🎯</div>
  4520. <div class="upload-text">上传3D模型文件</div>
  4521. <div class="upload-hint">支持 .obj, .fbx, .gltf 格式</div>
  4522. </div>
  4523. </div>
  4524. <input type="file" id="file3DInput" accept=".obj,.fbx,.gltf" style="display: none;" onchange="handle3DUpload(event)">
  4525. </div>
  4526. <!-- 从我的设计选择 -->
  4527. <div class="upload-section">
  4528. <h4>🎨 从我的设计选择</h4>
  4529. <div class="my-designs-grid">
  4530. <div class="design-item" onclick="selectFromMyDesigns(1)">
  4531. <div class="design-preview">👕</div>
  4532. <div class="design-name">春季T恤</div>
  4533. </div>
  4534. <div class="design-item" onclick="selectFromMyDesigns(2)">
  4535. <div class="design-preview">👗</div>
  4536. <div class="design-name">夏日连衣裙</div>
  4537. </div>
  4538. <div class="design-item" onclick="selectFromMyDesigns(3)">
  4539. <div class="design-preview">🧥</div>
  4540. <div class="design-name">秋季外套</div>
  4541. </div>
  4542. <div class="design-item" onclick="selectFromMyDesigns(4)">
  4543. <div class="design-preview">👖</div>
  4544. <div class="design-name">休闲裤</div>
  4545. </div>
  4546. <div class="design-item" onclick="selectFromMyDesigns(5)">
  4547. <div class="design-preview">🧣</div>
  4548. <div class="design-name">围巾设计</div>
  4549. </div>
  4550. <div class="design-item" onclick="selectFromMyDesigns(6)">
  4551. <div class="design-preview">👒</div>
  4552. <div class="design-name">帽子系列</div>
  4553. </div>
  4554. </div>
  4555. </div>
  4556. </div>
  4557. </div>
  4558. <!-- 步骤3: 作品信息 -->
  4559. <div class="upload-step">
  4560. <h3>作品信息</h3>
  4561. <div class="description-form">
  4562. <div class="form-group">
  4563. <label for="workTitle">作品标题 *</label>
  4564. <input type="text" id="workTitle" placeholder="给你的作品起个好听的名字" maxlength="50">
  4565. <div class="char-count"><span id="titleCount">0</span>/50</div>
  4566. </div>
  4567. <div class="form-group">
  4568. <label for="workDescription">作品描述</label>
  4569. <textarea id="workDescription" placeholder="介绍一下你的设计理念和创作过程..." maxlength="500"></textarea>
  4570. <div class="char-count"><span id="descCount">0</span>/500</div>
  4571. </div>
  4572. <div class="form-group">
  4573. <label>选择分类</label>
  4574. <select>
  4575. <option value="">请选择分类</option>
  4576. <option value="casual">休闲装</option>
  4577. <option value="formal">正装</option>
  4578. <option value="sport">运动装</option>
  4579. <option value="evening">晚装</option>
  4580. <option value="accessories">配饰</option>
  4581. </select>
  4582. </div>
  4583. <div class="tags-container">
  4584. <label>添加标签</label>
  4585. <div class="popular-tags">
  4586. <span class="tag" onclick="toggleTag(this)">#时尚</span>
  4587. <span class="tag" onclick="toggleTag(this)">#原创</span>
  4588. <span class="tag" onclick="toggleTag(this)">#简约</span>
  4589. <span class="tag" onclick="toggleTag(this)">#复古</span>
  4590. <span class="tag" onclick="toggleTag(this)">#街头</span>
  4591. <span class="tag" onclick="toggleTag(this)">#优雅</span>
  4592. <span class="tag" onclick="toggleTag(this)">#运动</span>
  4593. <span class="tag" onclick="toggleTag(this)">#环保</span>
  4594. </div>
  4595. <input type="text" id="customTag" placeholder="输入自定义标签后按回车" onkeypress="addCustomTag(event)">
  4596. </div>
  4597. </div>
  4598. </div>
  4599. <!-- 步骤4: 发布设置 -->
  4600. <div class="upload-step">
  4601. <h3>发布设置</h3>
  4602. <div class="publish-settings">
  4603. <div class="setting-group">
  4604. <label>作品可见性</label>
  4605. <div class="radio-group">
  4606. <label class="radio-option">
  4607. <input type="radio" name="visibility" value="public" checked>
  4608. <div class="radio-custom"></div>
  4609. <div class="option-content">
  4610. <div class="option-title">公开</div>
  4611. <div class="option-desc">所有人都可以查看你的作品</div>
  4612. </div>
  4613. </label>
  4614. <label class="radio-option">
  4615. <input type="radio" name="visibility" value="followers">
  4616. <div class="radio-custom"></div>
  4617. <div class="option-content">
  4618. <div class="option-title">仅粉丝可见</div>
  4619. <div class="option-desc">只有关注你的用户可以查看</div>
  4620. </div>
  4621. </label>
  4622. <label class="radio-option">
  4623. <input type="radio" name="visibility" value="private">
  4624. <div class="radio-custom"></div>
  4625. <div class="option-content">
  4626. <div class="option-title">私密</div>
  4627. <div class="option-desc">只有你自己可以查看</div>
  4628. </div>
  4629. </label>
  4630. </div>
  4631. </div>
  4632. <div class="setting-group">
  4633. <label>下载权限</label>
  4634. <div class="radio-group">
  4635. <label class="radio-option">
  4636. <input type="radio" name="download" value="allow" checked>
  4637. <div class="radio-custom"></div>
  4638. <div class="option-content">
  4639. <div class="option-title">允许下载</div>
  4640. <div class="option-desc">其他用户可以下载你的作品</div>
  4641. </div>
  4642. </label>
  4643. <label class="radio-option">
  4644. <input type="radio" name="download" value="forbid">
  4645. <div class="radio-custom"></div>
  4646. <div class="option-content">
  4647. <div class="option-title">禁止下载</div>
  4648. <div class="option-desc">保护你的原创作品</div>
  4649. </div>
  4650. </label>
  4651. </div>
  4652. </div>
  4653. <div class="setting-group">
  4654. <label>其他设置</label>
  4655. <label class="checkbox-option">
  4656. <input type="checkbox" id="allowComments" checked>
  4657. <div class="checkbox-custom"></div>
  4658. <div class="option-content">
  4659. <div class="option-title">允许评论</div>
  4660. <div class="option-desc">其他用户可以对你的作品进行评论</div>
  4661. </div>
  4662. </label>
  4663. <label class="checkbox-option">
  4664. <input type="checkbox" id="copyrightAgree">
  4665. <div class="checkbox-custom"></div>
  4666. <div class="option-content">
  4667. <div class="option-title">版权声明 *</div>
  4668. <div class="option-desc">我确认拥有此作品的版权,并同意平台使用条款</div>
  4669. </div>
  4670. </label>
  4671. </div>
  4672. </div>
  4673. </div>
  4674. <!-- 模态框底部按钮 -->
  4675. <div class="upload-modal-footer">
  4676. <button class="btn btn-outline" onclick="closeUploadModal()">取消</button>
  4677. <button class="btn btn-outline" id="prevBtn" onclick="prevStep()" style="display: none;">上一步</button>
  4678. <button class="btn btn-primary" id="nextBtn" onclick="nextStep()">下一步</button>
  4679. <button class="btn btn-primary" id="publishBtn" onclick="publishWork()" style="display: none;">发布作品</button>
  4680. </div>
  4681. </div>
  4682. </div>
  4683. <!-- 草稿箱模态框 -->
  4684. <div id="draftsModal" class="upload-modal">
  4685. <div class="upload-modal-content drafts-content">
  4686. <div style="padding: 20px 30px; border-bottom: 1px solid #e9ecef;">
  4687. <h3>草稿箱</h3>
  4688. <p style="color: #666; font-size: 14px; margin-top: 5px;">管理你的草稿作品</p>
  4689. </div>
  4690. <div class="drafts-list">
  4691. <div class="draft-item">
  4692. <div class="draft-preview">👕</div>
  4693. <div class="draft-info">
  4694. <div class="draft-title">春季T恤设计</div>
  4695. <div class="draft-time">保存于 2024-03-15</div>
  4696. </div>
  4697. <div class="draft-actions">
  4698. <button onclick="editDraft(1)">编辑</button>
  4699. <button onclick="deleteDraft(1)">删除</button>
  4700. </div>
  4701. </div>
  4702. <div class="draft-item">
  4703. <div class="draft-preview">👗</div>
  4704. <div class="draft-info">
  4705. <div class="draft-title">夏日连衣裙</div>
  4706. <div class="draft-time">保存于 2024-03-14</div>
  4707. </div>
  4708. <div class="draft-actions">
  4709. <button onclick="editDraft(2)">编辑</button>
  4710. <button onclick="deleteDraft(2)">删除</button>
  4711. </div>
  4712. </div>
  4713. <div class="draft-item">
  4714. <div class="draft-preview">🧥</div>
  4715. <div class="draft-info">
  4716. <div class="draft-title">秋季外套概念</div>
  4717. <div class="draft-time">保存于 2024-03-12</div>
  4718. </div>
  4719. <div class="draft-actions">
  4720. <button onclick="editDraft(3)">编辑</button>
  4721. <button onclick="deleteDraft(3)">删除</button>
  4722. </div>
  4723. </div>
  4724. </div>
  4725. <div class="upload-modal-footer">
  4726. <button class="btn btn-outline" onclick="closeDraftsModal()">关闭</button>
  4727. <button class="btn btn-primary" onclick="openUploadModal(); closeDraftsModal();">新建作品</button>
  4728. </div>
  4729. </div>
  4730. </div>
  4731. <!-- 我的作品模态框 -->
  4732. <div id="myWorksModal" class="upload-modal">
  4733. <div class="upload-modal-content">
  4734. <div style="padding: 20px 30px; border-bottom: 1px solid #e9ecef;">
  4735. <h3>我的作品</h3>
  4736. <p style="color: #666; font-size: 14px; margin-top: 5px;">管理你发布的作品</p>
  4737. </div>
  4738. <!-- 标签页 -->
  4739. <div class="works-tabs">
  4740. <div class="tab active" onclick="switchWorksTab('published')">已发布</div>
  4741. <div class="tab" onclick="switchWorksTab('analytics')">数据分析</div>
  4742. </div>
  4743. <!-- 已发布作品 -->
  4744. <div id="publishedWorks" class="works-content">
  4745. <div class="work-item">
  4746. <div class="work-preview">🌸</div>
  4747. <div class="work-info">
  4748. <div class="work-title">春季花朵印花T恤</div>
  4749. <div class="work-stats">
  4750. <span>❤️ 1.2k</span>
  4751. <span>💬 89</span>
  4752. <span>👁️ 5.6k</span>
  4753. </div>
  4754. </div>
  4755. <div class="work-actions">
  4756. <button onclick="editWork(1)">编辑</button>
  4757. <button onclick="deleteWork(1)">删除</button>
  4758. </div>
  4759. </div>
  4760. <div class="work-item">
  4761. <div class="work-preview">⚡</div>
  4762. <div class="work-info">
  4763. <div class="work-title">未来科技风外套</div>
  4764. <div class="work-stats">
  4765. <span>❤️ 2.1k</span>
  4766. <span>💬 156</span>
  4767. <span>👁️ 8.9k</span>
  4768. </div>
  4769. </div>
  4770. <div class="work-actions">
  4771. <button onclick="editWork(2)">编辑</button>
  4772. <button onclick="deleteWork(2)">删除</button>
  4773. </div>
  4774. </div>
  4775. <div class="work-item">
  4776. <div class="work-preview">🌿</div>
  4777. <div class="work-info">
  4778. <div class="work-title">环保材质连衣裙</div>
  4779. <div class="work-stats">
  4780. <span>❤️ 856</span>
  4781. <span>💬 67</span>
  4782. <span>👁️ 3.2k</span>
  4783. </div>
  4784. </div>
  4785. <div class="work-actions">
  4786. <button onclick="editWork(3)">编辑</button>
  4787. <button onclick="deleteWork(3)">删除</button>
  4788. </div>
  4789. </div>
  4790. </div>
  4791. <!-- 数据分析 -->
  4792. <div id="analyticsWorks" class="works-content" style="display: none;">
  4793. <div class="analytics-summary">
  4794. <div class="analytics-item">
  4795. <div class="analytics-number">12</div>
  4796. <div class="analytics-label">总作品数</div>
  4797. </div>
  4798. <div class="analytics-item">
  4799. <div class="analytics-number">8.9k</div>
  4800. <div class="analytics-label">总点赞数</div>
  4801. </div>
  4802. <div class="analytics-item">
  4803. <div class="analytics-number">2.3k</div>
  4804. <div class="analytics-label">总浏览量</div>
  4805. </div>
  4806. </div>
  4807. <div style="padding: 20px; text-align: center; color: #666;">
  4808. <div style="font-size: 48px; margin-bottom: 15px;">📊</div>
  4809. <div>详细数据分析功能</div>
  4810. <div style="font-size: 14px; margin-top: 8px;">即将上线,敬请期待</div>
  4811. </div>
  4812. </div>
  4813. <div class="upload-modal-footer">
  4814. <button class="btn btn-outline" onclick="closeMyWorksModal()">关闭</button>
  4815. <button class="btn btn-outline" onclick="showDrafts(); closeMyWorksModal();">草稿箱</button>
  4816. <button class="btn btn-primary" onclick="openUploadModal(); closeMyWorksModal();">发布新作品</button>
  4817. </div>
  4818. </div>
  4819. </div>
  4820. </div>
  4821. <script>
  4822. // 全局变量
  4823. let currentSlide = 0;
  4824. let slideInterval;
  4825. let selectedColor = '#ff6b6b';
  4826. // 页面初始化
  4827. document.addEventListener('DOMContentLoaded', function() {
  4828. initBannerSlider();
  4829. initNavigation();
  4830. initInteractions();
  4831. });
  4832. // 轮播图功能
  4833. function initBannerSlider() {
  4834. const slider = document.getElementById('bannerSlider');
  4835. const indicators = document.querySelectorAll('.indicator');
  4836. const slides = document.querySelectorAll('.banner-slide');
  4837. // 自动播放
  4838. slideInterval = setInterval(nextSlide, 4000);
  4839. // 指示器点击事件
  4840. indicators.forEach((indicator, index) => {
  4841. indicator.addEventListener('click', () => {
  4842. goToSlide(index);
  4843. });
  4844. });
  4845. // 轮播图点击跳转事件
  4846. slides.forEach((slide, index) => {
  4847. slide.addEventListener('click', () => {
  4848. bannerClick(index);
  4849. });
  4850. });
  4851. // 鼠标悬停暂停
  4852. slider.addEventListener('mouseenter', () => {
  4853. clearInterval(slideInterval);
  4854. });
  4855. slider.addEventListener('mouseleave', () => {
  4856. slideInterval = setInterval(nextSlide, 4000);
  4857. });
  4858. }
  4859. function nextSlide() {
  4860. currentSlide = (currentSlide + 1) % 3;
  4861. updateSlider();
  4862. }
  4863. function goToSlide(index) {
  4864. currentSlide = index;
  4865. updateSlider();
  4866. }
  4867. function updateSlider() {
  4868. const slider = document.getElementById('bannerSlider');
  4869. const indicators = document.querySelectorAll('.indicator');
  4870. slider.style.transform = `translateX(-${currentSlide * 100}%)`;
  4871. indicators.forEach((indicator, index) => {
  4872. indicator.classList.toggle('active', index === currentSlide);
  4873. });
  4874. }
  4875. // 轮播图点击跳转功能
  4876. function bannerClick(index) {
  4877. // 根据轮播图索引跳转到不同页面
  4878. switch(index) {
  4879. case 0: // 春季新品发布
  4880. switchPage('design');
  4881. // 更新导航状态
  4882. updateNavigation('design');
  4883. showNotification('春季新品', '欢迎查看春季新品系列!');
  4884. break;
  4885. case 1: // AI智能搭配
  4886. showModal('AI智能搭配', '基于您的喜好,我们为您推荐了以下服装', '查看推荐', () => {
  4887. closeModal(); // 关闭模态框
  4888. switchPage('ar');
  4889. updateNavigation('ar');
  4890. });
  4891. break;
  4892. case 2: // 设计大赛进行中
  4893. showModal('设计大赛', '设计大赛正在进行中,立即参与!', '查看详情', () => {
  4894. closeModal(); // 关闭模态框
  4895. switchPage('community');
  4896. updateNavigation('community');
  4897. });
  4898. break;
  4899. default:
  4900. break;
  4901. }
  4902. }
  4903. // 更新导航状态的辅助函数
  4904. function updateNavigation(page) {
  4905. const navItems = document.querySelectorAll('.nav-item');
  4906. navItems.forEach(nav => nav.classList.remove('active'));
  4907. document.querySelector(`.nav-item[data-page="${page}"]`).classList.add('active');
  4908. }
  4909. // 导航功能
  4910. function initNavigation() {
  4911. const navItems = document.querySelectorAll('.nav-item');
  4912. navItems.forEach(item => {
  4913. item.addEventListener('click', () => {
  4914. const page = item.dataset.page;
  4915. switchPage(page);
  4916. // 更新导航状态
  4917. navItems.forEach(nav => nav.classList.remove('active'));
  4918. item.classList.add('active');
  4919. });
  4920. });
  4921. }
  4922. function switchPage(pageId) {
  4923. const pages = document.querySelectorAll('.page');
  4924. pages.forEach(page => {
  4925. page.style.display = 'none';
  4926. });
  4927. const targetPage = document.getElementById(pageId + '-page');
  4928. if (targetPage) {
  4929. targetPage.style.display = 'block';
  4930. targetPage.classList.add('fade-in');
  4931. setTimeout(() => {
  4932. targetPage.classList.remove('fade-in');
  4933. }, 300);
  4934. }
  4935. }
  4936. // 交互功能
  4937. function initInteractions() {
  4938. // 添加脉搏动画
  4939. const style = document.createElement('style');
  4940. style.textContent = `
  4941. @keyframes pulse {
  4942. 0%, 100% { transform: scale(1); }
  4943. 50% { transform: scale(1.1); }
  4944. }
  4945. `;
  4946. document.head.appendChild(style);
  4947. }
  4948. // 模态框功能
  4949. function showDesignModal() {
  4950. showModal('开始设计', '选择你想要设计的服装类型', '开始', startDesign);
  4951. }
  4952. function showModal(title, text, actionText = '开始', actionCallback = startDesign) {
  4953. const modal = document.getElementById('modal');
  4954. const modalTitle = document.getElementById('modalTitle');
  4955. const modalText = document.getElementById('modalText');
  4956. const primaryBtn = document.querySelector('.modal-actions .btn-primary');
  4957. modalTitle.textContent = title;
  4958. modalText.textContent = text;
  4959. primaryBtn.textContent = actionText;
  4960. primaryBtn.onclick = actionCallback;
  4961. modal.style.display = 'flex';
  4962. document.body.style.overflow = 'hidden';
  4963. }
  4964. function closeModal() {
  4965. const modal = document.getElementById('modal');
  4966. modal.style.display = 'none';
  4967. document.body.style.overflow = 'auto';
  4968. }
  4969. function startDesign() {
  4970. closeModal();
  4971. switchPage('design');
  4972. // 更新导航状态
  4973. const navItems = document.querySelectorAll('.nav-item');
  4974. navItems.forEach(nav => nav.classList.remove('active'));
  4975. document.querySelector('.nav-item[data-page="design"]').classList.add('active');
  4976. showNotification('开始设计', '欢迎来到设计中心!');
  4977. }
  4978. // 作品详情
  4979. function showWorkDetail(title) {
  4980. showNotification('作品详情', `正在查看《${title}》的详细信息`);
  4981. }
  4982. // AI推荐引擎相关全局变量
  4983. let aiChatHistory = [];
  4984. let isVoiceRecording = false;
  4985. let currentRecommendationScheme = 'scheme1';
  4986. // AI推荐引擎功能
  4987. function openAIChat(type) {
  4988. const modal = document.getElementById('aiChatModal');
  4989. const subtitle = document.getElementById('aiChatSubtitle');
  4990. const quickCommands = document.getElementById('aiQuickCommands');
  4991. modal.style.display = 'flex';
  4992. document.body.style.overflow = 'hidden';
  4993. // 根据类型设置不同的对话主题
  4994. switch(type) {
  4995. case 'occasion':
  4996. subtitle.textContent = '场合搭配专家为您服务...';
  4997. showAIMessage('我来帮您根据不同场合设计完美搭配!请告诉我您要参加什么场合?');
  4998. break;
  4999. case 'color':
  5000. subtitle.textContent = '配色大师为您分析...';
  5001. showAIMessage('专业配色分析师为您服务!我可以根据您的喜好和肤色,推荐最适合的颜色组合。');
  5002. break;
  5003. case 'style':
  5004. subtitle.textContent = '风格顾问在线中...';
  5005. showAIMessage('让我来分析您的个人风格!请描述一下您喜欢的穿衣风格,或者上传一张照片。');
  5006. break;
  5007. case 'free':
  5008. subtitle.textContent = '自由对话模式中...';
  5009. showAIMessage('有任何时尚相关的问题都可以问我哦!无论是搭配建议、流行趋势还是设计灵感。');
  5010. break;
  5011. }
  5012. // 隐藏快捷指令(进入对话状态)
  5013. quickCommands.style.display = 'none';
  5014. }
  5015. function closeAIChat() {
  5016. const modal = document.getElementById('aiChatModal');
  5017. modal.style.display = 'none';
  5018. document.body.style.overflow = 'auto';
  5019. // 重置快捷指令显示
  5020. const quickCommands = document.getElementById('aiQuickCommands');
  5021. quickCommands.style.display = 'flex';
  5022. }
  5023. function showAIMessage(text) {
  5024. const messagesContainer = document.getElementById('aiChatMessages');
  5025. const messageDiv = document.createElement('div');
  5026. messageDiv.className = 'ai-message';
  5027. const currentTime = new Date().toLocaleTimeString('zh-CN', {
  5028. hour: '2-digit',
  5029. minute: '2-digit'
  5030. });
  5031. messageDiv.innerHTML = `
  5032. <div class="message-avatar">🤖</div>
  5033. <div class="message-content">
  5034. <div class="message-text">${text}</div>
  5035. <div class="message-time">${currentTime}</div>
  5036. </div>
  5037. `;
  5038. messagesContainer.appendChild(messageDiv);
  5039. messagesContainer.scrollTop = messagesContainer.scrollHeight;
  5040. // 添加到对话历史
  5041. aiChatHistory.push({
  5042. type: 'ai',
  5043. text: text,
  5044. time: currentTime
  5045. });
  5046. }
  5047. function showUserMessage(text) {
  5048. const messagesContainer = document.getElementById('aiChatMessages');
  5049. const messageDiv = document.createElement('div');
  5050. messageDiv.className = 'user-message';
  5051. const currentTime = new Date().toLocaleTimeString('zh-CN', {
  5052. hour: '2-digit',
  5053. minute: '2-digit'
  5054. });
  5055. messageDiv.innerHTML = `
  5056. <div class="message-avatar">👤</div>
  5057. <div class="message-content">
  5058. <div class="message-text">${text}</div>
  5059. <div class="message-time">${currentTime}</div>
  5060. </div>
  5061. `;
  5062. messagesContainer.appendChild(messageDiv);
  5063. messagesContainer.scrollTop = messagesContainer.scrollHeight;
  5064. // 添加到对话历史
  5065. aiChatHistory.push({
  5066. type: 'user',
  5067. text: text,
  5068. time: currentTime
  5069. });
  5070. }
  5071. function sendMessage() {
  5072. const input = document.getElementById('aiChatInput');
  5073. const message = input.value.trim();
  5074. if (!message) return;
  5075. // 显示用户消息
  5076. showUserMessage(message);
  5077. input.value = '';
  5078. // 模拟AI回复
  5079. setTimeout(() => {
  5080. const aiResponse = generateAIResponse(message);
  5081. showAIMessage(aiResponse);
  5082. // 检查是否需要显示推荐结果
  5083. if (shouldShowRecommendation(message)) {
  5084. setTimeout(() => {
  5085. showAIMessage('我已经为您准备了专属的搭配方案,点击查看详细推荐!');
  5086. setTimeout(() => {
  5087. openRecommendationResult();
  5088. }, 1000);
  5089. }, 2000);
  5090. }
  5091. }, 1000 + Math.random() * 2000);
  5092. }
  5093. function sendQuickCommand(command) {
  5094. // 隐藏快捷指令
  5095. const quickCommands = document.getElementById('aiQuickCommands');
  5096. quickCommands.style.display = 'none';
  5097. // 发送快捷指令
  5098. showUserMessage(command);
  5099. // AI回复
  5100. setTimeout(() => {
  5101. const response = generateAIResponse(command);
  5102. showAIMessage(response);
  5103. if (shouldShowRecommendation(command)) {
  5104. setTimeout(() => {
  5105. showAIMessage('我为您精心准备了搭配方案,让我们来看看推荐结果!');
  5106. setTimeout(() => {
  5107. openRecommendationResult();
  5108. }, 1000);
  5109. }, 2000);
  5110. }
  5111. }, 1500);
  5112. }
  5113. function generateAIResponse(userMessage) {
  5114. const responses = {
  5115. '商务': [
  5116. '商务装搭配需要注重专业感和权威性。推荐选择深色西装,搭配白色或浅蓝色衬衫,以及经典的领带。',
  5117. '对于商务场合,建议选择海军蓝或深灰色作为主色调,这样既显稳重又不失现代感。'
  5118. ],
  5119. '休闲': [
  5120. '休闲装的核心是舒适与时尚的平衡。可以尝试牛仔裤搭配舒适的T恤或针织衫。',
  5121. '休闲风格可以更多地运用色彩层次,比如浅色系的组合会让人看起来更加放松自然。'
  5122. ],
  5123. '春季': [
  5124. '春季流行色彩偏向清新自然,推荐薄荷绿、樱花粉、天空蓝等颜色。',
  5125. '春天是万物复苏的季节,服装色彩也应该充满生机,浅色调和柔和的渐变色都是不错的选择。'
  5126. ],
  5127. '约会': [
  5128. '约会装要在优雅与个性之间找到平衡。推荐选择有设计感但不过分夸张的单品。',
  5129. '约会时的配色可以选择温暖的色调,比如粉色、桃色或者优雅的紫色系。'
  5130. ]
  5131. };
  5132. // 简单的关键词匹配
  5133. for (let keyword in responses) {
  5134. if (userMessage.includes(keyword)) {
  5135. const keywordResponses = responses[keyword];
  5136. return keywordResponses[Math.floor(Math.random() * keywordResponses.length)];
  5137. }
  5138. }
  5139. // 默认回复
  5140. const defaultResponses = [
  5141. '这是一个很有趣的想法!让我为您分析一下最适合的搭配方案。',
  5142. '根据您的需求,我建议从色彩搭配入手,创造出和谐统一的视觉效果。',
  5143. '很好的问题!时尚搭配的关键在于了解自己的风格定位和场合需求。',
  5144. '我理解您的想法,让我为您推荐一些专业的搭配建议。'
  5145. ];
  5146. return defaultResponses[Math.floor(Math.random() * defaultResponses.length)];
  5147. }
  5148. function shouldShowRecommendation(message) {
  5149. const triggerWords = ['搭配', '推荐', '建议', '方案', '帮我', '想要', '设计'];
  5150. return triggerWords.some(word => message.includes(word));
  5151. }
  5152. function handleChatInputKeypress(event) {
  5153. if (event.key === 'Enter') {
  5154. sendMessage();
  5155. }
  5156. }
  5157. // 多模态输入功能
  5158. function startVoiceInput() {
  5159. if (isVoiceRecording) {
  5160. stopVoiceInput();
  5161. return;
  5162. }
  5163. isVoiceRecording = true;
  5164. const button = event.target.closest('.input-tool');
  5165. button.style.background = 'rgba(255, 107, 107, 0.3)';
  5166. button.innerHTML = '<span class="tool-icon">⏸️</span>';
  5167. showNotification('语音输入', '正在录音中...');
  5168. // 模拟语音识别
  5169. setTimeout(() => {
  5170. stopVoiceInput();
  5171. const input = document.getElementById('aiChatInput');
  5172. input.value = '帮我搭配一套适合春天的休闲装';
  5173. showNotification('语音识别', '语音转换完成');
  5174. }, 3000);
  5175. }
  5176. function stopVoiceInput() {
  5177. isVoiceRecording = false;
  5178. const button = document.querySelector('.input-tool');
  5179. button.style.background = 'rgba(255,255,255,0.15)';
  5180. button.innerHTML = '<span class="tool-icon">🎤</span>';
  5181. }
  5182. function uploadImage() {
  5183. // 创建文件输入
  5184. const fileInput = document.createElement('input');
  5185. fileInput.type = 'file';
  5186. fileInput.accept = 'image/*';
  5187. fileInput.onchange = function(e) {
  5188. const file = e.target.files[0];
  5189. if (file) {
  5190. showNotification('图片识别', '正在分析您的穿搭照片...');
  5191. // 模拟图片识别
  5192. setTimeout(() => {
  5193. showUserMessage('📷 [已上传穿搭照片]');
  5194. setTimeout(() => {
  5195. showAIMessage('我看到您穿的是一套休闲风格的搭配!主要颜色是蓝色系,整体很清新。我可以为您推荐一些类似风格但更加时尚的搭配方案。');
  5196. }, 1500);
  5197. }, 2000);
  5198. }
  5199. };
  5200. fileInput.click();
  5201. }
  5202. function showEmoji() {
  5203. const emojis = ['😊', '👍', '❤️', '✨', '🎨', '👔', '👕', '👗', '💫', '🌟'];
  5204. const input = document.getElementById('aiChatInput');
  5205. const randomEmoji = emojis[Math.floor(Math.random() * emojis.length)];
  5206. input.value += randomEmoji;
  5207. input.focus();
  5208. }
  5209. // 悬浮球点击事件
  5210. document.addEventListener('DOMContentLoaded', function() {
  5211. const floatingBall = document.getElementById('aiFloatingBall');
  5212. if (floatingBall) {
  5213. floatingBall.addEventListener('click', function() {
  5214. openAIChat('free');
  5215. });
  5216. }
  5217. });
  5218. // 推荐结果页面功能
  5219. function openRecommendationResult() {
  5220. closeAIChat();
  5221. const modal = document.getElementById('aiRecommendationModal');
  5222. modal.style.display = 'flex';
  5223. document.body.style.overflow = 'hidden';
  5224. // 初始化推荐内容
  5225. updateRecommendationContent();
  5226. }
  5227. function closeRecommendation() {
  5228. const modal = document.getElementById('aiRecommendationModal');
  5229. modal.style.display = 'none';
  5230. document.body.style.overflow = 'auto';
  5231. }
  5232. function updateRecommendationContent() {
  5233. const schemes = {
  5234. 'scheme1': {
  5235. name: '经典商务风',
  5236. colors: ['#2c3e50', '#34495e', '#95a5a6'],
  5237. theory: [
  5238. {
  5239. icon: '🎯',
  5240. title: '主色调选择',
  5241. desc: '基于您的需求,选择了沉稳的深蓝色作为主色调,既显专业又不失现代感。'
  5242. },
  5243. {
  5244. icon: '🌈',
  5245. title: '色彩搭配',
  5246. desc: '采用单色调搭配法,深浅不同的蓝色系营造层次感和稳重感。'
  5247. },
  5248. {
  5249. icon: '✨',
  5250. title: '视觉效果',
  5251. desc: '整体造型简洁大方,适合商务场合,彰显专业形象。'
  5252. }
  5253. ]
  5254. },
  5255. 'scheme2': {
  5256. name: '春日清新风',
  5257. colors: ['#f39c12', '#e67e22', '#d35400'],
  5258. theory: [
  5259. {
  5260. icon: '🎯',
  5261. title: '季节特色',
  5262. desc: '春季专属的温暖色调,充满生机与活力,让人眼前一亮。'
  5263. },
  5264. {
  5265. icon: '🌈',
  5266. title: '暖色搭配',
  5267. desc: '橙色系的渐变搭配,营造温暖阳光的感觉,适合春日出行。'
  5268. },
  5269. {
  5270. icon: '✨',
  5271. title: '心理效应',
  5272. desc: '暖色调能够提升心情,增加亲和力和活力感。'
  5273. }
  5274. ]
  5275. },
  5276. 'scheme3': {
  5277. name: '优雅紫罗兰',
  5278. colors: ['#9b59b6', '#8e44ad', '#663399'],
  5279. theory: [
  5280. {
  5281. icon: '🎯',
  5282. title: '色彩心理',
  5283. desc: '紫色代表优雅与神秘,是富有创造力和艺术感的颜色选择。'
  5284. },
  5285. {
  5286. icon: '🌈',
  5287. title: '渐变层次',
  5288. desc: '紫色系的深浅渐变,创造出丰富的视觉层次和高级感。'
  5289. },
  5290. {
  5291. icon: '✨',
  5292. title: '独特气质',
  5293. desc: '紫色搭配能够突出个人品味,展现独特的时尚态度。'
  5294. }
  5295. ]
  5296. }
  5297. };
  5298. const currentScheme = schemes[currentRecommendationScheme];
  5299. const theoryContent = document.getElementById('colorTheoryContent');
  5300. theoryContent.innerHTML = currentScheme.theory.map(item => `
  5301. <div class="theory-card">
  5302. <div class="theory-icon">${item.icon}</div>
  5303. <div class="theory-text">
  5304. <h5>${item.title}</h5>
  5305. <p>${item.desc}</p>
  5306. </div>
  5307. </div>
  5308. `).join('');
  5309. }
  5310. function selectScheme(schemeId) {
  5311. currentRecommendationScheme = schemeId;
  5312. // 更新方案选择状态
  5313. const tabs = document.querySelectorAll('.scheme-tab');
  5314. tabs.forEach(tab => tab.classList.remove('active'));
  5315. event.target.classList.add('active');
  5316. // 更新推荐内容
  5317. updateRecommendationContent();
  5318. const schemeNames = {
  5319. 'scheme1': '经典商务风',
  5320. 'scheme2': '春日清新风',
  5321. 'scheme3': '优雅紫罗兰'
  5322. };
  5323. showNotification('方案切换', `已切换到${schemeNames[schemeId]}`);
  5324. }
  5325. function rotateModel(direction) {
  5326. const model = document.querySelector('.model-3d-display');
  5327. let currentRotation = parseInt(model.dataset.rotation || '0');
  5328. if (direction === 'left') {
  5329. currentRotation -= 90;
  5330. } else if (direction === 'right') {
  5331. currentRotation += 90;
  5332. }
  5333. model.style.transform = `rotateY(${currentRotation}deg)`;
  5334. model.dataset.rotation = currentRotation;
  5335. showNotification('3D旋转', `模型已旋转 ${direction === 'left' ? '向左' : '向右'} 90°`);
  5336. }
  5337. function resetModel() {
  5338. const model = document.querySelector('.model-3d-display');
  5339. model.style.transform = 'rotateY(0deg)';
  5340. model.dataset.rotation = '0';
  5341. showNotification('视角重置', '已重置到正面视角');
  5342. }
  5343. function shareRecommendation() {
  5344. showNotification('分享成功', '推荐方案已复制到剪贴板');
  5345. }
  5346. function saveRecommendation() {
  5347. showNotification('收藏成功', '推荐方案已保存到我的收藏');
  5348. }
  5349. function importToDesignCenter() {
  5350. closeRecommendation();
  5351. switchPage('design');
  5352. updateNavigation('design');
  5353. showNotification('导入成功', 'AI推荐方案已导入到设计中心');
  5354. }
  5355. function viewAIRecommendation(type) {
  5356. const recommendationTypes = {
  5357. 'business': '商务精英装',
  5358. 'casual': '休闲度假风'
  5359. };
  5360. showNotification('查看推荐', `正在查看${recommendationTypes[type]}推荐`);
  5361. setTimeout(() => {
  5362. openRecommendationResult();
  5363. }, 1000);
  5364. }
  5365. // 保持向后兼容
  5366. function showAIRecommend(style) {
  5367. openAIChat('free');
  5368. setTimeout(() => {
  5369. sendQuickCommand(`帮我搭配一套${style}风格的服装`);
  5370. }, 1000);
  5371. }
  5372. // 新版设计中心全局变量
  5373. let currentBodyPart = 'overall';
  5374. let currentMaterial = 'cotton';
  5375. let modelRotation = 0;
  5376. let partColors = {
  5377. 'overall': '#ff6b6b',
  5378. 'left-sleeve': '#ff6b6b',
  5379. 'right-sleeve': '#ff6b6b',
  5380. 'hood': '#ff6b6b',
  5381. 'body': '#ff6b6b'
  5382. };
  5383. let colorHistory = [];
  5384. // 3D模型控制函数
  5385. function rotateModel(direction) {
  5386. const model = document.getElementById('main3DModel');
  5387. if (direction === 'left') {
  5388. modelRotation -= 90;
  5389. } else if (direction === 'right') {
  5390. modelRotation += 90;
  5391. }
  5392. model.style.transform = `rotateY(${modelRotation}deg)`;
  5393. showNotification('3D旋转', `模型已旋转到 ${modelRotation}°`);
  5394. }
  5395. function resetModelView() {
  5396. modelRotation = 0;
  5397. const model = document.getElementById('main3DModel');
  5398. model.style.transform = 'rotateY(0deg)';
  5399. showNotification('视角重置', '已重置为正面视角');
  5400. }
  5401. // 分区控制面板
  5402. function toggleZonePanel() {
  5403. const content = document.querySelector('.zone-control-panel .panel-content');
  5404. const btn = document.querySelector('.expand-btn');
  5405. if (content.style.display === 'none') {
  5406. content.style.display = 'block';
  5407. btn.textContent = '⌄';
  5408. } else {
  5409. content.style.display = 'none';
  5410. btn.textContent = '⌃';
  5411. }
  5412. }
  5413. // 部位选择功能
  5414. function selectBodyPart(part) {
  5415. currentBodyPart = part;
  5416. // 更新Tab状态
  5417. const partTabs = document.querySelectorAll('.part-tab');
  5418. partTabs.forEach(tab => tab.classList.remove('active'));
  5419. document.querySelector(`[data-part="${part}"]`).classList.add('active');
  5420. // 更新当前部位显示
  5421. const partNames = {
  5422. 'overall': '整体',
  5423. 'left-sleeve': '左袖',
  5424. 'right-sleeve': '右袖',
  5425. 'hood': '帽子',
  5426. 'body': '身体'
  5427. };
  5428. document.getElementById('currentPartName').textContent = partNames[part];
  5429. document.getElementById('currentPartColor').style.background = partColors[part];
  5430. // 更新3D模型高亮效果
  5431. highlightBodyPart(part);
  5432. showNotification('部位选择', `已选择 ${partNames[part]} 部位`);
  5433. }
  5434. function highlightBodyPart(part) {
  5435. // 这里可以添加3D模型部位高亮的逻辑
  5436. const model = document.getElementById('main3DModel');
  5437. // 根据选择的部位显示不同的模型或高亮效果
  5438. switch(part) {
  5439. case 'overall':
  5440. model.textContent = '👕';
  5441. break;
  5442. case 'left-sleeve':
  5443. model.textContent = '👈👕';
  5444. break;
  5445. case 'right-sleeve':
  5446. model.textContent = '👕👉';
  5447. break;
  5448. case 'hood':
  5449. model.textContent = '🎩👕';
  5450. break;
  5451. case 'body':
  5452. model.textContent = '👕';
  5453. break;
  5454. }
  5455. }
  5456. // 颜色选择功能(增强版)
  5457. function selectColor(color) {
  5458. selectedColor = color;
  5459. partColors[currentBodyPart] = color;
  5460. // 更新颜色选择状态
  5461. const swatches = document.querySelectorAll('.color-swatch');
  5462. swatches.forEach(swatch => {
  5463. swatch.classList.remove('active');
  5464. if (swatch.getAttribute('data-color') === color) {
  5465. swatch.classList.add('active');
  5466. }
  5467. });
  5468. // 更新当前部位颜色指示器
  5469. document.getElementById('currentPartColor').style.background = color;
  5470. // 保存到历史记录
  5471. if (!colorHistory.includes(color)) {
  5472. colorHistory.push(color);
  5473. if (colorHistory.length > 10) {
  5474. colorHistory.shift();
  5475. }
  5476. }
  5477. // 更新3D模型颜色
  5478. const model = document.getElementById('main3DModel');
  5479. model.style.color = color;
  5480. showNotification('颜色应用', `${currentBodyPart} 部位已应用颜色 ${color}`);
  5481. }
  5482. // 自定义颜色选择
  5483. function selectCustomColor(color) {
  5484. selectColor(color);
  5485. }
  5486. function addCustomColor() {
  5487. const customColor = document.getElementById('customColorPicker').value;
  5488. selectColor(customColor);
  5489. showNotification('自定义颜色', '已添加自定义颜色到色盘');
  5490. }
  5491. // 色盘管理功能
  5492. function syncColorToAll() {
  5493. const currentColor = partColors[currentBodyPart];
  5494. Object.keys(partColors).forEach(part => {
  5495. partColors[part] = currentColor;
  5496. });
  5497. showNotification('颜色同步', '已将当前颜色同步到所有部位');
  5498. }
  5499. function showColorHistory() {
  5500. const historySection = document.getElementById('colorHistorySection');
  5501. if (historySection.style.display === 'none') {
  5502. historySection.style.display = 'block';
  5503. } else {
  5504. historySection.style.display = 'none';
  5505. }
  5506. }
  5507. function saveColorScheme() {
  5508. const schemeName = prompt('请输入配色方案名称:');
  5509. if (schemeName) {
  5510. // 这里可以实现保存配色方案到本地存储
  5511. localStorage.setItem(`colorScheme_${Date.now()}`, JSON.stringify({
  5512. name: schemeName,
  5513. colors: partColors,
  5514. timestamp: Date.now()
  5515. }));
  5516. showNotification('方案保存', `配色方案 "${schemeName}" 已保存`);
  5517. }
  5518. }
  5519. function loadColorScheme(schemeId) {
  5520. // 预设的配色方案
  5521. const schemes = {
  5522. 'scheme1': {
  5523. 'overall': '#ff6b6b',
  5524. 'left-sleeve': '#4ecdc4',
  5525. 'right-sleeve': '#4ecdc4',
  5526. 'hood': '#ffeaa7',
  5527. 'body': '#ff6b6b'
  5528. },
  5529. 'scheme2': {
  5530. 'overall': '#667eea',
  5531. 'left-sleeve': '#764ba2',
  5532. 'right-sleeve': '#764ba2',
  5533. 'hood': '#a29bfe',
  5534. 'body': '#667eea'
  5535. }
  5536. };
  5537. const scheme = schemes[schemeId];
  5538. if (scheme) {
  5539. partColors = {...scheme};
  5540. selectBodyPart(currentBodyPart); // 刷新显示
  5541. showNotification('方案加载', '配色方案已加载');
  5542. }
  5543. }
  5544. // 高级定制工具函数
  5545. function openAdvancedEmbroidery() {
  5546. showNotification('刺绣编辑器', `正在为 ${currentBodyPart} 部位开启高级刺绣编辑器`);
  5547. }
  5548. function openTextureSystem() {
  5549. showNotification('贴图系统', `正在为 ${currentBodyPart} 部位开启贴图编辑系统`);
  5550. }
  5551. function openPatternLibrary() {
  5552. showNotification('图案库', '正在打开海量设计素材库');
  5553. }
  5554. function openAIDesigner() {
  5555. showNotification('AI设计师', '正在启动智能配色建议系统');
  5556. }
  5557. // 服装切片图颜色切换功能
  5558. let currentSelectedPart = 'overall';
  5559. let availableColors = [
  5560. // 原有颜色
  5561. '蓝色', '粉色', '牛油果绿', '白色', '黑色', '橘色', '利灰',
  5562. // 新增颜色
  5563. '宝蓝色', '浅驼色', '测试色', '深灰绿', '深紫色', '深绿色',
  5564. '真朱', '睿智金', '红色', '萌萌绿', '蒂芙尼蓝', '长春花蓝',
  5565. '青紫', '靓丽黄'
  5566. ];
  5567. function selectClothingColor(colorName) {
  5568. console.log('选择颜色:', colorName, '当前部位:', currentSelectedPart);
  5569. if (currentSelectedPart === 'overall') {
  5570. // 整体颜色切换 - 所有部位
  5571. updateAllParts(colorName);
  5572. } else {
  5573. // 单独部位颜色切换
  5574. updateSinglePart(currentSelectedPart, colorName);
  5575. }
  5576. // 更新颜色选择状态
  5577. updateColorSwatchState(colorName);
  5578. showNotification('颜色切换', `已切换到${colorName}`);
  5579. }
  5580. function updateAllParts(colorName) {
  5581. const parts = ['s1', 't1', 'y1', 'z1'];
  5582. parts.forEach(part => {
  5583. updatePartImage(part, colorName);
  5584. });
  5585. }
  5586. function updateSinglePart(partName, colorName) {
  5587. updatePartImage(partName, colorName);
  5588. }
  5589. function updatePartImage(partName, colorName) {
  5590. const imgElement = document.querySelector(`#layer-${partName} img`);
  5591. if (imgElement) {
  5592. const imagePath = getImagePath(partName, colorName);
  5593. imgElement.src = imagePath;
  5594. console.log('更新图片:', partName, '→', imagePath);
  5595. }
  5596. }
  5597. function getImagePath(partName, colorName) {
  5598. // 路径映射:优先查找新切片图,再查找原切片图
  5599. function tryPath(basePath, partName, colorName) {
  5600. const partMap = {
  5601. 's1': 'S1.png',
  5602. 't1': 'T1.png',
  5603. 'y1': 'Y1.png',
  5604. 'z1': 'Z1.png'
  5605. };
  5606. const filename = partMap[partName];
  5607. if (!filename) return '';
  5608. // 检查是否在新切片图中
  5609. const newPath = `切片图/切片图/${colorName}/${filename}`;
  5610. // 特殊处理:浅驼色的文件名是小写的
  5611. if (colorName === '浅驼色') {
  5612. const lowercaseFilename = filename.toLowerCase();
  5613. return `切片图/切片图/${colorName}/${lowercaseFilename}`;
  5614. }
  5615. // 检查新切片图路径是否存在(这里我们假设新路径优先)
  5616. if (['宝蓝色', '浅驼色', '测试色', '深灰绿', '深紫色', '深绿色',
  5617. '真朱', '睿智金', '红色', '萌萌绿', '蒂芙尼蓝', '长春花蓝',
  5618. '青紫', '靓丽黄'].includes(colorName)) {
  5619. return newPath;
  5620. }
  5621. // 特殊处理:橘色和利灰只有T1和Y1
  5622. if ((colorName === '橘色' || colorName === '利灰') && (partName === 's1' || partName === 'z1')) {
  5623. // 如果橘色或利灰没有该部位,使用蓝色替代
  5624. return `切片图共7个/切片图共7个/蓝色/${filename}`;
  5625. }
  5626. // 返回原切片图路径
  5627. return `切片图共7个/切片图共7个/${colorName}/${filename}`;
  5628. }
  5629. return tryPath('', partName, colorName);
  5630. }
  5631. function selectBodyPart(partName) {
  5632. console.log('选择部位:', partName);
  5633. currentSelectedPart = partName;
  5634. // 更新按钮状态
  5635. document.querySelectorAll('.part-tab').forEach(tab => {
  5636. tab.classList.remove('active');
  5637. });
  5638. document.querySelector(`[data-part="${partName}"]`).classList.add('active');
  5639. // 更新当前部位名称显示
  5640. const partNames = {
  5641. 'overall': '整体',
  5642. 's1': 'S1部位',
  5643. 't1': 'T1部位',
  5644. 'y1': 'Y1部位',
  5645. 'z1': 'Z1部位'
  5646. };
  5647. document.getElementById('currentPartName').textContent = partNames[partName] || partName;
  5648. // 高亮显示选中部位
  5649. highlightSelectedPart(partName);
  5650. showNotification('部位选择', `已选择${partNames[partName]}`);
  5651. }
  5652. function highlightSelectedPart(partName) {
  5653. // 清除所有高亮
  5654. document.querySelectorAll('.part-image').forEach(img => {
  5655. img.classList.remove('highlighted', 'selected');
  5656. });
  5657. // 高亮选中部位
  5658. if (partName !== 'overall') {
  5659. const selectedImg = document.querySelector(`#layer-${partName} img`);
  5660. if (selectedImg) {
  5661. selectedImg.classList.add('selected');
  5662. }
  5663. }
  5664. }
  5665. function updateColorSwatchState(colorName) {
  5666. document.querySelectorAll('.color-swatch').forEach(swatch => {
  5667. swatch.classList.remove('active');
  5668. if (swatch.getAttribute('data-color') === colorName) {
  5669. swatch.classList.add('active');
  5670. }
  5671. });
  5672. }
  5673. // 兼容性函数(保持向后兼容)
  5674. function openColorPicker() {
  5675. showNotification('颜色设计器', '请使用下方的智能色盘系统');
  5676. }
  5677. function openPatternEditor() {
  5678. openPatternLibrary();
  5679. }
  5680. function openEmbroidery() {
  5681. openAdvancedEmbroidery();
  5682. }
  5683. function openAccessories() {
  5684. showNotification('配饰搭配', '配饰功能将在高级定制中提供');
  5685. }
  5686. // AR试穿功能
  5687. function selectScene(scene) {
  5688. const sceneNames = {
  5689. 'office': '办公场景',
  5690. 'date': '约会场景',
  5691. 'party': '派对场景',
  5692. 'casual': '休闲场景'
  5693. };
  5694. showNotification('场景切换', `已切换到${sceneNames[scene]}`);
  5695. }
  5696. // 社区功能
  5697. function likeWork(element) {
  5698. element.style.transform = 'scale(0.95)';
  5699. setTimeout(() => {
  5700. element.style.transform = 'scale(1)';
  5701. }, 150);
  5702. showNotification('点赞成功', '感谢你的支持!');
  5703. }
  5704. // 个人中心功能
  5705. function showMyDesigns() {
  5706. showNotification('我的设计稿', '查看你的所有设计作品');
  5707. }
  5708. function showTryOnHistory() {
  5709. showNotification('试穿历史', '查看你的试穿记录');
  5710. }
  5711. function showOrders() {
  5712. showNotification('订单管理', '查看你的订单状态');
  5713. }
  5714. function showCollections() {
  5715. showNotification('收藏夹', '查看你收藏的作品');
  5716. }
  5717. function showFollowers() {
  5718. showNotification('粉丝管理', '管理你的粉丝关系');
  5719. }
  5720. function showSettings() {
  5721. document.getElementById('settingsModal').style.display = 'block';
  5722. }
  5723. function closeSettingsModal() {
  5724. document.getElementById('settingsModal').style.display = 'none';
  5725. }
  5726. // 头像更换功能
  5727. function changeAvatar() {
  5728. const avatarOptions = [
  5729. "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='30' fill='%23ff6b6b'/><circle cx='30' cy='22' r='8' fill='white'/><ellipse cx='30' cy='45' rx='15' ry='10' fill='white'/></svg>",
  5730. "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='30' fill='%2364b5f6'/><circle cx='30' cy='22' r='8' fill='white'/><ellipse cx='30' cy='45' rx='15' ry='10' fill='white'/></svg>",
  5731. "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='30' fill='%2381c784'/><circle cx='30' cy='22' r='8' fill='white'/><ellipse cx='30' cy='45' rx='15' ry='10' fill='white'/></svg>",
  5732. "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='30' fill='%23ffb74d'/><circle cx='30' cy='22' r='8' fill='white'/><ellipse cx='30' cy='45' rx='15' ry='10' fill='white'/></svg>"
  5733. ];
  5734. const currentAvatar = document.getElementById('userAvatar').src;
  5735. let currentIndex = avatarOptions.indexOf(currentAvatar);
  5736. const nextIndex = (currentIndex + 1) % avatarOptions.length;
  5737. document.getElementById('userAvatar').src = avatarOptions[nextIndex];
  5738. showNotification('头像已更新', '您的头像已成功更换!');
  5739. }
  5740. // 修改密码功能
  5741. function changePassword() {
  5742. showNotification('修改密码', '密码修改功能将在后续版本中提供');
  5743. }
  5744. // 绑定手机号功能
  5745. function bindPhone() {
  5746. showNotification('手机号绑定', '手机号绑定功能将在后续版本中提供');
  5747. }
  5748. // 绑定邮箱功能
  5749. function bindEmail() {
  5750. showNotification('邮箱绑定', '邮箱绑定功能将在后续版本中提供');
  5751. }
  5752. // 关于应用功能
  5753. function showAbout() {
  5754. showNotification('关于应用', 'FashionCraft v1.0.0 - 专业的服装DIY设计平台');
  5755. }
  5756. // 清除缓存功能
  5757. function clearCache() {
  5758. if (confirm('确定要清除缓存吗?这将删除临时文件和设计草稿。')) {
  5759. showNotification('缓存已清除', '成功清除 23.5MB 缓存数据');
  5760. // 更新缓存大小显示
  5761. document.querySelector('.cache-size').textContent = '0MB';
  5762. setTimeout(() => {
  5763. document.querySelector('.cache-size').textContent = '1.2MB';
  5764. }, 2000);
  5765. }
  5766. }
  5767. // 意见反馈功能
  5768. function feedback() {
  5769. showNotification('意见反馈', '感谢您的反馈!我们会认真对待每一条建议');
  5770. }
  5771. // 保存设置功能
  5772. function saveSettings() {
  5773. const userName = document.getElementById('userName').value;
  5774. const userBio = document.getElementById('userBio').value;
  5775. const userLocation = document.getElementById('userLocation').value;
  5776. if (!userName.trim()) {
  5777. showNotification('保存失败', '用户名不能为空');
  5778. return;
  5779. }
  5780. // 这里可以添加实际的保存逻辑
  5781. console.log('保存设置:', {
  5782. userName: userName,
  5783. userBio: userBio,
  5784. userLocation: userLocation
  5785. });
  5786. showNotification('设置已保存', '您的个人设置已成功保存!');
  5787. }
  5788. // 退出登录确认
  5789. function confirmLogout() {
  5790. if (confirm('确定要退出登录吗?未保存的设计将会丢失。')) {
  5791. logout();
  5792. }
  5793. }
  5794. // 退出登录功能
  5795. function logout() {
  5796. // 清除用户数据
  5797. localStorage.removeItem('userSession');
  5798. localStorage.removeItem('userPreferences');
  5799. showNotification('退出成功', '您已成功退出登录');
  5800. // 关闭设置模态框
  5801. closeSettingsModal();
  5802. // 这里可以添加重定向到登录页面的逻辑
  5803. setTimeout(() => {
  5804. showNotification('跳转登录', '正在跳转到登录页面...');
  5805. }, 1500);
  5806. }
  5807. // 上传功能相关变量
  5808. let currentUploadStep = 1;
  5809. let selectedWorkType = '';
  5810. let uploadedFiles = [];
  5811. let selectedTags = [];
  5812. let selectedDesigns = [];
  5813. // 打开上传模态框
  5814. function openUploadModal() {
  5815. document.getElementById('uploadModal').style.display = 'flex';
  5816. resetUploadModal();
  5817. }
  5818. // 关闭上传模态框
  5819. function closeUploadModal() {
  5820. document.getElementById('uploadModal').style.display = 'none';
  5821. }
  5822. // 重置上传模态框
  5823. function resetUploadModal() {
  5824. currentUploadStep = 1;
  5825. selectedWorkType = '';
  5826. uploadedFiles = [];
  5827. selectedTags = [];
  5828. selectedDesigns = [];
  5829. updateUploadStep();
  5830. clearFormData();
  5831. }
  5832. // 更新上传步骤
  5833. function updateUploadStep() {
  5834. // 更新步骤指示器
  5835. document.querySelectorAll('.step').forEach((step, index) => {
  5836. if (index + 1 <= currentUploadStep) {
  5837. step.classList.add('active');
  5838. } else {
  5839. step.classList.remove('active');
  5840. }
  5841. });
  5842. // 显示对应步骤内容
  5843. document.querySelectorAll('.upload-step').forEach((step, index) => {
  5844. if (index + 1 === currentUploadStep) {
  5845. step.classList.add('active');
  5846. } else {
  5847. step.classList.remove('active');
  5848. }
  5849. });
  5850. // 更新按钮状态
  5851. const prevBtn = document.getElementById('prevBtn');
  5852. const nextBtn = document.getElementById('nextBtn');
  5853. const publishBtn = document.getElementById('publishBtn');
  5854. prevBtn.style.display = currentUploadStep > 1 ? 'block' : 'none';
  5855. if (currentUploadStep < 4) {
  5856. nextBtn.style.display = 'block';
  5857. publishBtn.style.display = 'none';
  5858. } else {
  5859. nextBtn.style.display = 'none';
  5860. publishBtn.style.display = 'block';
  5861. }
  5862. }
  5863. // 下一步
  5864. function nextStep() {
  5865. if (validateCurrentStep()) {
  5866. currentUploadStep++;
  5867. updateUploadStep();
  5868. }
  5869. }
  5870. // 上一步
  5871. function prevStep() {
  5872. currentUploadStep--;
  5873. updateUploadStep();
  5874. }
  5875. // 验证当前步骤
  5876. function validateCurrentStep() {
  5877. switch (currentUploadStep) {
  5878. case 1:
  5879. if (!selectedWorkType) {
  5880. showNotification('请选择作品类型');
  5881. return false;
  5882. }
  5883. break;
  5884. case 2:
  5885. if (uploadedFiles.length === 0 && selectedDesigns.length === 0) {
  5886. showNotification('请上传内容或选择设计');
  5887. return false;
  5888. }
  5889. break;
  5890. case 3:
  5891. const title = document.getElementById('workTitle').value.trim();
  5892. if (!title) {
  5893. showNotification('请输入作品标题');
  5894. return false;
  5895. }
  5896. break;
  5897. case 4:
  5898. const copyrightAgree = document.getElementById('copyrightAgree').checked;
  5899. if (!copyrightAgree) {
  5900. showNotification('请同意版权声明');
  5901. return false;
  5902. }
  5903. break;
  5904. }
  5905. return true;
  5906. }
  5907. // 选择作品类型
  5908. function selectWorkType(type) {
  5909. selectedWorkType = type;
  5910. document.querySelectorAll('.work-type').forEach(item => {
  5911. item.classList.remove('selected');
  5912. });
  5913. document.querySelector(`[data-type="${type}"]`).classList.add('selected');
  5914. }
  5915. // 触发文件上传
  5916. function triggerFileUpload() {
  5917. document.getElementById('fileInput').click();
  5918. }
  5919. // 触发3D文件上传
  5920. function trigger3DUpload() {
  5921. document.getElementById('file3DInput').click();
  5922. }
  5923. // 处理文件上传
  5924. function handleFileUpload(event) {
  5925. const files = Array.from(event.target.files);
  5926. files.forEach(file => {
  5927. if (uploadedFiles.length < 9) {
  5928. uploadedFiles.push(file);
  5929. addFilePreview(file);
  5930. }
  5931. });
  5932. }
  5933. // 处理3D文件上传
  5934. function handle3DUpload(event) {
  5935. const file = event.target.files[0];
  5936. if (file) {
  5937. showNotification('3D文件上传成功: ' + file.name);
  5938. }
  5939. }
  5940. // 添加文件预览
  5941. function addFilePreview(file) {
  5942. const preview = document.getElementById('uploadPreview');
  5943. const previewItem = document.createElement('div');
  5944. previewItem.className = 'preview-item';
  5945. if (file.type.startsWith('image/')) {
  5946. const img = document.createElement('img');
  5947. img.src = URL.createObjectURL(file);
  5948. previewItem.appendChild(img);
  5949. } else {
  5950. previewItem.innerHTML = '<div style="display: flex; align-items: center; justify-content: center; height: 100%; font-size: 24px;">🎬</div>';
  5951. }
  5952. const removeBtn = document.createElement('button');
  5953. removeBtn.className = 'preview-remove';
  5954. removeBtn.innerHTML = '×';
  5955. removeBtn.onclick = () => removeFilePreview(file, previewItem);
  5956. previewItem.appendChild(removeBtn);
  5957. preview.appendChild(previewItem);
  5958. }
  5959. // 移除文件预览
  5960. function removeFilePreview(file, previewItem) {
  5961. const index = uploadedFiles.indexOf(file);
  5962. if (index > -1) {
  5963. uploadedFiles.splice(index, 1);
  5964. }
  5965. previewItem.remove();
  5966. }
  5967. // 从我的设计选择
  5968. function selectFromMyDesigns(designId) {
  5969. const designItem = document.querySelector(`[onclick="selectFromMyDesigns(${designId})"]`);
  5970. if (selectedDesigns.includes(designId)) {
  5971. selectedDesigns = selectedDesigns.filter(id => id !== designId);
  5972. designItem.classList.remove('selected');
  5973. } else {
  5974. selectedDesigns.push(designId);
  5975. designItem.classList.add('selected');
  5976. }
  5977. }
  5978. // 切换标签
  5979. function toggleTag(tagElement) {
  5980. const tagText = tagElement.textContent;
  5981. if (selectedTags.includes(tagText)) {
  5982. selectedTags = selectedTags.filter(tag => tag !== tagText);
  5983. tagElement.classList.remove('selected');
  5984. } else {
  5985. selectedTags.push(tagText);
  5986. tagElement.classList.add('selected');
  5987. }
  5988. }
  5989. // 添加自定义标签
  5990. function addCustomTag(event) {
  5991. if (event.key === 'Enter') {
  5992. const input = event.target;
  5993. const tagText = '#' + input.value.trim();
  5994. if (tagText.length > 1 && !selectedTags.includes(tagText)) {
  5995. selectedTags.push(tagText);
  5996. const tagElement = document.createElement('span');
  5997. tagElement.className = 'tag selected';
  5998. tagElement.textContent = tagText;
  5999. tagElement.onclick = () => toggleTag(tagElement);
  6000. document.querySelector('.popular-tags').appendChild(tagElement);
  6001. input.value = '';
  6002. }
  6003. }
  6004. }
  6005. // 发布作品
  6006. function publishWork() {
  6007. if (validateCurrentStep()) {
  6008. // 模拟发布过程
  6009. showNotification('发布成功', '你的作品已成功发布到社区!');
  6010. closeUploadModal();
  6011. // 可以在这里添加实际的发布逻辑
  6012. console.log('发布作品:', {
  6013. type: selectedWorkType,
  6014. files: uploadedFiles,
  6015. designs: selectedDesigns,
  6016. title: document.getElementById('workTitle').value,
  6017. description: document.getElementById('workDescription').value,
  6018. tags: selectedTags,
  6019. visibility: document.querySelector('input[name="visibility"]:checked').value,
  6020. download: document.querySelector('input[name="download"]:checked').value
  6021. });
  6022. }
  6023. }
  6024. // 清空表单数据
  6025. function clearFormData() {
  6026. document.getElementById('workTitle').value = '';
  6027. document.getElementById('workDescription').value = '';
  6028. document.getElementById('customTag').value = '';
  6029. document.getElementById('uploadPreview').innerHTML = '';
  6030. document.querySelectorAll('.work-type').forEach(item => item.classList.remove('selected'));
  6031. document.querySelectorAll('.design-item').forEach(item => item.classList.remove('selected'));
  6032. document.querySelectorAll('.tag').forEach(item => item.classList.remove('selected'));
  6033. }
  6034. // 字符计数
  6035. document.addEventListener('DOMContentLoaded', function() {
  6036. const titleInput = document.getElementById('workTitle');
  6037. const descInput = document.getElementById('workDescription');
  6038. const titleCount = document.getElementById('titleCount');
  6039. const descCount = document.getElementById('descCount');
  6040. if (titleInput && titleCount) {
  6041. titleInput.addEventListener('input', function() {
  6042. titleCount.textContent = this.value.length;
  6043. });
  6044. }
  6045. if (descInput && descCount) {
  6046. descInput.addEventListener('input', function() {
  6047. descCount.textContent = this.value.length;
  6048. });
  6049. }
  6050. });
  6051. // 草稿箱功能
  6052. function showDrafts() {
  6053. document.getElementById('draftsModal').style.display = 'flex';
  6054. }
  6055. function closeDraftsModal() {
  6056. document.getElementById('draftsModal').style.display = 'none';
  6057. }
  6058. function editDraft(draftId) {
  6059. showNotification('编辑草稿: ' + draftId);
  6060. closeDraftsModal();
  6061. openUploadModal();
  6062. }
  6063. function deleteDraft(draftId) {
  6064. if (confirm('确定要删除这个草稿吗?')) {
  6065. showNotification('草稿已删除');
  6066. }
  6067. }
  6068. // 我的作品功能
  6069. function showMyWorks() {
  6070. document.getElementById('myWorksModal').style.display = 'flex';
  6071. }
  6072. function closeMyWorksModal() {
  6073. document.getElementById('myWorksModal').style.display = 'none';
  6074. }
  6075. function switchWorksTab(tab) {
  6076. document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
  6077. event.target.classList.add('active');
  6078. if (tab === 'published') {
  6079. document.getElementById('publishedWorks').style.display = 'block';
  6080. document.getElementById('analyticsWorks').style.display = 'none';
  6081. } else {
  6082. document.getElementById('publishedWorks').style.display = 'none';
  6083. document.getElementById('analyticsWorks').style.display = 'block';
  6084. }
  6085. }
  6086. function editWork(workId) {
  6087. showNotification('编辑作品: ' + workId);
  6088. closeMyWorksModal();
  6089. }
  6090. function deleteWork(workId) {
  6091. if (confirm('确定要删除这个作品吗?')) {
  6092. showNotification('作品已删除');
  6093. }
  6094. }
  6095. // 通知系统
  6096. function showNotification(title, message) {
  6097. // 创建通知元素
  6098. const notification = document.createElement('div');
  6099. notification.style.cssText = `
  6100. position: fixed;
  6101. top: 20px;
  6102. left: 50%;
  6103. transform: translateX(-50%);
  6104. background: linear-gradient(45deg, #ff6b6b, #ffa726);
  6105. color: white;
  6106. padding: 15px 20px;
  6107. border-radius: 25px;
  6108. box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  6109. z-index: 10000;
  6110. max-width: 300px;
  6111. text-align: center;
  6112. animation: slideDown 0.3s ease;
  6113. `;
  6114. notification.innerHTML = `
  6115. <div style="font-weight: 600; margin-bottom: 5px;">${title}</div>
  6116. <div style="font-size: 14px; opacity: 0.9;">${message}</div>
  6117. `;
  6118. // 添加滑入动画
  6119. const style = document.createElement('style');
  6120. style.textContent = `
  6121. @keyframes slideDown {
  6122. from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
  6123. to { transform: translateX(-50%) translateY(0); opacity: 1; }
  6124. }
  6125. `;
  6126. document.head.appendChild(style);
  6127. document.body.appendChild(notification);
  6128. // 3秒后自动移除
  6129. setTimeout(() => {
  6130. notification.style.animation = 'slideDown 0.3s ease reverse';
  6131. setTimeout(() => {
  6132. document.body.removeChild(notification);
  6133. }, 300);
  6134. }, 3000);
  6135. }
  6136. // 触摸手势支持
  6137. let startX, startY;
  6138. document.addEventListener('touchstart', function(e) {
  6139. startX = e.touches[0].clientX;
  6140. startY = e.touches[0].clientY;
  6141. });
  6142. document.addEventListener('touchend', function(e) {
  6143. if (!startX || !startY) return;
  6144. let endX = e.changedTouches[0].clientX;
  6145. let endY = e.changedTouches[0].clientY;
  6146. let diffX = startX - endX;
  6147. let diffY = startY - endY;
  6148. // 横向滑动切换轮播图
  6149. if (Math.abs(diffX) > Math.abs(diffY) && Math.abs(diffX) > 50) {
  6150. if (diffX > 0) {
  6151. nextSlide();
  6152. } else {
  6153. currentSlide = currentSlide > 0 ? currentSlide - 1 : 2;
  6154. updateSlider();
  6155. }
  6156. }
  6157. startX = startY = null;
  6158. });
  6159. // 页面可见性API - 当页面不可见时暂停动画
  6160. document.addEventListener('visibilitychange', function() {
  6161. if (document.hidden) {
  6162. clearInterval(slideInterval);
  6163. } else {
  6164. slideInterval = setInterval(nextSlide, 4000);
  6165. }
  6166. });
  6167. // 防止点击穿透
  6168. document.addEventListener('click', function(e) {
  6169. if (e.target.closest('.modal')) {
  6170. e.stopPropagation();
  6171. }
  6172. });
  6173. // 模态框外部点击关闭
  6174. document.getElementById('modal').addEventListener('click', function(e) {
  6175. if (e.target === this) {
  6176. closeModal();
  6177. }
  6178. });
  6179. // 设置模态框外部点击关闭
  6180. document.getElementById('settingsModal').addEventListener('click', function(e) {
  6181. if (e.target === this) {
  6182. closeSettingsModal();
  6183. }
  6184. });
  6185. // 初始化服装设计器
  6186. function initializeClothingDesigner() {
  6187. // 设置默认宝蓝色
  6188. selectClothingColor('宝蓝色');
  6189. // 设置默认选中整体
  6190. selectBodyPart('overall');
  6191. console.log('服装设计器已初始化,已加载', availableColors.length, '种颜色');
  6192. }
  6193. // 页面加载完成后初始化设计器
  6194. window.addEventListener('load', function() {
  6195. setTimeout(initializeClothingDesigner, 500);
  6196. });
  6197. // ============ 3D试衣间功能函数 ============
  6198. // 流程控制
  6199. let currentFittingStep = 'upload';
  6200. let selectedClothing = null;
  6201. let userPhoto = null;
  6202. function nextStep(stepName) {
  6203. // 隐藏当前步骤
  6204. document.getElementById(`${currentFittingStep}-step`).style.display = 'none';
  6205. // 显示下一步骤
  6206. document.getElementById(`${stepName}-step`).style.display = 'block';
  6207. // 更新流程导航状态
  6208. updateStepNavigation(stepName);
  6209. currentFittingStep = stepName;
  6210. showNotification('流程进度', `已进入${getStepTitle(stepName)}阶段`);
  6211. }
  6212. function previousStep(stepName) {
  6213. // 隐藏当前步骤
  6214. document.getElementById(`${currentFittingStep}-step`).style.display = 'none';
  6215. // 显示上一步骤
  6216. document.getElementById(`${stepName}-step`).style.display = 'block';
  6217. // 更新流程导航状态
  6218. updateStepNavigation(stepName);
  6219. currentFittingStep = stepName;
  6220. }
  6221. function updateStepNavigation(activeStep) {
  6222. document.querySelectorAll('.flow-step').forEach(step => {
  6223. step.classList.remove('active');
  6224. if (step.getAttribute('data-step') === activeStep) {
  6225. step.classList.add('active');
  6226. }
  6227. });
  6228. }
  6229. function getStepTitle(stepName) {
  6230. const titles = {
  6231. 'upload': '照片上传',
  6232. 'clothing': '服装选择',
  6233. 'fitting': '试衣展示'
  6234. };
  6235. return titles[stepName] || stepName;
  6236. }
  6237. // ============ 照片上传功能 ============
  6238. function selectUploadMethod(method) {
  6239. // 更新选择状态
  6240. document.querySelectorAll('.upload-method').forEach(m => m.classList.remove('active'));
  6241. document.querySelector(`[data-method="${method}"]`).classList.add('active');
  6242. // 显示对应界面
  6243. if (method === 'camera') {
  6244. document.getElementById('camera-mode').style.display = 'block';
  6245. document.getElementById('gallery-mode').style.display = 'none';
  6246. } else {
  6247. document.getElementById('camera-mode').style.display = 'none';
  6248. document.getElementById('gallery-mode').style.display = 'block';
  6249. }
  6250. showNotification('上传方式', `已选择${method === 'camera' ? '拍照模式' : '相册选择'}`);
  6251. }
  6252. function startCamera() {
  6253. showNotification('启动摄像头', '正在访问摄像头权限...');
  6254. // 模拟摄像头启动
  6255. setTimeout(() => {
  6256. document.querySelector('.camera-placeholder').innerHTML = `
  6257. <div class="camera-icon">📹</div>
  6258. <div class="camera-text">摄像头已启动</div>
  6259. <div class="camera-hint">请对准镜头保持正面站立</div>
  6260. `;
  6261. showNotification('摄像头就绪', '可以开始拍摄了!');
  6262. }, 1500);
  6263. }
  6264. function capturePhoto() {
  6265. showNotification('拍摄照片', '正在拍摄...');
  6266. // 模拟拍照效果
  6267. setTimeout(() => {
  6268. document.getElementById('pose-calibration').style.display = 'block';
  6269. simulatePoseDetection();
  6270. showNotification('拍摄成功', '正在进行姿势校准...');
  6271. }, 1000);
  6272. }
  6273. function switchCamera() {
  6274. showNotification('切换摄像头', '已切换到前置/后置摄像头');
  6275. }
  6276. function handlePhotoUpload(input) {
  6277. const file = input.files[0];
  6278. if (file) {
  6279. const reader = new FileReader();
  6280. reader.onload = function(e) {
  6281. userPhoto = e.target.result;
  6282. document.getElementById('crop-area').style.display = 'block';
  6283. showNotification('照片上传', '请调整裁剪区域');
  6284. };
  6285. reader.readAsDataURL(file);
  6286. }
  6287. }
  6288. function resetCrop() {
  6289. showNotification('重置裁剪', '已重置到原始尺寸');
  6290. }
  6291. function confirmCrop() {
  6292. document.getElementById('pose-calibration').style.display = 'block';
  6293. simulatePoseDetection();
  6294. showNotification('裁剪完成', '正在进行姿势校准...');
  6295. }
  6296. function simulatePoseDetection() {
  6297. const statuses = document.querySelectorAll('.status-item');
  6298. let currentIndex = 2; // 从身形分析开始
  6299. const updateStatus = () => {
  6300. if (currentIndex < statuses.length) {
  6301. const item = statuses[currentIndex];
  6302. const icon = item.querySelector('.status-icon');
  6303. icon.textContent = '✅';
  6304. currentIndex++;
  6305. if (currentIndex < statuses.length) {
  6306. setTimeout(updateStatus, 1000);
  6307. } else {
  6308. showNotification('校准完成', '人体姿势识别成功!');
  6309. }
  6310. }
  6311. };
  6312. setTimeout(updateStatus, 1000);
  6313. }
  6314. function recalibrate() {
  6315. // 重置状态
  6316. const statuses = document.querySelectorAll('.status-item');
  6317. statuses.forEach((item, index) => {
  6318. const icon = item.querySelector('.status-icon');
  6319. if (index >= 2) {
  6320. icon.textContent = '⏳';
  6321. }
  6322. });
  6323. simulatePoseDetection();
  6324. showNotification('重新校准', '正在重新分析姿势...');
  6325. }
  6326. // ============ 服装选择功能 ============
  6327. function switchClothingTab(tabName) {
  6328. // 更新标签状态
  6329. document.querySelectorAll('.clothing-tab').forEach(tab => tab.classList.remove('active'));
  6330. document.querySelector(`[data-tab="${tabName}"]`).classList.add('active');
  6331. // 显示对应内容
  6332. document.querySelectorAll('.clothing-content').forEach(content => {
  6333. content.style.display = 'none';
  6334. });
  6335. document.getElementById(`${tabName}-content`).style.display = 'block';
  6336. const tabNames = {
  6337. 'my-designs': '我的设计',
  6338. 'community': '社区热门',
  6339. 'brands': '品牌合作'
  6340. };
  6341. showNotification('切换分类', `已切换到${tabNames[tabName]}`);
  6342. }
  6343. function selectClothing(clothingId) {
  6344. selectedClothing = clothingId;
  6345. // 视觉反馈
  6346. document.querySelectorAll('.design-item, .trending-item, .brand-item').forEach(item => {
  6347. item.classList.remove('selected');
  6348. });
  6349. event.currentTarget.classList.add('selected');
  6350. showNotification('选择服装', '已选择该款设计,可以进行试穿了!');
  6351. }
  6352. // ============ 试衣展示功能 ============
  6353. let currentRotation = 0;
  6354. let currentLighting = 'natural';
  6355. let compareMode = 'split';
  6356. function rotateFitting(direction) {
  6357. if (direction === 'left') {
  6358. currentRotation -= 30;
  6359. } else if (direction === 'right') {
  6360. currentRotation += 30;
  6361. } else {
  6362. currentRotation = 0;
  6363. }
  6364. const viewport = document.querySelector('.fitting-viewport');
  6365. if (viewport) {
  6366. viewport.style.transform = `rotateY(${currentRotation}deg)`;
  6367. }
  6368. showNotification('旋转视角', `视角:${currentRotation}°`);
  6369. }
  6370. function setFittingLight(lightType) {
  6371. // 更新按钮状态
  6372. document.querySelectorAll('.lighting-btn').forEach(btn => btn.classList.remove('active'));
  6373. event.currentTarget.classList.add('active');
  6374. currentLighting = lightType;
  6375. const lightFilters = {
  6376. 'natural': 'brightness(1.1) contrast(1.05)',
  6377. 'indoor': 'brightness(0.9) sepia(0.1)',
  6378. 'studio': 'brightness(1.2) contrast(1.1) saturate(1.1)'
  6379. };
  6380. const viewport = document.querySelector('.fitting-viewport');
  6381. if (viewport) {
  6382. viewport.style.filter = lightFilters[lightType];
  6383. }
  6384. const lightNames = {
  6385. 'natural': '自然光',
  6386. 'indoor': '室内光',
  6387. 'studio': '摄影光'
  6388. };
  6389. showNotification('光照调节', `已切换到${lightNames[lightType]}`);
  6390. }
  6391. function toggleCompare(mode) {
  6392. // 更新按钮状态
  6393. document.querySelectorAll('.compare-btn').forEach(btn => btn.classList.remove('active'));
  6394. event.currentTarget.classList.add('active');
  6395. compareMode = mode;
  6396. const modeNames = {
  6397. 'split': '左右对比',
  6398. 'overlay': '叠加对比'
  6399. };
  6400. showNotification('对比模式', `已切换到${modeNames[mode]}`);
  6401. }
  6402. function retryFitting() {
  6403. showNotification('重新试穿', '正在重新进行智能贴合...');
  6404. // 模拟重新试穿过程
  6405. setTimeout(() => {
  6406. showNotification('试穿完成', '新的试穿效果已生成!');
  6407. }, 2000);
  6408. }
  6409. // ============ 输出功能 ============
  6410. function saveImageCard() {
  6411. showNotification('保存形象卡', '正在生成专属形象卡...');
  6412. setTimeout(() => {
  6413. showNotification('保存成功', '形象卡已保存到相册!');
  6414. }, 1500);
  6415. }
  6416. function shareToCommunity() {
  6417. showNotification('分享到社区', '正在上传到设计社区...');
  6418. setTimeout(() => {
  6419. showNotification('分享成功', '已分享到社区,快去看看大家的反应吧!');
  6420. }, 2000);
  6421. }
  6422. function buyNow() {
  6423. if (!selectedClothing) {
  6424. showNotification('购买提醒', '请先选择要购买的服装');
  6425. return;
  6426. }
  6427. showNotification('跳转购买', '正在跳转到购买页面...');
  6428. setTimeout(() => {
  6429. showNotification('购买页面', '已为您打开购买链接!');
  6430. }, 1000);
  6431. }
  6432. // ============ 试衣间初始化 ============
  6433. function initializeFittingRoom() {
  6434. // 设置默认状态
  6435. currentFittingStep = 'upload';
  6436. selectUploadMethod('camera');
  6437. switchClothingTab('my-designs');
  6438. console.log('3D试衣间已初始化');
  6439. }
  6440. // 页面加载时初始化试衣间
  6441. document.addEventListener('DOMContentLoaded', function() {
  6442. if (document.getElementById('ar-page')) {
  6443. initializeFittingRoom();
  6444. }
  6445. });
  6446. </script>
  6447. </body>
  6448. </html>