product.vue 191 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100
  1. <<<<<<< HEAD
  2. <template>
  3. <view
  4. class="product "
  5. :style="{
  6. paddingBottom: userIdentity == 1 && userIdentity == 3 ? '0rpx' : '188rpx',
  7. paddingTop: CustomBar + 'px'
  8. }"
  9. >
  10. <custom-p
  11. v-if="isHeaderPoduct"
  12. :systeminfo="systeminfo"
  13. :navbar-data="nvabarData"
  14. :headerBtnPosi="headerBtnPosi"
  15. :headerColor="headerColor"
  16. :type="isShareType"
  17. :page="backPage"
  18. ></custom-p>
  19. <view
  20. class="product-topnav"
  21. id="topBar"
  22. v-show="isNavbarFiexd"
  23. :class="navbarFiexd"
  24. :style="{ top: CustomBar - 2 + 'px' }"
  25. >
  26. <view class="search-input">
  27. <view class="gosearch-btn" :class="navbarFiexd" @click="this.$api.navigateTo(clickPath)">
  28. <view class="search-icon"><text class="iconfont icon-iconfonticonfontsousuo1"></text></view>
  29. <view class="search-text">搜索商品/项目仪器</view>
  30. </view>
  31. </view>
  32. <view class="navbar">
  33. <view
  34. class="nav-item tui-skeleton-fillet"
  35. :class="{ current: tabCurrentIndex === 0 }"
  36. @click="tabClick(0)"
  37. >
  38. <text>详情</text>
  39. <text class="line"></text>
  40. </view>
  41. <view
  42. class="nav-item tui-skeleton-fillet"
  43. :class="{ current: tabCurrentIndex === 1 }"
  44. @click="tabClick(1)"
  45. >
  46. <text>服务项目</text>
  47. <text class="line"></text>
  48. </view>
  49. <view
  50. class="nav-item tui-skeleton-fillet"
  51. :class="{ current: tabCurrentIndex === 2 }"
  52. @click="tabClick(2)"
  53. v-if="product.qualificationImg"
  54. >
  55. <text>商品资质</text>
  56. <text class="line"></text>
  57. </view>
  58. <view
  59. class="nav-item tui-skeleton-fillet"
  60. :class="{ current: tabCurrentIndex === 3 }"
  61. @click="tabClick(3)"
  62. >
  63. <text>推荐</text>
  64. <text class="line"></text>
  65. </view>
  66. <view
  67. class="nav-item tui-skeleton-fillet"
  68. :class="{ current: tabCurrentIndex === 4 }"
  69. @click="tabClick(4)"
  70. v-if="product.archiveId !== 0"
  71. >
  72. <text>相关资料</text>
  73. <text class="line"></text>
  74. </view>
  75. </view>
  76. </view>
  77. <tui-skeleton
  78. v-if="skeletonShow"
  79. backgroundColor="#fafafa"
  80. borderRadius="10rpx"
  81. :isLoading="true"
  82. :loadingType="5"
  83. ></tui-skeleton>
  84. <template v-else>
  85. <view class="cart-content empty" v-if="isInvalid">
  86. <view class="empty-container">
  87. <image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
  88. <text class="error-text">商品已失效,去商城逛逛别的吧~</text>
  89. <view class="login-btn" @click="goIndex">去商城</view>
  90. </view>
  91. </view>
  92. <view class="container-product tui-skeleton" v-else>
  93. <view class="container-product-main">
  94. <view class="product-top">
  95. <view class="banner-section">
  96. <!-- <view class="cm-product-tags"> -->
  97. <!-- <view class="cm-product-cover" v-if="product.appletsActType === 1"
  98. >云上美博会</view
  99. > -->
  100. <view class="cm-product-type" v-if="product.productType == 2">医疗器械</view>
  101. <view class="cm-product-cover" v-if="product.appletsActType === 1"></view>
  102. <!-- </view> -->
  103. <uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode">
  104. <swiper
  105. class="banner tui-banner tui-skeleton-rect"
  106. @change="swiperChange"
  107. :duration="800"
  108. :autoplay="false"
  109. :circular="true"
  110. >
  111. <swiper-item v-for="(item, index) in productImage" :key="index" class="banner-item">
  112. <image :src="item" @click="previewImg(index)" class="product-img" />
  113. </swiper-item>
  114. </swiper>
  115. <view class="swiper__dots-box">
  116. <tui-tag
  117. padding="12rpx 24rpx"
  118. type="translucent"
  119. shape="circleLeft"
  120. size="32rpx"
  121. :scaleMultiple="0.82"
  122. originRight
  123. >
  124. {{ current + 1 }}/{{ productImage && productImage.length }}
  125. </tui-tag>
  126. </view>
  127. </uni-swiper-dot>
  128. </view>
  129. <view class="product-wrap clearfix">
  130. <view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
  131. <view class="wrap-top-price">
  132. <cm-price
  133. v-if="isRequest"
  134. :product="product"
  135. :userIdentity="userIdentity"
  136. :shopID="shopID"
  137. :promotions="product.promotions"
  138. :ladderPriceList="ladderPriceList"
  139. />
  140. </view>
  141. <view class="p-title tui-skeleton-fillet">
  142. <view class="mclap-tag" v-if="product.beautyActFlag == '1'">美博会</view>
  143. <view class="p-title-name" :class="product.beautyActFlag == '1' ? 'indent' : ''">
  144. {{ product.name == undefined ? '' : product.name }}
  145. </view>
  146. <button
  147. open-type="share"
  148. class="p-title-share tui-share-position"
  149. @tap="onShare"
  150. v-if="userInfo.userIdentity !== 1"
  151. >
  152. <view class=""><text class="iconfont icon-fenxiang1"></text></view>
  153. <view class="">分享</view>
  154. </button>
  155. <button class="p-title-share tui-share-position" @click="handleShare" v-else>
  156. <view class=""><text class="iconfont icon-fenxiang1"></text></view>
  157. <view class="">分享</view>
  158. </button>
  159. </view>
  160. <view class="wrap-label" v-if="product.tagsList && product.tagsList.length > 0">
  161. <view
  162. class="label-a tui-skeleton-fillet"
  163. v-for="(label, index) in product.tagsList"
  164. :key="index"
  165. >
  166. {{ label }}
  167. </view>
  168. </view>
  169. <view class="product-seve" v-if="hasLogin">
  170. <text class="label">采美承诺:</text>
  171. <text class="iconfont icon-dui tui-skeleton-rect">
  172. <text class="text">无忧退货</text>
  173. </text>
  174. <text class="iconfont icon-dui tui-skeleton-rect">
  175. <text class="text">快速退款</text>
  176. </text>
  177. <text class="iconfont icon-dui tui-skeleton-rect">
  178. <text class="text">正品保证</text>
  179. </text>
  180. </view>
  181. <view
  182. class="productRemarks"
  183. v-if="product.productRemarks != '' && product.productRemarks != null"
  184. >
  185. 备注:{{ product.productRemarks }}
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. <view class="product-item-none" v-if="goodsData.isNoneDisabled">
  191. <image class="none-image" :src="productNoneImage" mode=""></image>
  192. <view class="none-text">此商品已{{ goodsData.disabledText }},请浏览以下推荐商品~</view>
  193. <view class="none-text">咨询类似商品,请联系客服!</view>
  194. </view>
  195. <!-- 选择规格 -->
  196. <view class="product-parameter" v-if="isShowButton || userIdentity === 1" @click="showPopup(3)">
  197. <text class="title">选择:</text>
  198. <text class="name">共{{ skusCount }}种规格可选</text>
  199. <text class="iconfont icon-xiayibu"></text>
  200. </view>
  201. <!-- 参数 -->
  202. <view class="product-parameter" @click="showPopup(0)" v-if="!goodsData.isNoneDisabled">
  203. <text class="title">参数:</text>
  204. <text class="name">品牌 分类...</text>
  205. <text class="iconfont icon-xiayibu"></text>
  206. </view>
  207. <!-- 特殊商品退货须知 -->
  208. <view class="return-instructions" v-if="returnGoodsStutas">
  209. <cm-return-instructions :content="helpContent"></cm-return-instructions>
  210. </view>
  211. <!-- 配套商品 -->
  212. <view
  213. class="product-supporting"
  214. v-if="!goodsData.isNoneDisabled && isShowSupportingList && supportingList.length > 0"
  215. @click.stop="handleSupporting"
  216. >
  217. <view class="product-supporting-title">配套商品({{ supportingNum }})</view>
  218. <view class="product-supporting-list">
  219. <view
  220. class="list"
  221. v-for="(supporting, index) in supportingList"
  222. :key="index"
  223. v-if="index < 4"
  224. >
  225. <image class="list-image" :src="supporting.image" mode=""></image>
  226. </view>
  227. <text class="iconfont icon-xiayibu"></text>
  228. </view>
  229. </view>
  230. <!-- 优惠券 -->
  231. <view
  232. class="product-parameter coupon"
  233. v-if="isShowButton && productCoupon.length > 0"
  234. @click="showPopup(2)"
  235. >
  236. <text class="title">优惠券:</text>
  237. <view class="coupon">
  238. <text class="tags" v-for="(coupon, index) in productCoupon.slice(0, 3)" :key="index">
  239. 满{{ coupon.touchPrice }}减{{ coupon.couponAmount }}
  240. </text>
  241. </view>
  242. <text class="iconfont icon-xiayibu"></text>
  243. </view>
  244. <!-- 仪器培训方案 -->
  245. <view
  246. class="product-parameter"
  247. @click="showPopup(1)"
  248. v-if="product.commodityType == 2 && product.trainingMethod"
  249. >
  250. <text class="title">培训方案:</text>
  251. <text class="name">{{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}</text>
  252. <text class="iconfont icon-xiayibu"></text>
  253. </view>
  254. <!-- 供应商 -->
  255. <view class="product-supplier" @click="goSupplier">
  256. <view class="logo">
  257. <img
  258. :src="
  259. shop.logo
  260. ? shop.logo
  261. : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'
  262. "
  263. alt=""
  264. />
  265. </view>
  266. <view class="main">
  267. <view class="name">{{ shop.name }}</view>
  268. <view class="massgs">
  269. <view class="label">满意度:</view>
  270. <view class="p-stars">
  271. <uni-stars
  272. :stars="6"
  273. :iconClass="iconClass"
  274. :iconColor="iconColor"
  275. :fontSize="36"
  276. :widthInfo="176"
  277. ></uni-stars>
  278. </view>
  279. <view class="acount">
  280. <text>{{ shop.normalNum }}</text>
  281. 件商品
  282. </view>
  283. </view>
  284. </view>
  285. <view class="right" v-if="!isShowCaimeiShop"><text class="iconfont icon-xiayibu"></text></view>
  286. </view>
  287. </view>
  288. <!-- 商品详情 -->
  289. <view v-show="tabCurrentIndex !== 3">
  290. <view class="product-details product-details0">
  291. <view class="title"><view class="title-tab">商品详情</view></view>
  292. <view class="content tui-banner product-rich-text tui-skeleton-rect">
  293. <template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
  294. <mp-html :content="html" :tag-style="tagStyle" />
  295. </template>
  296. <view class="product-rich-text-none" v-else>暂无商品信息</view>
  297. </view>
  298. </view>
  299. <!-- 服务项目 -->
  300. <view class="product-details service product-details1">
  301. <view class="title"><view class="title-tab">服务项目</view></view>
  302. <view
  303. class="content service"
  304. v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo"
  305. >
  306. <cm-service :product="product.productDetail" v-if="isRequest"></cm-service>
  307. </view>
  308. <view class="content-none" v-else><text>暂无服务项目</text></view>
  309. </view>
  310. <!-- 商品资质 -->
  311. <view class="product-details qualifications product-details2" v-if="product.qualificationImg">
  312. <view class="title"><view class="title-tab">商品资质</view></view>
  313. <view class="product-details-image">
  314. <view class="product-details-table clearfix" v-if="product.qualificationNo">
  315. <view class="ladder-tr">
  316. <view class="ladder-item-td th">证书编号</view>
  317. <view class="ladder-item-td th">产品名称</view>
  318. <view class="ladder-item-td th">详情</view>
  319. </view>
  320. <view class="ladder-tr">
  321. <view class="ladder-item-td">
  322. <view class="te-text">{{ product.qualificationNo }}</view>
  323. </view>
  324. <view class="ladder-item-td">
  325. <view class="te-text">{{ product.productName }}</view>
  326. </view>
  327. <view class="ladder-item-td">
  328. <view class="te-text last">{{ product.qualificationLink }}</view>
  329. <view class="te-copy">
  330. <text class="clipboard" @click.stop="clipboard(product.qualificationLink)">
  331. 复制
  332. </text>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. <image
  338. class="qualificationImg-image"
  339. :src="product.qualificationImg"
  340. mode="aspectFill"
  341. @click="previewImg1(product.qualificationImg)"
  342. ></image>
  343. </view>
  344. </view>
  345. <!-- 相关推荐 -->
  346. <view class="product-details recommend product-details3">
  347. <view class="title"><view class="title-tab">相关推荐</view></view>
  348. <view class="content hot">
  349. <cm-recommend
  350. :query-productid="product.productId"
  351. :query-type="product.recommendType"
  352. v-if="isRequest"
  353. ></cm-recommend>
  354. </view>
  355. </view>
  356. </view>
  357. <!-- 相关资料 -->
  358. <view class="product-details recommend product-details4" v-if="tabCurrentIndex === 4">
  359. <cm-product-doc
  360. @previewImage="changePreViewImageStatus"
  361. :archiveId="product.archiveId"
  362. :userId="userId"
  363. ></cm-product-doc>
  364. </view>
  365. <!-- 优惠券 -->
  366. <tui-bottom-popup :radius="true" :show="popupShow2" @close="hidePopup(2)">
  367. <view class="tui-popup-box clearfix">
  368. <view class="title">优惠券</view>
  369. <view class="tui-popup-close" @click="hidePopup(2)">
  370. <text class="iconfont icon-iconfontguanbi"></text>
  371. </view>
  372. <view class="tui-popup-tabs">
  373. <coupon-tabs
  374. :tabs="navbar"
  375. :currentTab="currentTab > 2 ? 0 : currentTab"
  376. @change="couponChange"
  377. :itemWidth="100 / navbar.length + '%'"
  378. selectedColor="#FF5B00"
  379. sliderBgColor="#FF5B00"
  380. ></coupon-tabs>
  381. </view>
  382. <div class="tui-popup-main coupon">
  383. <scroll-view class="tui-popup-scroll" scroll-y="true">
  384. <view class="coupon-empty" v-if="isCouponEmpty">
  385. <image
  386. class="empty-container-image"
  387. :src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"
  388. ></image>
  389. <text class="error-text">暂无可领的优惠券~</text>
  390. </view>
  391. <template v-else>
  392. <view
  393. v-for="(coupon, index) in productCouponList"
  394. :key="index"
  395. :id="coupon.couponId"
  396. class="coupon-list"
  397. >
  398. <view class="list-cell-le">
  399. <view class="coupon-maxMoney">
  400. <text class="small">¥</text>
  401. {{ coupon.couponAmount }}
  402. </view>
  403. <view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
  404. </view>
  405. <view class="list-cell-ri">
  406. <view class="list-cell-top">
  407. <view class="list-cell-type">
  408. <view class="list-cell-tags">
  409. <template v-if="coupon.moneyCouponFlag == 1">
  410. <text class="tags" v-if="coupon.moneyCouponType == 1">
  411. 意向{{ coupon.couponType | TypeFormat }}
  412. </text>
  413. <text class="tags" v-else>
  414. 定向{{ coupon.couponType | TypeFormat }}
  415. </text>
  416. </template>
  417. <template v-else>
  418. <text class="tags">
  419. {{ coupon.couponType | TypeFormat }}
  420. </text>
  421. </template>
  422. </view>
  423. <view class="list-cell-texts">
  424. <text v-if="coupon.couponType == 0">
  425. {{
  426. coupon.productType && coupon.productType == 1
  427. ? '全商城商品通用'
  428. : '仅可购买指定商品'
  429. }}
  430. </text>
  431. <text v-if="coupon.couponType == 1">
  432. {{
  433. coupon.categoryType == 1
  434. ? '仅限购买产品类商品'
  435. : '仅限购买仪器类商品'
  436. }}
  437. </text>
  438. <text v-if="coupon.couponType == 3">
  439. 仅限购买店铺【{{ coupon.shopName }}】的商品
  440. </text>
  441. <text v-if="coupon.couponType == 4 || coupon.couponType == 2">
  442. 全商城商品通用
  443. </text>
  444. </view>
  445. </view>
  446. <view class="list-cell-btn">
  447. <view class="icon-used">
  448. <template v-if="coupon.couponBtnType == 0">
  449. <template v-if="coupon.couponPayWay == 2">
  450. <view class="icon-used-text">
  451. {{ coupon.moneyCouponPrice }}采美豆
  452. </view>
  453. <view
  454. class="icon-used-btn receive"
  455. @click="toDeductCoupon(coupon)"
  456. >
  457. 抵扣
  458. </view>
  459. </template>
  460. <template v-else-if="coupon.couponPayWay == 1">
  461. <view class="icon-used-text">购买</view>
  462. <view
  463. class="icon-used-btn receive"
  464. @click="toPayCoupon(coupon)"
  465. >
  466. ¥{{ coupon.moneyCouponPrice }}
  467. </view>
  468. </template>
  469. <template v-else>
  470. <view
  471. class="icon-used-btn receive"
  472. @click="receiveCoupon(coupon)"
  473. >
  474. 领取
  475. </view>
  476. </template>
  477. </template>
  478. <view
  479. class="icon-used-btn make"
  480. v-if="coupon.couponBtnType == 1"
  481. >
  482. 已领取
  483. </view>
  484. </view>
  485. </view>
  486. </view>
  487. <view class="list-cell-time">
  488. {{ coupon.startDate }} - {{ coupon.endDate }}
  489. </view>
  490. </view>
  491. </view>
  492. </template>
  493. </scroll-view>
  494. </div>
  495. </view>
  496. </tui-bottom-popup>
  497. <!-- 培训方案 -->
  498. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  499. <view class="tui-popup-box clearfix">
  500. <view class="title">培训方案</view>
  501. <div class="tui-popup-main">
  502. <scroll-view class="tui-popup-scroll train" scroll-y="true">
  503. <view class="content-tr">
  504. <view class="content-td">培训方式:</view>
  505. <view class="content-th">
  506. {{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}
  507. </view>
  508. </view>
  509. <view class="content-tr">
  510. <view class="content-td">培训费用:</view>
  511. <view class="content-th">
  512. {{ product.trainingType == 1 ? '¥' + product.trainingFee : '售价已包含' }}
  513. </view>
  514. </view>
  515. </scroll-view>
  516. </div>
  517. <view
  518. class="tui-right-flex tui-popup-btn"
  519. :style="{ paddingBottom: isIphoneX ? '68rpx' : '.34rpx' }"
  520. >
  521. <view class="tui-flex-1"><view class="tui-button" @click="hidePopup(1)">收起</view></view>
  522. </view>
  523. </view>
  524. </tui-bottom-popup>
  525. <!-- 底部按钮 -->
  526. <view class="menu" v-if="isShowButton">
  527. <view class="bottom-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  528. <view class="bottom-le">
  529. <view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
  530. <image src="../../static/icon-home-active@3x.png"></image>
  531. <text>首页</text>
  532. </view>
  533. <view class="item-bt" @click="handleCollection">
  534. <image
  535. :src="
  536. collectionType
  537. ? StaticUrl + 'icon/icon-collection@2x.png'
  538. : StaticUrl + 'icon/icon-collection-none@2x.png'
  539. "
  540. ></image>
  541. <text>{{ collectionType ? '已收藏' : '收藏' }}</text>
  542. </view>
  543. <view class="item-bt" @click="buyProductCart()">
  544. <image src="https://static.caimei365.com/app/img/icon/icon-cart-active@3x.png"></image>
  545. <text>购物车</text>
  546. <text
  547. v-if="hasLogin && bottomCartNumber > 0"
  548. class="uni-badge uni-badge-error uni-small uni-badge--small icon-num"
  549. :class="[bottomCartNumber < 10 ? 'goleft' : '']"
  550. >
  551. {{ bottomCartNumber >= 100 ? '99+' : bottomCartNumber }}
  552. </text>
  553. <view class="animation-num" :class="isAnimation ? 'animation' : 'restion'">+1</view>
  554. </view>
  555. </view>
  556. <view class="bottom-ri">
  557. <button
  558. :disabled="goodsData.disabled"
  559. class="btn btn-cart"
  560. :class="[goodsData.disabled ? 'disabled' : '']"
  561. @tap.stop="btnGetConfirm('add')"
  562. >
  563. 加入购物车
  564. </button>
  565. <button
  566. :disabled="goodsData.disabled"
  567. class="btn btn-bay"
  568. :class="[goodsData.disabled ? 'disabled' : '']"
  569. @tap.stop="btnGetConfirm('buy')"
  570. >
  571. 立即购买
  572. </button>
  573. </view>
  574. </view>
  575. </view>
  576. <!-- 侧边 -->
  577. <scroll-top :isScrollTop="isScrollTop" :bottom="200" v-show="tabCurrentIndex !== 3"></scroll-top>
  578. </view>
  579. </template>
  580. <!-- 商品参数 -->
  581. <cm-prams-popup v-if="popupShow0" :popupShow="popupShow0" :product="product"></cm-prams-popup>
  582. <!-- 选择规格弹窗 -->
  583. <cm-unit-popup
  584. v-if="popupShow3"
  585. :popupShow="popupShow3"
  586. :skuProduct="skuProduct"
  587. :productCoupon="productCoupon"
  588. :type="unitPopupType"
  589. :btnType="btnType"
  590. :goodsData="goodsData"
  591. @buyConfirm="handleBuyConfirm"
  592. @skuClick="handleSkuClick"
  593. ></cm-unit-popup>
  594. <!-- 弹窗提示 -->
  595. <tui-modal
  596. :show="modal"
  597. @click="handleClick"
  598. @cancel="hideMobel"
  599. :content="contentModalText"
  600. :button="modalButton"
  601. color="#333"
  602. :size="32"
  603. shape="circle"
  604. :maskClosable="false"
  605. ></tui-modal>
  606. <!-- 商品详情可见度弹窗提醒 -->
  607. <cm-product-modal
  608. v-if="showModal"
  609. :showModal="showModal"
  610. :commodityDetailsFlag="product.commodityDetailsFlag"
  611. :isShareType="isShareType"
  612. :userIdentity="userIdentity"
  613. :firstClubType="firstClubType"
  614. />
  615. <!-- ross弹窗 -->
  616. <cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml"></cmRossPopup>
  617. <!-- 分享弹窗 -->
  618. <cm-share-popup ref="sharePopup" :data="posterData" type="product"></cm-share-popup>
  619. <!-- 协销名片 -->
  620. <cm-seller-modal :suid="suid"></cm-seller-modal>
  621. </view>
  622. </template>
  623. <script>
  624. import { mapState, mapMutations } from 'vuex'
  625. import customP from './components/cm-header.vue' //自定义导航
  626. import cmPrice from './components/cm-price.vue' //价格显示
  627. import cmAttributes from './components/cm-attributes.vue' //规格信息
  628. import cmRecommend from './components/recommend' //相关推荐
  629. import cmParameter from './components/cm-parameter' //相关参数
  630. import cmService from './components/cm-service' //服务项目
  631. import cmProductDoc from './components/cm-product-doc.vue'
  632. import cmProductModal from './components/cm-product-modal.vue'
  633. import cmPramsPopup from './components/cm-prams-popup.vue'
  634. import cmUnitPopup from './components/cm-unit-popup.vue'
  635. import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
  636. import cmRossPopup from '@/components/cm-module/cm-ross/cm-ross-popup'
  637. import cmReturnInstructions from './components/cm-return-instructions.vue'
  638. import authorize from '@/common/config/authorize.js'
  639. import wxLogin from '@/common/config/wxLogin.js'
  640. import { debounce } from '@/common/config/common.js'
  641. import payMixins from '@/mixins/payMixins.js'
  642. import proMixins from './mixins/proMixins.js'
  643. import cmSrsMixins from '@/utils/cmSrsMixins.js'
  644. import thorui from '@/components/clipboard/clipboard.thorui.js'
  645. import cmSharePopup from '@/components/cm-share-popup/cm-share-popup.vue'
  646. import cmSellerModal from '@/components/cm-share-popup/cm-seller-modal.vue'
  647. import { queryParse } from './mixins/share.helper.js'
  648. var isPreviewImg
  649. export default {
  650. mixins: [payMixins, proMixins, cmSrsMixins],
  651. components: {
  652. customP,
  653. cmRecommend,
  654. cmPrice,
  655. cmAttributes,
  656. cmParameter,
  657. cmService,
  658. couponTabs,
  659. cmProductDoc,
  660. cmPramsPopup,
  661. cmUnitPopup,
  662. cmProductModal,
  663. cmRossPopup,
  664. cmReturnInstructions,
  665. cmSharePopup,
  666. cmSellerModal
  667. },
  668. data() {
  669. return {
  670. StaticUrl: this.$Static, //静态图片路径
  671. clickPath: '/pages/search/search',
  672. html: '',
  673. productNoneImage: 'https://static.caimei365.com/app/img/icon/icon-pnone.png',
  674. mode: 'round',
  675. iconClass: 'icon-aixin',
  676. iconColor: '#ff9100',
  677. specClass: '', // 规格弹窗css类,控制开关动画
  678. isBtnType: '',
  679. isRequest: false,
  680. isScrollTop: false,
  681. current: 0,
  682. isShareType: '',
  683. isHeaderPoduct: false,
  684. isNavbarFiexd: false,
  685. navbarFiexd: 'none',
  686. ladderPriceFlag: '',
  687. ladderPriceList: '',
  688. isInvalid: false,
  689. isEvaluate: false,
  690. isAnimation: false,
  691. skeletonShow: true,
  692. isStock: false,
  693. disabled: false,
  694. isNoneDisabled: false,
  695. tabCurrentIndex: 0,
  696. userId: 0,
  697. shopId: 0,
  698. shopID: 0,
  699. typeId: 0,
  700. vipFlag: 0,
  701. firstClubType: 0,
  702. productId: 0,
  703. skusCount: 0, // 规格种类
  704. userIdentity: 0, // 用户类型
  705. goodsData: {}, // 自定义数据
  706. shop: {}, //供应商信息
  707. product: {}, //采美
  708. productImage: [],
  709. retailPrice: 0,
  710. stock: 0,
  711. number: 0,
  712. minBuyNumber: 0,
  713. productsList: [],
  714. goodListData: [],
  715. productCoupon: [], // 优惠券
  716. productCouponList: [], // 优惠券弹窗列表
  717. headerBtnPosi: this.setHeaderBtnPosi(), // 获取设备顶部胶囊高度
  718. systeminfo: this.setSysteminfo(), // 获取设备信息
  719. windowHeight: '',
  720. headerColor: false,
  721. backPage: 1,
  722. nvabarData: {
  723. // 顶部自定义导航
  724. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  725. title: '' // 导航栏 中间的标题
  726. },
  727. linkPath: '',
  728. CustomBar: this.CustomBar, // 顶部导航栏高度
  729. popupShow0: false, // 参数弹窗
  730. popupShow1: false, // 培训方案
  731. popupShow2: false, // 优惠券
  732. popupShow3: false, // 购买弹窗
  733. tabSelectFlag: false,
  734. sectionPropsArr: [],
  735. scrollTopArray: [],
  736. winHeight: '',
  737. isShowButton: true,
  738. isCouponEmpty: false,
  739. currentTab: 0,
  740. couponParam: {
  741. // 获取弹窗优惠券领取参数
  742. userId: 0,
  743. productId: 0,
  744. status: 1,
  745. source: 2
  746. },
  747. bottomCartNumber: 0,
  748. navbar: [{ name: '未领取', num: 0 }, { name: '已领取', num: 0 }],
  749. isPreviewImage: false,
  750. opentype: '',
  751. collectionType: false,
  752. isShowSupportingList: false,
  753. supportingList: [],
  754. supportingNum: 0, // 组合商品总数
  755. contentModalText: '', //操作文字提示语句
  756. modal: false,
  757. modalButton: [
  758. {
  759. text: '取消',
  760. type: 'gray',
  761. plain: true //是否空心
  762. },
  763. {
  764. text: '去升级',
  765. customStyle: {
  766. color: '#fff',
  767. bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
  768. },
  769. plain: false
  770. }
  771. ],
  772. showModal: false,
  773. isShowCaimeiShop: false,
  774. unitPopupType: 0, // 选择类型 1 点击加入购物车 立即购买 2:点击规格选择
  775. returnGoodsStutas: false,
  776. helpContent: '',
  777. posterData: {}, // 商品详情
  778. suid: 0, // 协销id
  779. scene: {}, //获取二维码参数
  780. options: {}
  781. }
  782. },
  783. computed: {
  784. ...mapState(['hasLogin', 'clubType', 'identity', 'isIphoneX', 'userInfo'])
  785. },
  786. filters: {
  787. TypeFormat(value) {
  788. switch (value) {
  789. case 0:
  790. return '活动券'
  791. break
  792. case 1:
  793. return '品类券'
  794. break
  795. case 2:
  796. return '用户专享券'
  797. break
  798. case 3:
  799. return '店铺券'
  800. break
  801. case 4:
  802. return '新用户券'
  803. break
  804. }
  805. }
  806. },
  807. watch: {
  808. isNavbarFiexd(val) {
  809. if (!this.isRequest || !val) return
  810. let timer = null
  811. clearTimeout(timer)
  812. timer = setTimeout(() => {
  813. if (this.sectionPropsArr.length > 0) return
  814. this.getSectionProps()
  815. }, 200)
  816. }
  817. },
  818. onLoad(option) {
  819. if (option.scene) {
  820. // 识别小程序二维码
  821. this.scene = queryParse(decodeURIComponent(option.scene)) // 转码
  822. }
  823. this.productId = this.couponParam.productId = this.addParams.productId = this.handleProsId =
  824. option.id || this.scene.id //获取商品ID
  825. if (option.typeId) {
  826. this.typeId = option.typeId
  827. }
  828. this.opentype = option.open
  829. this.isShareType = option.type
  830. this.linkPath = option.path
  831. this.isHeaderPoduct = true
  832. if (option.page == 2) {
  833. this.backPage = option.page
  834. }
  835. this.options = option.scene ? this.scene : option
  836. this.getWinHeight()
  837. },
  838. onReady() {
  839. if (this.opentype == 'caimei') {
  840. // 跳转到资料详情
  841. uni.showLoading({
  842. title: '加载中'
  843. })
  844. setTimeout(() => {
  845. this.isNavbarFiexd = true
  846. this.tabClick(3)
  847. uni.hideLoading()
  848. }, 2000)
  849. }
  850. console.log('是iPhoneX', this.isIphoneX)
  851. },
  852. methods: {
  853. async initGetStotage() {
  854. // 初始化
  855. const userInfo = await this.$api.getStorage()
  856. this.userId = this.couponParam.userId = this.addParams.userId = userInfo.userId ? userInfo.userId : 0
  857. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  858. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  859. this.shopID = userInfo.shopId ? userInfo.shopId : 0
  860. this.firstClubType = this.clubType
  861. if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
  862. this.isShowButton = true
  863. } else {
  864. this.isShowButton = false
  865. }
  866. if (isPreviewImg) {
  867. isPreviewImg = false
  868. return
  869. } else {
  870. this.initData()
  871. }
  872. },
  873. initData() {
  874. // 初始化商品详情查询
  875. this.ProductService.QueryProductDetils({
  876. userId: this.userId,
  877. productId: this.productId,
  878. identity: this.identity,
  879. typeId: this.typeId
  880. })
  881. .then(response => {
  882. let productLabel = ''
  883. this.productImage = []
  884. this.shop = response.data.shop
  885. this.shopId = response.data.shopId
  886. const dataStr = JSON.stringify(response.data)
  887. this.product = JSON.parse(dataStr)
  888. this.skuProduct = JSON.parse(dataStr)
  889. this.skusCount = this.product.skus.length
  890. this.addParams.skuId = this.product.skuId
  891. if (this.product.tinyTypeName) {
  892. productLabel = this.product.tinyTypeName
  893. } else if (!this.product.tinyTypeName && this.product.smallTypeName) {
  894. productLabel = this.product.smallTypeName
  895. } else {
  896. productLabel = this.product.bigTypeName
  897. }
  898. //设置统计数据标签
  899. if (this.product.relatedLabels) {
  900. uni.setStorageSync('productLabel', this.product.relatedLabels)
  901. } else {
  902. uni.setStorageSync(
  903. 'productLabel',
  904. `${productLabel}-${this.product.brandName ? this.product.brandName : ''}`
  905. )
  906. }
  907. //校验是否为ross
  908. this.checkedIsRossSet()
  909. //判断是否可以跳转供应商主页
  910. if (this.product.shopType === 2) {
  911. this.isShowCaimeiShop = true
  912. }
  913. // 判断是否显示已收藏
  914. if (this.product.userLike && this.product.userLike == 1) {
  915. this.collectionType = true
  916. } else {
  917. this.collectionType = false
  918. }
  919. //已删除/已冻结
  920. if (this.product.validFlag === 0 || this.product.validFlag == 10) {
  921. this.isInvalid = true
  922. } else if (this.product.validFlag === 9) {
  923. if (this.userIdentity == 1) {
  924. this.isInvalid = false
  925. } else {
  926. this.isInvalid = true
  927. }
  928. }
  929. this.ladderPriceFlag = this.product.ladderPriceFlag
  930. this.html = this.adaptRichTextImg(this.product)
  931. this.stock = this.product.stock
  932. this.number = this.product.minBuyNumber
  933. this.minBuyNumber = this.product.minBuyNumber
  934. //处理商品图片列表
  935. this.product.imageList.forEach(item => {
  936. this.productImage.push(item.image)
  937. })
  938. //处理阶梯价格
  939. if (this.product.ladderPriceList != null) {
  940. this.ladderPriceList = this.product.ladderPriceList
  941. }
  942. //拆分金额并转千分位格式显示
  943. if (this.product.price != null) {
  944. this.retailPrice = this.product.price.toFixed(2)
  945. }
  946. //处理下架商品和售罄商品
  947. if (this.product.validFlag == 3 || this.product.saleOutFlag === 1) {
  948. this.isNoneDisabled = true
  949. this.disabled = true
  950. } else {
  951. this.disabled = false
  952. this.isNoneDisabled = false
  953. this.goodsData.disabledText = ''
  954. }
  955. if (this.product.priceFlag == 1) {
  956. this.disabled = true
  957. } else if (this.product.priceFlag == 2) {
  958. if (this.userIdentity == 4 && this.vipFlag != 1) {
  959. this.disabled = true
  960. } else {
  961. this.disabled = false
  962. }
  963. } else if (this.product.priceFlag == 3) {
  964. if (this.userIdentity == 4) {
  965. this.disabled = true
  966. } else if (this.userIdentity == 2 && this.firstClubType != 1) {
  967. this.disabled = true
  968. } else {
  969. this.disabled = false
  970. }
  971. } else {
  972. this.disabled = false
  973. }
  974. this.goodsData.disabled = this.disabled
  975. this.goodsData.isNoneDisabled = this.isNoneDisabled
  976. if (this.product.validFlag == 3) {
  977. this.goodsData.disabledText = '下架'
  978. }
  979. if (this.product.validFlag == 10) {
  980. this.goodsData.disabledText = '停售'
  981. }
  982. if (this.product.saleOutFlag === 1) {
  983. this.goodsData.disabledText = '售罄'
  984. }
  985. console.log(this.disabled)
  986. // setTimeout(() => {
  987. // this.getSectionProps()
  988. // }, 2000)
  989. this.handleShowProductType(this.product.commodityDetailsFlag)
  990. if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
  991. this.ProductCartNumber()
  992. }
  993. this.queryProductDetilsCoupons()
  994. this.getCommodityCombinationList()
  995. // 特殊商品退货须知
  996. this.returnGoodsStutas = response.data.returnGoodsStutas && response.data.returnGoodsStutas === 2 // 1:可以 2:不可以
  997. this.helpContent = response.data.helpContent
  998. setTimeout(() => {
  999. this.skeletonShow = false
  1000. this.isRequest = true
  1001. }, 1000)
  1002. })
  1003. .catch(error => {
  1004. this.$util.msg(error.msg, 2000)
  1005. })
  1006. },
  1007. handleShowProductType(flag = '') {
  1008. // 根据商品详情可见度显示弹窗 flag 1.所有人可见 2.所有机构可见 3.仅会员机构可见 4.仅医美机构可见
  1009. const flagMap = {
  1010. '2': true,
  1011. '3': true,
  1012. '4': true
  1013. }
  1014. if (!this.hasLogin) {
  1015. this.showModal = flagMap[flag]
  1016. return
  1017. }
  1018. if (this.vipFlag === 1) {
  1019. this.showModal = false
  1020. return
  1021. }
  1022. if (flag === 3 && this.userIdentity === 4) {
  1023. this.showModal = true
  1024. return
  1025. }
  1026. if (flag === 4 && this.userIdentity === 4) {
  1027. this.showModal = true
  1028. return
  1029. }
  1030. if (flag === 4 && this.userIdentity === 2 && this.firstClubType !== 1) {
  1031. this.showModal = true
  1032. return
  1033. }
  1034. },
  1035. hideMobel1() {
  1036. this.modal1 = false
  1037. this.$api.navigateBack(1)
  1038. },
  1039. adaptRichTextImg(product) {
  1040. // 商品详情
  1041. let defaulHtml = '<div style="text-align: center;color:#333333;">暂无内容</div>'
  1042. let html = ''
  1043. if (product.productDetailChose == 1) {
  1044. // 同资质机构显示商品详情
  1045. html = product.productDetail ? this.$api.adaptRichTextImg(product.productDetail.detailInfo) : defaulHtml
  1046. } else {
  1047. if (this.hasLogin && this.userIdentity != 4) {
  1048. html = product.productDetail
  1049. ? this.$api.adaptRichTextImg(product.productDetail.detailInfo)
  1050. : defaulHtml
  1051. } else {
  1052. if (product.productDetail.commonDetailInfo) {
  1053. html = product.productDetail
  1054. ? this.$api.adaptRichTextImg(product.productDetail.commonDetailInfo)
  1055. : defaulHtml
  1056. } else {
  1057. html = defaulHtml
  1058. }
  1059. }
  1060. }
  1061. return html
  1062. },
  1063. getCommodityCombinationList() {
  1064. // 初始化商品详情配套商品
  1065. this.ProductService.getCommodityCombinationList({
  1066. userId: this.userId,
  1067. productId: this.productId,
  1068. source: 2,
  1069. pageNum: 1,
  1070. pageSize: 4
  1071. })
  1072. .then(response => {
  1073. const data = response.data
  1074. this.supportingList = data.results
  1075. this.supportingNum = data.totalRecord
  1076. if (this.supportingList.length > 0) {
  1077. if (!this.hasLogin || this.userIdentity == 2 || this.userIdentity == 4) {
  1078. this.isShowSupportingList = true
  1079. }
  1080. }
  1081. })
  1082. .catch(error => {
  1083. console.log('获取组合商品列表失败')
  1084. })
  1085. },
  1086. queryProductDetilsCoupons() {
  1087. // 初始化商品详情优惠券信息
  1088. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  1089. .then(response => {
  1090. this.productCoupon = response.data.list
  1091. })
  1092. .catch(error => {
  1093. console.log('获取优惠券列表失败')
  1094. })
  1095. },
  1096. queryPopupCoupons() {
  1097. // 获取弹窗优惠券列表
  1098. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  1099. .then(response => {
  1100. let data = response.data
  1101. this.navbar[0].num = data.notCouponNum
  1102. this.navbar[1].num = data.couponNum
  1103. if (data.couponList && data.couponList.length > 0) {
  1104. this.productCouponList = data.couponList
  1105. this.isCouponEmpty = false
  1106. } else {
  1107. this.isCouponEmpty = true
  1108. }
  1109. })
  1110. .catch(error => {
  1111. console.log('获取优惠券列表失败')
  1112. })
  1113. },
  1114. ProductCartNumber() {
  1115. // 获取用户购物车储量
  1116. this.ProductService.ProductCartNumber({ userId: this.userId })
  1117. .then(response => {
  1118. this.bottomCartNumber = response.data
  1119. })
  1120. .catch(error => {
  1121. console.log('获取购物车数量失败')
  1122. })
  1123. },
  1124. receiveCoupon(coupon) {
  1125. // 点击优惠券领取按钮,友盟埋点收集领取优惠券
  1126. if (process.env.NODE_ENV != 'development') {
  1127. this.$uma.trackEvent('Um_Event_productCouponReceive', {
  1128. Um_Key_PageName: '商品详情',
  1129. Um_Key_EvenName: '领取优惠券',
  1130. Um_Key_CouponId: `${coupon.couponId}`
  1131. })
  1132. }
  1133. this.ProductService.ReceiveCoupon({
  1134. userId: this.couponParam.userId,
  1135. couponId: coupon.couponId,
  1136. source: 1
  1137. })
  1138. .then(response => {
  1139. this.$util.msg('领取成功', 1500, true, 'success')
  1140. setTimeout(() => {
  1141. this.currentTab = 1
  1142. this.couponParam.status = 2
  1143. this.queryPopupCoupons()
  1144. }, 1500)
  1145. })
  1146. .catch(error => {
  1147. this.$util.msg(error.msg, 2000)
  1148. })
  1149. },
  1150. toDeductCoupon(coupon) {
  1151. // 点击采美豆抵扣优惠券
  1152. if (process.env.NODE_ENV != 'development') {
  1153. this.$uma.trackEvent('Um_Event_userCouponCollectionBuy', {
  1154. Um_Key_PageName: '领券中心',
  1155. Um_Key_EvenName: '抵扣优惠券',
  1156. Um_Key_CouponId: `${coupon.couponId}`
  1157. })
  1158. }
  1159. if (this.hasLogin) {
  1160. if (this.userIdentity === 1 || this.userIdentity === 3) {
  1161. this.$util.msg('您的身份暂不支持领取优惠券', 2000)
  1162. return
  1163. }
  1164. this.WeChatPayCouponBeans(coupon)
  1165. } else {
  1166. this.$api.navigateTo('/pages/login/login')
  1167. }
  1168. },
  1169. WeChatPayCouponBeans(coupon) {
  1170. // 采美豆抵扣优惠券
  1171. this.PayService.WeChatPayCouponBeans({
  1172. source: 1, //领取渠道 1 小程序 2 网站
  1173. userId: this.couponParam.userId,
  1174. couponId: coupon.couponId
  1175. })
  1176. .then(response => {
  1177. this.$util.msg('抵扣成功', 1500)
  1178. setTimeout(() => {
  1179. this.currentTab = 1
  1180. this.couponParam.status = 2
  1181. this.queryPopupCoupons()
  1182. }, 1500)
  1183. })
  1184. .catch(error => {
  1185. this.$util.msg(error.msg, 2000)
  1186. })
  1187. },
  1188. toPayCoupon(coupon) {
  1189. // 点击购买优惠券,友盟埋点收集购买优惠券
  1190. if (process.env.NODE_ENV != 'development') {
  1191. this.$uma.trackEvent('Um_Event_productCouponBuy', {
  1192. Um_Key_PageName: '商品详情',
  1193. Um_Key_EvenName: '购买优惠券',
  1194. Um_Key_CouponId: `${coupon.couponId}`
  1195. })
  1196. }
  1197. this.createCouponRecord(coupon)
  1198. },
  1199. createCouponRecord(coupon) {
  1200. // 生成购买优惠券记录Id
  1201. this.PayService.WeChatCouponRecord({
  1202. userId: this.userId,
  1203. couponId: coupon.couponId
  1204. })
  1205. .then(response => {
  1206. this.MiniWxPayFor(coupon, response.data.couponRecordId)
  1207. })
  1208. .catch(error => {
  1209. if (error.code == -1) {
  1210. //个人机构不能购买
  1211. this.contentModalText = '该优惠券仅限医美机构购买,请升级为医美机构后再次购买。'
  1212. this.modal = true
  1213. } else if (error.code == -2) {
  1214. //会员机构不是医美机构不能购买
  1215. this.$util.msg('该优惠券仅限医美机构购买', 2000)
  1216. }
  1217. })
  1218. },
  1219. async MiniWxPayFor(coupon, couponRecordId) {
  1220. const wechatcode = await authorize.getCode('weixin')
  1221. const params = {
  1222. userId: this.userId,
  1223. couponId: coupon.couponId,
  1224. couponRecordId: couponRecordId,
  1225. payType: 'XCX',
  1226. code: wechatcode,
  1227. source: 1 //支付来源 1 小程序 2 WWW
  1228. }
  1229. this.weChatMiniCouponWxPay(
  1230. params,
  1231. 'Um_Event_productCouponPay',
  1232. '商品详情',
  1233. '线上支付优惠券',
  1234. coupon.couponId,
  1235. this.userId
  1236. )
  1237. },
  1238. hideMobel() {
  1239. this.modal = false
  1240. },
  1241. handleClick(e) {
  1242. //个人机构跳转升级页面
  1243. if (e.index == 1) {
  1244. this.$api.navigateTo('/pages/login/apply')
  1245. }
  1246. this.modal = false
  1247. },
  1248. swiperChange(e) {
  1249. //顶部商品图片切换
  1250. const index = e.detail.current
  1251. this.current = index
  1252. },
  1253. previewImg1(url) {
  1254. let mentuzArray = []
  1255. mentuzArray.push(url)
  1256. uni.previewImage({
  1257. urls: mentuzArray,
  1258. current: 0
  1259. })
  1260. },
  1261. previewImg(index) {
  1262. //顶部商品图片预览
  1263. isPreviewImg = true
  1264. let previewUrls = this.productImage
  1265. uni.previewImage({
  1266. current: index, //图片索引
  1267. urls: previewUrls, //必须是http图片,本地图片无效
  1268. longPressActions: ''
  1269. })
  1270. },
  1271. //商品详情&&供应商信息tab切换
  1272. tabClick(index) {
  1273. // 重新标记
  1274. this.getSectionProps()
  1275. this.tabCurrentIndex = index
  1276. this.tabSelectFlag = true
  1277. let timer = null
  1278. clearTimeout(timer)
  1279. // 点击tab 300ms才执行跳转,避免出错(来回跳动)
  1280. timer = setTimeout(() => {
  1281. this.tabClickAction(index)
  1282. }, 500)
  1283. },
  1284. // 跳转执行
  1285. tabClickAction(index) {
  1286. const that = this
  1287. if (index === 3) {
  1288. return uni.pageScrollTo({
  1289. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  1290. scrollTop: this.sectionPropsArr[0].scrollTop
  1291. })
  1292. }
  1293. uni.pageScrollTo({
  1294. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  1295. scrollTop: this.sectionPropsArr[index].scrollTop,
  1296. success() {
  1297. setTimeout(() => {
  1298. that.tabSelectFlag = false
  1299. }, 300)
  1300. }
  1301. })
  1302. },
  1303. handleContact(e) {
  1304. //跳转小程序客服
  1305. console.log(e.detail.path)
  1306. console.log(e.detail.query)
  1307. },
  1308. buyProductCart() {
  1309. //底部购物车按钮点击
  1310. if (this.hasLogin) {
  1311. // 友盟埋点商品详情购物车入口点击事件
  1312. if (process.env.NODE_ENV != 'development') {
  1313. this.$uma.trackEvent('Um_Event_ProductShoppingCart', {
  1314. Um_Key_PageName: '去购物车',
  1315. Um_Key_SourcePage: '商品详情购物车入口'
  1316. })
  1317. }
  1318. this.$api.navigateTo('/pages/goods/cart')
  1319. } else {
  1320. this.$api.navigateTo('/pages/login/login?type=1')
  1321. }
  1322. },
  1323. btnGetConfirm(type) {
  1324. //加入购物车&&立即购买点击
  1325. if (this.hasLogin) {
  1326. this.btnType = type
  1327. this.popupShow3 = true
  1328. this.unitPopupType = 1
  1329. } else {
  1330. this.$api.navigateTo('/pages/login/login?type=1')
  1331. }
  1332. },
  1333. getAddProductCart() {
  1334. //增加购物车成功和toast弹窗提示成功
  1335. this.ProductService.shoppingAddCart({
  1336. productId: this.productId,
  1337. userId: this.userId,
  1338. productCount: this.number,
  1339. source: 2
  1340. })
  1341. .then(response => {
  1342. this.specClass = 'hide'
  1343. this.$util.msg('加入购物车成功', 1500, true, 'success')
  1344. this.isAnimation = true
  1345. setTimeout(() => {
  1346. this.specClass = 'none'
  1347. }, 200)
  1348. setTimeout(() => {
  1349. this.isAnimation = false
  1350. }, 2000)
  1351. this.bottomCartNumber = response.data
  1352. })
  1353. .catch(error => {
  1354. console.log('error', error.msg)
  1355. })
  1356. },
  1357. setHeaderBtnPosi() {
  1358. // 获得胶囊按钮位置信息
  1359. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  1360. return headerBtnPosi
  1361. },
  1362. setSysteminfo() {
  1363. let systeminfo
  1364. uni.getSystemInfo({
  1365. // 获取设备信息
  1366. success: res => {
  1367. systeminfo = res
  1368. }
  1369. })
  1370. return systeminfo
  1371. },
  1372. goIndex() {
  1373. //商城首页
  1374. uni.switchTab({
  1375. url: '/pages/tabBar/home/index'
  1376. })
  1377. },
  1378. goSupplier() {
  1379. //跳供应商资料页
  1380. if (!this.isShowCaimeiShop) {
  1381. this.$api.navigateTo('/pages/supplier/user/my-shop?shopId=' + this.shopId)
  1382. }
  1383. },
  1384. discard() {
  1385. //丢弃
  1386. },
  1387. onShare(res) {
  1388. //分享转发
  1389. if (res.from === 'button') {
  1390. // 来自页面内转发按钮
  1391. }
  1392. return {
  1393. title: `${this.product.name}`,
  1394. path: `pages/goods/product?type=share&id=${this.productId}`,
  1395. imageUrl: `${this.productImage[0]}`
  1396. }
  1397. },
  1398. // 分享海报
  1399. handleShare() {
  1400. this.posterData = {
  1401. productName: this.product.name,
  1402. productImage: this.productImage[0],
  1403. suid: this.suid,
  1404. path: 'pages/goods/product',
  1405. id: this.productId
  1406. }
  1407. this.$refs.sharePopup.open()
  1408. },
  1409. handleCollection() {
  1410. // 收藏
  1411. if (this.hasLogin) {
  1412. this.ProductService.getProductUserLike({
  1413. userId: this.userId,
  1414. productId: this.product.productId
  1415. })
  1416. .then(response => {
  1417. this.collectionType = !this.collectionType
  1418. this.$util.msg(response.data, 1500, true, 'success')
  1419. })
  1420. .catch(error => {
  1421. this.$util.msg(error.msg, 2000)
  1422. })
  1423. } else {
  1424. this.$api.navigateTo('/pages/login/login')
  1425. }
  1426. },
  1427. showPopup(index) {
  1428. switch (index) {
  1429. case 0:
  1430. this.popupShow0 = true
  1431. break
  1432. case 1:
  1433. this.popupShow1 = true
  1434. break
  1435. case 2:
  1436. if (this.hasLogin) {
  1437. this.queryPopupCoupons()
  1438. this.popupShow2 = true
  1439. } else {
  1440. this.$api.navigateTo('/pages/login/login')
  1441. }
  1442. break
  1443. case 3:
  1444. this.popupShow3 = true
  1445. this.unitPopupType = 2
  1446. break
  1447. }
  1448. },
  1449. hidePopup(index) {
  1450. switch (index) {
  1451. case 0:
  1452. this.popupShow0 = false
  1453. break
  1454. case 1:
  1455. this.popupShow1 = false
  1456. break
  1457. case 2:
  1458. this.popupShow2 = false
  1459. break
  1460. case 3:
  1461. this.popupShow3 = false
  1462. break
  1463. }
  1464. },
  1465. couponChange(e) {
  1466. this.currentTab = e.index
  1467. switch (this.currentTab) {
  1468. case 0:
  1469. this.couponParam.status = 1
  1470. this.queryPopupCoupons()
  1471. break
  1472. case 1:
  1473. this.couponParam.status = 2
  1474. this.queryPopupCoupons()
  1475. break
  1476. }
  1477. },
  1478. handleSupporting() {
  1479. // 跳转组合商品页面
  1480. this.$api.navigateTo(`/pages/goods/goods-supporting?productId=${this.productId}`)
  1481. },
  1482. // 获取每个tab对应区域的区间
  1483. async getSectionProps() {
  1484. const sectionPropsArr = [],
  1485. scrollTopArray = [],
  1486. className = 'product-details'
  1487. // 获取相关节点元素信息
  1488. const productMain = await this.$util.boundingClientRect(this, '.container-product-main', false)
  1489. const productDetail = await this.$util.boundingClientRect(this, '.product-details', true)
  1490. const topBar = await this.$util.boundingClientRect(this, '#topBar', false)
  1491. /*
  1492. 说明:采用累加方式来计算每一个 prdocut-details 的 scrollTop 定位
  1493. scrollTop = 上一个的scrollTop + 上一个的高度
  1494. */
  1495. productDetail.forEach((item, index) => {
  1496. // 上一个 prdocut-details 的 scrollTop 值
  1497. const prev = sectionPropsArr[index - 1]
  1498. const prevScrollTop = prev ? prev.scrollTop : productMain.height
  1499. // 上一个 prdocut-details 的高度
  1500. const add = productDetail[index - 1]
  1501. // 第一个需要减去tabs的高度
  1502. const addHeight = index === 0 ? (add ? add.height : 0) - topBar.height : add ? add.height : 0
  1503. sectionPropsArr.push({
  1504. className: `${className}-${index}`,
  1505. scrollTop: prevScrollTop + addHeight
  1506. })
  1507. // - topBar.height
  1508. })
  1509. this.sectionPropsArr = sectionPropsArr
  1510. console.log('更新tab影响区域')
  1511. },
  1512. //当滑动时也能同步激活tab
  1513. activeTab: debounce(
  1514. (top, _this) => {
  1515. const { sectionPropsArr } = _this
  1516. if (sectionPropsArr && sectionPropsArr.length > 0) {
  1517. sectionPropsArr.forEach((item, index) => {
  1518. // 当前位置为开始位置, 下个起始位置为结束位置
  1519. const openInterval = (index === 0 ? 0 : item.scrollTop) - 20 // 自定义偏移
  1520. const next = sectionPropsArr[index + 1]
  1521. const closedInterval = (next ? next.scrollTop : 10000000) - 20 // 自定义偏移
  1522. if (top >= openInterval && top < closedInterval) {
  1523. _this.tabCurrentIndex = index
  1524. }
  1525. })
  1526. }
  1527. },
  1528. 100,
  1529. true
  1530. ),
  1531. debounce(fn, delay) {
  1532. let timer = null //借助闭包
  1533. return function() {
  1534. if (timer) {
  1535. clearTimeout(timer)
  1536. }
  1537. timer = setTimeout(fn, delay) // 简化写法
  1538. }
  1539. },
  1540. clipboard(data) {
  1541. thorui.getClipboardData(data, res => {
  1542. if (res) {
  1543. this.$util.msg('复制成功', 2000, true, 'success')
  1544. } else {
  1545. this.$util.msg('复制失败', 2000, true, 'none')
  1546. }
  1547. })
  1548. },
  1549. getWinHeight() {
  1550. this.winHeight = wx.getSystemInfoSync().windowHeight
  1551. },
  1552. changePreViewImageStatus(falg) {
  1553. this.isPreviewImage = falg
  1554. }
  1555. },
  1556. onPageScroll(e) {
  1557. //实时获取到滚动的值
  1558. const { scrollTop } = e
  1559. this.debounce(this.getSectionProps(), 1000)
  1560. if (!this.tabSelectFlag) {
  1561. this.activeTab(scrollTop, this)
  1562. }
  1563. if (e.scrollTop > 60) {
  1564. this.headerColor = true
  1565. this.navbarFiexd = 'fixed'
  1566. this.isNavbarFiexd = true
  1567. this.nvabarData = {
  1568. showCapsule: 1,
  1569. title: '商品详情'
  1570. }
  1571. } else {
  1572. this.headerColor = false
  1573. this.isNavbarFiexd = false
  1574. this.navbarFiexd = 'none'
  1575. this.nvabarData = {
  1576. showCapsule: 1,
  1577. title: ''
  1578. }
  1579. }
  1580. if (e.scrollTop > 700) {
  1581. this.isScrollTop = true
  1582. } else {
  1583. this.isScrollTop = false
  1584. }
  1585. },
  1586. onShareAppMessage(res) {
  1587. //分享转发
  1588. if (res.from === 'button') {
  1589. // 来自页面内转发按钮
  1590. }
  1591. return {
  1592. title: `${this.product.name}`,
  1593. path: `pages/goods/product?type=4&id=${this.productId}&suid=${
  1594. this.userInfo.userIdentity === 1 ? this.userInfo.userId : 0
  1595. }&spId=${this.userInfo.userIdentity === 1 ? this.userInfo.serviceProviderId : 0}`,
  1596. imageUrl: `${this.productImage[0]}`
  1597. }
  1598. },
  1599. onShow() {
  1600. wxLogin.wxLoginAuthorize()
  1601. // 是否开启图片预览 true 不刷新调用接口 false刷新调用接口
  1602. if (!this.isPreviewImage) {
  1603. this.initGetStotage()
  1604. }
  1605. this.isPreviewImage = false
  1606. const suid = this.options.suid
  1607. ? this.options.suid
  1608. : this.scene.suid
  1609. ? this.scene.suid
  1610. : uni.getStorageSync('suid') * 1
  1611. ? uni.getStorageSync('suid') * 1
  1612. : 0 // 协销userId
  1613. const spId = this.options.spId
  1614. ? this.options.spId
  1615. : this.scene.spId
  1616. ? this.scene.spId
  1617. : uni.getStorageSync('spId') * 1
  1618. ? uni.getStorageSync('spId') * 1
  1619. : 0 // 协销id
  1620. const isShare = this.options.type == 4 ? true : this.scene.type == 4 ? true : false //是否从分享页进入
  1621. if ((isShare || uni.getStorageSync('suid') * 1 > 0) && this.userInfo.userIdentity !== 1) { // 分享进入 且 用户非协销 或不是从分享进入有缓存
  1622. if (
  1623. !uni.getStorageSync('spUserId') || // 未绑定
  1624. uni.getStorageSync('spUserId') * 1 === uni.getStorageSync('suid') * 1 // 绑定未更换
  1625. ) {
  1626. this.suid = suid
  1627. uni.setStorageSync('suid', suid)
  1628. uni.setStorageSync('spId', spId)
  1629. } else {
  1630. uni.setStorageSync('suid', 0)
  1631. this.suid = 0
  1632. uni.setStorageSync('spId', 0)
  1633. }
  1634. }
  1635. console.log(this.suid, "uni.getStorageSync('spId')", uni.getStorageSync('spId'))
  1636. }
  1637. }
  1638. </script>
  1639. <style lang="scss">
  1640. page {
  1641. background-color: #ffffff;
  1642. }
  1643. .banner-section {
  1644. width: 100%;
  1645. height: 750rpx;
  1646. position: relative;
  1647. .cm-product-tags {
  1648. position: absolute;
  1649. right: 30rpx;
  1650. top: 0;
  1651. z-index: 999;
  1652. }
  1653. .cm-product-type {
  1654. width: 64rpx;
  1655. height: 64rpx;
  1656. text-align: justify;
  1657. box-sizing: border-box;
  1658. padding: 10rpx;
  1659. border-radius: 0 0 8rpx 8rpx;
  1660. background-color: #33ccbf;
  1661. font-size: $font-size-22;
  1662. color: #ffffff;
  1663. line-height: 25rpx;
  1664. position: absolute;
  1665. left: 30rpx;
  1666. top: 0;
  1667. z-index: 999;
  1668. }
  1669. .cm-product-cover {
  1670. width: 120rpx;
  1671. height: 77rpx;
  1672. line-height: 57rpx;
  1673. font-size: 24rpx;
  1674. color: #fff;
  1675. text-align: center;
  1676. background: url(https://static.caimei365.com/app/img/icon2/cm_cover_bg_app.png) no-repeat center;
  1677. background-size: 120rpx;
  1678. float: left;
  1679. position: absolute;
  1680. right: 30rpx;
  1681. top: 0;
  1682. z-index: 999;
  1683. }
  1684. }
  1685. .banner {
  1686. width: 100%;
  1687. height: 750rpx;
  1688. .product-img {
  1689. width: 750rpx;
  1690. }
  1691. image {
  1692. width: 100%;
  1693. height: 100%;
  1694. }
  1695. .banner-item {
  1696. position: relative;
  1697. }
  1698. }
  1699. .swiper__dots-box {
  1700. position: absolute;
  1701. color: #fff;
  1702. bottom: 30rpx;
  1703. right: 0;
  1704. }
  1705. .product-wrap {
  1706. width: 100%;
  1707. height: auto;
  1708. padding: 24rpx 0 0 0;
  1709. background-color: #ffffff;
  1710. border-bottom: 20rpx solid #f7f7f7;
  1711. .productRemarks {
  1712. height: 48rpx;
  1713. width: 100%;
  1714. float: left;
  1715. line-height: 48rpx;
  1716. font-size: 24rpx;
  1717. color: #999999;
  1718. text-align: left;
  1719. }
  1720. .wrap-top {
  1721. width: 702rpx;
  1722. padding: 0 24rpx;
  1723. height: auto;
  1724. float: left;
  1725. padding-bottom: 20rpx;
  1726. border-bottom: 1px solid #f8f8f8;
  1727. &.none {
  1728. .p-title {
  1729. color: #999999;
  1730. }
  1731. }
  1732. .p-title {
  1733. width: 100%;
  1734. height: auto;
  1735. float: left;
  1736. position: relative;
  1737. .p-title-name {
  1738. width: 602rpx;
  1739. height: auto;
  1740. float: left;
  1741. line-height: 48rpx;
  1742. font-size: $font-size-28;
  1743. color: $text-color;
  1744. -o-text-overflow: ellipsis;
  1745. text-overflow: ellipsis;
  1746. display: -webkit-box;
  1747. word-break: break-all;
  1748. -webkit-box-orient: vertical;
  1749. -webkit-line-clamp: 2;
  1750. overflow: hidden;
  1751. &.indent {
  1752. text-indent: 95rpx;
  1753. }
  1754. }
  1755. .mclap-tag {
  1756. display: block;
  1757. width: 84rpx;
  1758. height: 32rpx;
  1759. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  1760. border-radius: 4rpx 48rpx 4px 4px;
  1761. line-height: 32rpx;
  1762. font-size: $font-size-22;
  1763. color: #ffffff;
  1764. text-align: center;
  1765. position: absolute;
  1766. left: 0;
  1767. top: 6rpx;
  1768. }
  1769. .p-title-share {
  1770. width: 96rpx;
  1771. height: 96rpx;
  1772. position: absolute;
  1773. right: 0;
  1774. text-align: center;
  1775. color: #999999;
  1776. font-size: $font-size-24;
  1777. box-sizing: border-box;
  1778. display: block;
  1779. background: transparent;
  1780. border-radius: 0;
  1781. border: 0;
  1782. margin: 0;
  1783. padding: 8rpx 0;
  1784. z-index: 20;
  1785. .icon-fenxiang1 {
  1786. font-size: $font-size-34;
  1787. }
  1788. }
  1789. .tui-share-btn::after {
  1790. border: 0;
  1791. }
  1792. }
  1793. .wrap-main-text {
  1794. line-height: 56rpx;
  1795. color: #ff2a2a;
  1796. font-size: $font-size-26;
  1797. display: block;
  1798. float: left;
  1799. font-weight: normal;
  1800. }
  1801. .wrap-main-none {
  1802. display: block;
  1803. width: 256rpx;
  1804. height: 44rpx;
  1805. padding-left: 20rpx;
  1806. border-radius: 11rpx;
  1807. background: $btn-confirm;
  1808. float: right;
  1809. line-height: 44rpx;
  1810. color: #ffffff;
  1811. text-align: center;
  1812. font-size: $font-size-24;
  1813. }
  1814. .p-price-none {
  1815. height: 44rpx;
  1816. line-height: 44rpx;
  1817. float: left;
  1818. font-size: $font-size-24;
  1819. color: #666;
  1820. text-decoration: line-through;
  1821. margin-left: 8rpx;
  1822. }
  1823. .p-minBuy {
  1824. height: 44rpx;
  1825. line-height: 44rpx;
  1826. float: right;
  1827. padding: 0 18rpx;
  1828. border-radius: 22rpx;
  1829. background-color: #f7f7f7;
  1830. color: #7f7f7f;
  1831. font-size: 24rpx;
  1832. text-align: center;
  1833. .min-text {
  1834. margin: 0 6rpx;
  1835. }
  1836. }
  1837. .p-login {
  1838. height: 56rpx;
  1839. line-height: 56rpx;
  1840. color: $color-system;
  1841. font-size: $font-size-24;
  1842. &.grade {
  1843. .price-left {
  1844. float: left;
  1845. .none {
  1846. display: block;
  1847. font-size: $font-size-20;
  1848. line-height: 48rpx;
  1849. color: #4a4b54;
  1850. float: left;
  1851. font-weight: bold;
  1852. margin-left: 5rpx;
  1853. text {
  1854. letter-spacing: 4rpx;
  1855. font-size: $font-size-32;
  1856. }
  1857. }
  1858. }
  1859. }
  1860. .p-no {
  1861. float: left;
  1862. margin-right: 5rpx;
  1863. font-size: $font-size-28;
  1864. color: $text-color;
  1865. }
  1866. .p-login-btn {
  1867. display: block;
  1868. height: 44rpx;
  1869. padding: 0 10rpx 0 20rpx;
  1870. border-radius: 11rpx;
  1871. background: $btn-confirm;
  1872. float: right;
  1873. line-height: 44rpx;
  1874. color: #ffffff;
  1875. text-align: center;
  1876. font-size: $font-size-24;
  1877. }
  1878. }
  1879. }
  1880. .wrap-label {
  1881. float: left;
  1882. width: 85%;
  1883. box-sizing: border-box;
  1884. .label-a {
  1885. padding: 0 18rpx;
  1886. line-height: 32rpx;
  1887. font-size: $font-size-20;
  1888. color: $color-system;
  1889. text-align: center;
  1890. border-radius: 6rpx;
  1891. background: #ffe6dc;
  1892. margin: 0 20rpx 15rpx 0;
  1893. display: inline-block;
  1894. }
  1895. }
  1896. .wrap-top-price {
  1897. float: left;
  1898. width: 100%;
  1899. box-sizing: border-box;
  1900. .wrap-main-item {
  1901. width: 100%;
  1902. height: 56rpx;
  1903. .p-price {
  1904. height: 56rpx;
  1905. line-height: 56rpx;
  1906. float: left;
  1907. color: #ff2a2a;
  1908. font-weight: bold;
  1909. &.none {
  1910. text-decoration: line-through;
  1911. color: #999999;
  1912. font-weight: normal;
  1913. }
  1914. .txt {
  1915. margin: 0 2rpx;
  1916. }
  1917. .txt.sm {
  1918. font-size: $font-size-26;
  1919. }
  1920. .txt.big {
  1921. font-size: $font-size-34;
  1922. }
  1923. }
  1924. .p-right-price {
  1925. height: 56rpx;
  1926. line-height: 56rpx;
  1927. float: right;
  1928. color: #999999;
  1929. font-size: $font-size-30;
  1930. .none {
  1931. font-size: $font-size-26;
  1932. text-decoration: line-through;
  1933. }
  1934. }
  1935. }
  1936. .floor-item-act {
  1937. height: 56rpx;
  1938. text-align: center;
  1939. box-sizing: border-box;
  1940. float: left;
  1941. padding: 10rpx 0;
  1942. margin-left: 10rpx;
  1943. }
  1944. .floor-item-btn {
  1945. float: right;
  1946. height: 40rpx;
  1947. margin-top: 8rpx;
  1948. margin-left: 10rpx;
  1949. .btn {
  1950. line-height: 40rpx;
  1951. padding: 0 20rpx;
  1952. height: 40rpx;
  1953. background: $btn-confirm;
  1954. color: #ffffff;
  1955. font-size: $font-size-20;
  1956. border-radius: 4rpx;
  1957. }
  1958. }
  1959. }
  1960. .wrap-info {
  1961. float: left;
  1962. width: 702rpx;
  1963. padding: 24rpx 24rpx 0 24rpx;
  1964. border-bottom: 1px solid #f8f8f8;
  1965. .info-viewT {
  1966. width: 100%;
  1967. min-height: 40rpx;
  1968. font-size: $font-size-28;
  1969. color: $text-color;
  1970. line-height: 40rpx;
  1971. text-align: left;
  1972. &.none {
  1973. color: #999999;
  1974. }
  1975. .info-viewL {
  1976. min-width: 350rpx;
  1977. float: left;
  1978. margin-bottom: 24rpx;
  1979. }
  1980. .info-viewR {
  1981. min-width: 352rpx;
  1982. float: left;
  1983. margin-bottom: 24rpx;
  1984. }
  1985. }
  1986. .info-viewB {
  1987. width: 100%;
  1988. height: auto;
  1989. }
  1990. .info-f {
  1991. width: 50%;
  1992. float: left;
  1993. font-size: $font-size-28;
  1994. color: $text-color;
  1995. line-height: 40rpx;
  1996. margin-bottom: 24rpx;
  1997. text-align: left;
  1998. }
  1999. }
  2000. }
  2001. .product-seve {
  2002. width: 100%;
  2003. height: 60rpx;
  2004. background-color: #ffffff;
  2005. position: relative;
  2006. display: flex;
  2007. line-height: 60rpx;
  2008. .label {
  2009. font-size: $font-size-28;
  2010. color: #333333;
  2011. }
  2012. .iconfont {
  2013. color: #fea785;
  2014. margin-right: 20rpx;
  2015. font-size: $font-size-22;
  2016. }
  2017. .text {
  2018. font-size: $font-size-22;
  2019. color: #fea785;
  2020. margin-left: 10rpx;
  2021. }
  2022. }
  2023. .product-item-none {
  2024. min-height: 348rpx;
  2025. display: flex;
  2026. flex-direction: column;
  2027. align-items: center;
  2028. border-bottom: 20rpx solid #f7f7f7;
  2029. box-sizing: border-box;
  2030. padding: 40rpx 0;
  2031. .none-image {
  2032. width: 284rpx;
  2033. height: 225rpx;
  2034. }
  2035. .none-text {
  2036. text-align: center;
  2037. font-size: $font-size-28;
  2038. color: #fea785;
  2039. line-height: 40rpx;
  2040. }
  2041. }
  2042. .product-supporting {
  2043. width: 100%;
  2044. height: 274rpx;
  2045. box-sizing: border-box;
  2046. padding: 30rpx 24rpx;
  2047. background-color: #ffffff;
  2048. border-bottom: 20rpx solid #f7f7f7;
  2049. .product-supporting-title {
  2050. width: 100%;
  2051. height: 40rpx;
  2052. text-align: left;
  2053. line-height: 40rpx;
  2054. font-size: $font-size-28;
  2055. color: #333333;
  2056. }
  2057. .product-supporting-list {
  2058. width: 100%;
  2059. height: 154rpx;
  2060. box-sizing: border-box;
  2061. padding: 13rpx 0;
  2062. position: relative;
  2063. .icon-xiayibu {
  2064. line-height: 154rpx;
  2065. display: inline-block;
  2066. position: absolute;
  2067. width: 80rpx;
  2068. top: 0;
  2069. right: 0;
  2070. color: #b2b2b2;
  2071. text-align: right;
  2072. }
  2073. .list {
  2074. width: 128rpx;
  2075. height: 128rpx;
  2076. margin-right: 24rpx;
  2077. float: left;
  2078. border: 1px solid #e1e1e1;
  2079. border-radius: 8rpx;
  2080. .list-image {
  2081. width: 100%;
  2082. height: 100%;
  2083. display: block;
  2084. border-radius: 8rpx;
  2085. }
  2086. }
  2087. }
  2088. }
  2089. .return-instructions {
  2090. padding: 0 24rpx;
  2091. border-bottom: 20rpx solid #f7f7f7;
  2092. }
  2093. .product-parameter {
  2094. width: 702rpx;
  2095. height: 90rpx;
  2096. padding: 0 24rpx;
  2097. background-color: #ffffff;
  2098. position: relative;
  2099. border-bottom: 20rpx solid #f7f7f7;
  2100. &.coupon {
  2101. .title {
  2102. color: #f94b4b;
  2103. }
  2104. .icon-xiayibu {
  2105. color: #f94b4b;
  2106. }
  2107. .coupon {
  2108. float: right;
  2109. box-sizing: border-box;
  2110. padding: 29rpx 0;
  2111. padding-right: 35rpx;
  2112. .tags {
  2113. height: 32rpx;
  2114. box-sizing: border-box;
  2115. border-radius: 8rpx;
  2116. background-color: #fff1eb;
  2117. line-height: 28rpx;
  2118. color: #f94b4b;
  2119. text-align: center;
  2120. display: inline-block;
  2121. padding: 0 10rpx;
  2122. font-size: $font-size-20;
  2123. border: 1px solid #f94b4b;
  2124. float: right;
  2125. margin: 0 6rpx;
  2126. }
  2127. }
  2128. }
  2129. .title {
  2130. line-height: 90rpx;
  2131. display: inline-block;
  2132. float: left;
  2133. font-size: $font-size-28;
  2134. color: #666666;
  2135. }
  2136. .name {
  2137. line-height: 90rpx;
  2138. display: inline-block;
  2139. float: left;
  2140. font-size: $font-size-28;
  2141. color: $text-color;
  2142. padding-right: 48rpx;
  2143. overflow: hidden;
  2144. text-overflow: ellipsis;
  2145. white-space: nowrap;
  2146. text-align: right;
  2147. }
  2148. .icon-xiayibu {
  2149. line-height: 90rpx;
  2150. display: inline-block;
  2151. position: absolute;
  2152. width: 48rpx;
  2153. top: 0;
  2154. right: 0;
  2155. color: #b2b2b2;
  2156. }
  2157. }
  2158. .product-supplier {
  2159. width: 100%;
  2160. height: 174rpx;
  2161. padding: 30rpx 24rpx;
  2162. box-sizing: border-box;
  2163. background-color: #ffffff;
  2164. position: relative;
  2165. box-sizing: border-box;
  2166. border-bottom: 20rpx solid #f7f7f7;
  2167. .logo {
  2168. width: 128rpx;
  2169. height: 92rpx;
  2170. float: left;
  2171. border: 1px solid #efefef;
  2172. border-radius: 6rpx;
  2173. image {
  2174. width: 100%;
  2175. height: 100%;
  2176. display: block;
  2177. border-radius: 6rpx;
  2178. }
  2179. }
  2180. .main {
  2181. width: 470rpx;
  2182. height: 92rpx;
  2183. float: left;
  2184. margin-left: 20rpx;
  2185. .name {
  2186. width: 100%;
  2187. line-height: 46rpx;
  2188. float: left;
  2189. font-size: $font-size-28;
  2190. color: $text-color;
  2191. float: right;
  2192. overflow: hidden;
  2193. text-overflow: ellipsis;
  2194. white-space: nowrap;
  2195. text-align: left;
  2196. }
  2197. .massgs {
  2198. width: 100%;
  2199. line-height: 46rpx;
  2200. float: left;
  2201. font-size: $font-size-24;
  2202. color: #999999;
  2203. .label {
  2204. float: left;
  2205. }
  2206. .p-stars {
  2207. float: left;
  2208. margin-left: 20rpx;
  2209. }
  2210. .acount {
  2211. float: right;
  2212. text {
  2213. color: $color-system;
  2214. }
  2215. }
  2216. }
  2217. }
  2218. .icon-xiayibu {
  2219. line-height: 154rpx;
  2220. display: inline-block;
  2221. position: absolute;
  2222. width: 48rpx;
  2223. top: 0;
  2224. right: 0;
  2225. color: #b2b2b2;
  2226. }
  2227. }
  2228. .product-details {
  2229. width: 100%;
  2230. background: #ffffff;
  2231. border-bottom: 20rpx solid #f7f7f7;
  2232. &.recommend {
  2233. background-color: #f7f7f7;
  2234. border-bottom: none;
  2235. .title {
  2236. .title-tab {
  2237. background-color: #f7f7f7;
  2238. color: $text-color;
  2239. }
  2240. }
  2241. }
  2242. .product-details-image {
  2243. width: 100%;
  2244. min-height: 856rpx;
  2245. box-sizing: border-box;
  2246. padding: 0 24rpx;
  2247. .product-details-table {
  2248. width: 100%;
  2249. min-height: 160rpx;
  2250. border: 1px solid #e1e1e1;
  2251. border-radius: 10rpx;
  2252. .ladder-tr {
  2253. display: flex;
  2254. width: 100%;
  2255. justify-content: center;
  2256. height: 80rpx;
  2257. align-items: center;
  2258. border-bottom: 1px solid #e1e1e1;
  2259. &:last-child {
  2260. border-bottom: none;
  2261. }
  2262. .ladder-item-td {
  2263. height: 80rpx;
  2264. justify-content: center;
  2265. text-align: center;
  2266. box-sizing: border-box;
  2267. padding: 10rpx;
  2268. float: left;
  2269. .te-text {
  2270. line-height: 28rpx;
  2271. font-size: $font-size-24;
  2272. text-overflow: ellipsis;
  2273. display: -webkit-box;
  2274. word-break: break-all;
  2275. -webkit-box-orient: vertical;
  2276. -webkit-line-clamp: 2;
  2277. overflow: hidden;
  2278. color: #999999;
  2279. &.last {
  2280. width: 60%;
  2281. float: left;
  2282. }
  2283. }
  2284. .te-copy {
  2285. width: 40%;
  2286. float: right;
  2287. font-size: $font-size-24;
  2288. padding-top: 10rpx;
  2289. .clipboard {
  2290. width: 84rpx;
  2291. height: 36rpx;
  2292. background: #4688fa;
  2293. text-align: center;
  2294. font-size: $font-size-24;
  2295. color: #ffffff;
  2296. border-radius: 18rpx;
  2297. line-height: 36rpx;
  2298. display: inline-block;
  2299. }
  2300. }
  2301. &.th {
  2302. display: flex;
  2303. height: 80rpx;
  2304. align-items: center;
  2305. line-height: 80rpx;
  2306. font-size: 26rpx;
  2307. color: #666;
  2308. }
  2309. &:nth-child(1) {
  2310. width: 25%;
  2311. border-right: 1px solid #e1e1e1;
  2312. }
  2313. &:nth-child(2) {
  2314. width: 35%;
  2315. border-right: 1px solid #e1e1e1;
  2316. }
  2317. &:nth-child(3) {
  2318. width: 40%;
  2319. }
  2320. }
  2321. }
  2322. }
  2323. .qualificationImg-image {
  2324. width: 100%;
  2325. height: 856rpx;
  2326. display: block;
  2327. }
  2328. }
  2329. .product-rich-text-none {
  2330. box-sizing: border-box;
  2331. padding: 0 24rpx;
  2332. text-align: left;
  2333. font-size: 24rpx;
  2334. color: #999999;
  2335. line-height: 60rpx;
  2336. &.bold {
  2337. font-weight: bold;
  2338. color: #333333;
  2339. }
  2340. }
  2341. .content-none {
  2342. width: 100%;
  2343. height: 80rpx;
  2344. line-height: 80rpx;
  2345. text-align: left;
  2346. font-size: $font-size-26;
  2347. color: #999999;
  2348. box-sizing: border-box;
  2349. padding: 0 24rpx;
  2350. }
  2351. .title {
  2352. width: 100%;
  2353. box-sizing: border-box;
  2354. padding: 0 24rpx;
  2355. .title-tab {
  2356. width: 100%;
  2357. height: 100rpx;
  2358. background: #fff;
  2359. z-index: 10;
  2360. font-size: $font-size-30;
  2361. text-align: left;
  2362. color: $text-color;
  2363. line-height: 100rpx;
  2364. font-weight: 600;
  2365. }
  2366. .title-msg {
  2367. width: 100%;
  2368. height: 236rpx;
  2369. padding: 18rpx;
  2370. background-color: rgba(225, 86, 22, 0.1);
  2371. color: $color-system;
  2372. box-sizing: border-box;
  2373. margin-bottom: 30rpx;
  2374. .tit {
  2375. line-height: 46rpx;
  2376. font-size: $font-size-24;
  2377. text-align: left;
  2378. }
  2379. .txt {
  2380. line-height: 38rpx;
  2381. font-size: $font-size-20;
  2382. text-align: justify;
  2383. }
  2384. }
  2385. }
  2386. .content {
  2387. width: 100%;
  2388. background-color: #ffffff;
  2389. }
  2390. }
  2391. .isLower {
  2392. width: 100%;
  2393. height: 116rpx;
  2394. line-height: 116rpx;
  2395. text-align: center;
  2396. color: #000000;
  2397. font-size: $font-size-32;
  2398. font-weight: bold;
  2399. }
  2400. .bottom-btn {
  2401. width: 100%;
  2402. height: 100rpx;
  2403. position: fixed;
  2404. bottom: 0;
  2405. left: 0;
  2406. background: #ffffff;
  2407. z-index: 99;
  2408. .bottom-le {
  2409. width: 300rpx;
  2410. height: 100rpx;
  2411. padding: 10rpx 20rpx 10rpx 0;
  2412. float: left;
  2413. box-sizing: border-box;
  2414. .item-bt {
  2415. width: 80rpx;
  2416. height: 100%;
  2417. margin-right: 15rpx;
  2418. display: flex;
  2419. float: left;
  2420. flex-direction: column;
  2421. align-items: center;
  2422. justify-content: center;
  2423. font-size: $font-size-22;
  2424. color: $text-color;
  2425. line-height: 34rpx;
  2426. position: relative;
  2427. .animation-num {
  2428. font-size: $font-size-32;
  2429. color: #ff2a2a;
  2430. position: absolute;
  2431. top: -12rpx;
  2432. right: 4rpx;
  2433. font-weight: bold;
  2434. }
  2435. .animation {
  2436. animation: showAmnation 2.2s ease-in-out both;
  2437. }
  2438. .restion {
  2439. animation: hideAmnation 1s ease-in-out both;
  2440. }
  2441. .icon-num {
  2442. position: absolute;
  2443. right: -12rpx;
  2444. top: -5rpx;
  2445. }
  2446. .icon-num.goleft {
  2447. right: 2rpx;
  2448. }
  2449. &:last-child {
  2450. margin-right: 0;
  2451. }
  2452. image {
  2453. width: 44rpx;
  2454. height: 44rpx;
  2455. }
  2456. button.contact-btn {
  2457. width: 100%;
  2458. height: 100%;
  2459. margin: 0;
  2460. padding: 0;
  2461. display: flex;
  2462. flex-direction: column;
  2463. align-items: center;
  2464. justify-content: center;
  2465. box-sizing: border-box;
  2466. font-size: $font-size-24;
  2467. text-align: center;
  2468. text-decoration: none;
  2469. line-height: 34rpx;
  2470. border-radius: 0;
  2471. -webkit-tap-highlight-color: transparent;
  2472. overflow: hidden;
  2473. color: $text-color;
  2474. background-color: #ffffff;
  2475. }
  2476. }
  2477. }
  2478. .bottom-ri {
  2479. width: 450rpx;
  2480. height: 100%;
  2481. float: right;
  2482. display: flex;
  2483. box-sizing: border-box;
  2484. padding: 13rpx 20rpx 13rpx 0;
  2485. .btn {
  2486. flex: 1;
  2487. width: 200rpx;
  2488. line-height: 80rpx;
  2489. text-align: center;
  2490. font-size: $font-size-24;
  2491. color: #ffffff;
  2492. }
  2493. .btn-cart {
  2494. background-color: #ffe6dc;
  2495. color: $color-system;
  2496. border-radius: 42rpx 0 0 42rpx;
  2497. }
  2498. .btn-cart.disabled {
  2499. background-color: #e1e1e1;
  2500. color: #ffffff;
  2501. }
  2502. .btn-bay {
  2503. background: linear-gradient(to right, #f28f31 0%, #ff5b00 100%);
  2504. border-radius: 0 42rpx 42rpx 0;
  2505. }
  2506. .btn-bay.disabled {
  2507. background: linear-gradient(135deg, rgba(242, 143, 49, 0.5) 0%, rgba(225, 86, 22, 0.5) 100%);
  2508. }
  2509. }
  2510. }
  2511. .uni-badge--small {
  2512. -webkit-transform: scale(0.8);
  2513. -ms-transform: scale(0.8);
  2514. transform: scale(0.8);
  2515. -webkit-transform-origin: center center;
  2516. -ms-transform-origin: center center;
  2517. transform-origin: center center;
  2518. }
  2519. .uni-badge {
  2520. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  2521. -webkit-box-sizing: border-box;
  2522. box-sizing: border-box;
  2523. font-size: 12px;
  2524. line-height: 1;
  2525. display: inline-block;
  2526. padding: 3px 6px;
  2527. color: #333;
  2528. border-radius: 100px;
  2529. background-color: #f1f1f1;
  2530. }
  2531. .uni-badge-error {
  2532. color: #fff;
  2533. background-color: #dd524d;
  2534. }
  2535. .product-topnav {
  2536. width: 100%;
  2537. height: 174rpx;
  2538. box-sizing: border-box;
  2539. background: #ffffff;
  2540. z-index: 990;
  2541. position: fixed;
  2542. opacity: 1;
  2543. left: 0;
  2544. &.fixed {
  2545. animation: showFixedColor 0.1s ease-in-out both;
  2546. }
  2547. &.none {
  2548. animation: hideFixedColor 0.1s ease-in-out both;
  2549. }
  2550. .navbar {
  2551. width: 100%;
  2552. height: 60rpx;
  2553. box-sizing: border-box;
  2554. padding: 0 24rpx;
  2555. display: flex;
  2556. .nav-item {
  2557. display: flex;
  2558. flex: 1;
  2559. justify-content: center;
  2560. align-items: center;
  2561. height: 60rpx;
  2562. font-size: $font-size-28;
  2563. color: $text-color;
  2564. position: relative;
  2565. float: left;
  2566. position: relative;
  2567. .line {
  2568. width: 60rpx;
  2569. height: 2px;
  2570. border-radius: 1px;
  2571. background: #ffffff;
  2572. position: absolute;
  2573. bottom: 0;
  2574. left: 50%;
  2575. margin-left: -30rpx;
  2576. }
  2577. &.current {
  2578. color: $color-system;
  2579. .line {
  2580. background: $color-system;
  2581. }
  2582. }
  2583. }
  2584. }
  2585. .search-input {
  2586. width: 100%;
  2587. height: 114rpx;
  2588. padding: 24rpx;
  2589. box-sizing: border-box;
  2590. .gosearch-btn {
  2591. width: 100%;
  2592. height: 100%;
  2593. border-radius: 40rpx;
  2594. margin: 0 auto;
  2595. font-size: 26rpx;
  2596. line-height: 66rpx;
  2597. color: #b2b2b2;
  2598. position: relative;
  2599. box-sizing: border-box;
  2600. padding-left: 66rpx;
  2601. &.fixed {
  2602. background: rgba(70, 70, 70, 0.1);
  2603. }
  2604. &.none {
  2605. background: rgba(70, 70, 70, 0.1);
  2606. }
  2607. .search-icon {
  2608. width: 66rpx;
  2609. height: 66rpx;
  2610. position: absolute;
  2611. left: 0;
  2612. top: 2rpx;
  2613. text-align: center;
  2614. line-height: 66rpx;
  2615. .icon-iconfonticonfontsousuo1 {
  2616. margin: 0 6rpx;
  2617. font-size: $font-size-34;
  2618. color: #b2b2b2;
  2619. z-index: 10;
  2620. }
  2621. }
  2622. .search-text {
  2623. font-size: $font-size-24;
  2624. line-height: 66rpx;
  2625. color: #b2b2b2;
  2626. }
  2627. }
  2628. }
  2629. }
  2630. @keyframes showFixedColor {
  2631. 0% {
  2632. background: rgba(255, 255, 255, 0);
  2633. }
  2634. 50% {
  2635. background: rgba(255, 255, 255, 0.5);
  2636. }
  2637. 100% {
  2638. background: rgba(255, 255, 255, 1);
  2639. }
  2640. }
  2641. @keyframes hideFixedColor {
  2642. 0% {
  2643. background: rgba(255, 255, 255, 1);
  2644. }
  2645. 50% {
  2646. background: rgba(255, 255, 255, 0.5);
  2647. }
  2648. 100% {
  2649. background: rgba(255, 255, 255, 0);
  2650. }
  2651. }
  2652. /* 加入购物模态层*/
  2653. @keyframes showPopup {
  2654. 0% {
  2655. opacity: 0;
  2656. }
  2657. 100% {
  2658. opacity: 1;
  2659. }
  2660. }
  2661. @keyframes hidePopup {
  2662. 0% {
  2663. opacity: 1;
  2664. }
  2665. 100% {
  2666. opacity: 0;
  2667. }
  2668. }
  2669. @keyframes showLayer {
  2670. 0% {
  2671. transform: translateY(0);
  2672. }
  2673. 100% {
  2674. transform: translateY(-100%);
  2675. }
  2676. }
  2677. @keyframes hideLayer {
  2678. 0% {
  2679. transform: translateY(-100%);
  2680. }
  2681. 100% {
  2682. transform: translateY(0);
  2683. }
  2684. }
  2685. @keyframes showAmnation {
  2686. 0% {
  2687. top: -12rpx;
  2688. opacity: 0;
  2689. }
  2690. 50% {
  2691. top: -60rpx;
  2692. opacity: 1;
  2693. }
  2694. 100% {
  2695. top: -100rpx;
  2696. opacity: 0;
  2697. }
  2698. }
  2699. @keyframes hideAmnation {
  2700. 0% {
  2701. top: -100rpx;
  2702. opacity: 0;
  2703. }
  2704. 100% {
  2705. top: -12rpx;
  2706. opacity: 0;
  2707. }
  2708. }
  2709. .tui-popup-box {
  2710. position: relative;
  2711. box-sizing: border-box;
  2712. min-height: 220rpx;
  2713. padding: 40rpx 24rpx 0 24rpx;
  2714. .tui-popup-close {
  2715. width: 90rpx;
  2716. height: 90rpx;
  2717. position: absolute;
  2718. right: 0;
  2719. top: 24rpx;
  2720. line-height: 90rpx;
  2721. text-align: center;
  2722. color: #b2b2b2;
  2723. .icon-iconfontguanbi {
  2724. font-size: $font-size-40;
  2725. }
  2726. }
  2727. .title {
  2728. font-size: $font-size-34;
  2729. color: $text-color;
  2730. line-height: 88rpx;
  2731. text-align: center;
  2732. float: left;
  2733. width: 100%;
  2734. height: 88rpx;
  2735. font-weight: bold;
  2736. }
  2737. .tui-popup-main {
  2738. width: 100%;
  2739. float: left;
  2740. &.coupon {
  2741. padding-bottom: 40rpx;
  2742. .coupon-empty {
  2743. width: 100%;
  2744. height: 600rpx;
  2745. display: flex;
  2746. align-items: center;
  2747. justify-content: center;
  2748. flex-direction: column;
  2749. position: fixed;
  2750. background: $bg-color;
  2751. .empty-container-image {
  2752. width: 150rpx;
  2753. height: 150rpx;
  2754. margin-bottom: 0;
  2755. margin-top: 0;
  2756. }
  2757. .error-text {
  2758. font-size: $font-size-28;
  2759. color: #999999;
  2760. line-height: 88rpx;
  2761. }
  2762. }
  2763. }
  2764. .tui-popup-scroll {
  2765. width: 100%;
  2766. height: 600rpx;
  2767. .coupon-list {
  2768. width: 100%;
  2769. height: 200rpx;
  2770. margin-top: 24rpx;
  2771. box-sizing: border-box;
  2772. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  2773. background-size: cover;
  2774. &:last-child {
  2775. margin-bottom: 24rpx;
  2776. }
  2777. .list-cell-le {
  2778. width: 224rpx;
  2779. height: 100%;
  2780. box-sizing: border-box;
  2781. padding: 37rpx 0;
  2782. float: left;
  2783. .coupon-maxMoney {
  2784. width: 100%;
  2785. height: 78rpx;
  2786. line-height: 78rpx;
  2787. font-size: 56rpx;
  2788. color: #ffffff;
  2789. text-align: center;
  2790. .small {
  2791. font-size: $font-size-24;
  2792. }
  2793. }
  2794. .coupon-minMoney {
  2795. width: 100%;
  2796. height: 33rpx;
  2797. line-height: 33rpx;
  2798. font-size: $font-size-24;
  2799. color: #ffffff;
  2800. text-align: center;
  2801. }
  2802. }
  2803. .list-cell-ri {
  2804. width: 478rpx;
  2805. height: 100%;
  2806. box-sizing: border-box;
  2807. padding: 20rpx 24rpx 0 24rpx;
  2808. float: right;
  2809. .list-cell-top {
  2810. width: 100%;
  2811. height: 121rpx;
  2812. float: left;
  2813. border-bottom: 1px solid #e1e1e1;
  2814. .list-cell-type {
  2815. width: 286rpx;
  2816. height: 100%;
  2817. float: left;
  2818. .list-cell-tags {
  2819. width: 100%;
  2820. height: 32rpx;
  2821. margin-bottom: 7rpx;
  2822. .tags {
  2823. display: inline-block;
  2824. padding: 0 10rpx;
  2825. height: 32rpx;
  2826. line-height: 32rpx;
  2827. background-color: #ffdcce;
  2828. color: #f94b4b;
  2829. font-size: $font-size-20;
  2830. border-radius: 8rpx;
  2831. text-align: center;
  2832. float: left;
  2833. }
  2834. }
  2835. .list-cell-texts {
  2836. width: 100%;
  2837. height: auto;
  2838. line-height: 35rpx;
  2839. text-overflow: ellipsis;
  2840. display: -webkit-box;
  2841. word-break: break-all;
  2842. -webkit-box-orient: vertical;
  2843. -webkit-line-clamp: 2;
  2844. overflow: hidden;
  2845. font-size: 26rpx;
  2846. color: #333333;
  2847. }
  2848. }
  2849. .list-cell-btn {
  2850. width: 128rpx;
  2851. height: 100%;
  2852. float: right;
  2853. .icon-used {
  2854. width: 100%;
  2855. height: 100%;
  2856. box-sizing: border-box;
  2857. padding-top: 28rpx;
  2858. .icon-used-text {
  2859. width: 100%;
  2860. text-align: center;
  2861. line-height: 26rpx;
  2862. font-size: $font-size-20;
  2863. color: #f94b4b;
  2864. }
  2865. .icon-used-btn {
  2866. width: 128rpx;
  2867. height: 48rpx;
  2868. border-radius: 28rpx;
  2869. line-height: 48rpx;
  2870. font-size: $font-size-26;
  2871. text-align: center;
  2872. &.receive {
  2873. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);
  2874. color: #ffffff;
  2875. }
  2876. &.make {
  2877. border: solid 1px #f94b4b;
  2878. color: #f94b4b;
  2879. }
  2880. }
  2881. }
  2882. }
  2883. }
  2884. .list-cell-time {
  2885. width: 100%;
  2886. height: 58rpx;
  2887. line-height: 58rpx;
  2888. text-align: left;
  2889. font-size: $font-size-20;
  2890. color: #999999;
  2891. }
  2892. }
  2893. }
  2894. &.train {
  2895. height: 240rpx;
  2896. }
  2897. .content-tr {
  2898. width: 100%;
  2899. min-height: 58rpx;
  2900. line-height: 58rpx;
  2901. display: flex;
  2902. .content-td {
  2903. display: flex;
  2904. flex: 3;
  2905. font-size: $font-size-26;
  2906. color: #999999;
  2907. line-height: 58rpx;
  2908. text-align: left;
  2909. }
  2910. .content-th {
  2911. display: flex;
  2912. flex: 7;
  2913. font-size: $font-size-26;
  2914. color: #333333;
  2915. line-height: 58rpx;
  2916. text-align: left;
  2917. padding-left: 10rpx;
  2918. }
  2919. }
  2920. }
  2921. }
  2922. .tui-shopping-main {
  2923. width: 100%;
  2924. .layer-smimg {
  2925. width: 114rpx;
  2926. height: 114rpx;
  2927. float: left;
  2928. border-radius: 10rpx;
  2929. margin-right: 24rpx;
  2930. image {
  2931. width: 114rpx;
  2932. height: 114rpx;
  2933. border-radius: 10rpx;
  2934. }
  2935. }
  2936. .layer-nunbox {
  2937. justify-content: space-between;
  2938. align-items: center;
  2939. width: 536rpx;
  2940. height: auto;
  2941. float: left;
  2942. .layer-nunbox-t {
  2943. width: 100%;
  2944. height: 44rpx;
  2945. position: relative;
  2946. display: flex;
  2947. margin-bottom: 10rpx;
  2948. .text {
  2949. font-size: $font-size-24;
  2950. line-height: 48rpx;
  2951. color: #999999;
  2952. }
  2953. .layer-nunbox-text {
  2954. line-height: 44rpx;
  2955. font-size: $font-size-28;
  2956. }
  2957. .number-box {
  2958. display: flex;
  2959. justify-content: center;
  2960. align-items: center;
  2961. border: 2rpx solid #ffe6dc;
  2962. border-radius: 30rpx;
  2963. height: 48rpx;
  2964. margin-left: 20rpx;
  2965. .iconfont {
  2966. font-size: $font-size-24;
  2967. padding: 0 18rpx;
  2968. color: #999999;
  2969. text-align: center;
  2970. line-height: 48rpx;
  2971. font-weight: bold;
  2972. background: #fef6f3;
  2973. &.icon-jianhao {
  2974. border-radius: 30rpx 0 0 30rpx;
  2975. }
  2976. &.icon-jiahao {
  2977. border-radius: 0 30rpx 30rpx 0;
  2978. }
  2979. }
  2980. .btn-input {
  2981. width: 62rpx;
  2982. height: 48rpx;
  2983. line-height: 48rpx;
  2984. background: #ffffff;
  2985. border-radius: 4rpx;
  2986. text-align: center;
  2987. font-size: $font-size-28;
  2988. }
  2989. }
  2990. .product-step {
  2991. position: absolute;
  2992. left: 45rpx;
  2993. bottom: 0;
  2994. height: 44rpx;
  2995. background: #ffffff;
  2996. }
  2997. }
  2998. .layer-nunbox-b {
  2999. width: 100%;
  3000. height: 44rpx;
  3001. margin-top: 13rpx;
  3002. }
  3003. .text {
  3004. line-height: 44rpx;
  3005. font-size: $font-size-28;
  3006. .p {
  3007. color: #ff2a2a;
  3008. }
  3009. .p:first-child {
  3010. margin-left: 30rpx;
  3011. }
  3012. .p.sm {
  3013. font-size: $font-size-24;
  3014. }
  3015. }
  3016. }
  3017. }
  3018. }
  3019. .tui-popup-btn {
  3020. width: 100%;
  3021. height: auto;
  3022. float: left;
  3023. margin-top: 24rpx;
  3024. .tui-button {
  3025. width: 100%;
  3026. height: 88rpx;
  3027. background: $btn-confirm;
  3028. line-height: 88rpx;
  3029. text-align: center;
  3030. color: #ffffff;
  3031. font-size: $font-size-28;
  3032. border-radius: 44rpx;
  3033. }
  3034. }
  3035. /*富文本样式*/
  3036. rich-text.p {
  3037. width: 702rpx !important;
  3038. padding: 0 24rpx;
  3039. text-align: justify;
  3040. }
  3041. rich-text.img {
  3042. width: 100%;
  3043. height: auto;
  3044. }
  3045. =======
  3046. <template>
  3047. <view
  3048. class="product "
  3049. :style="{
  3050. paddingBottom: userIdentity == 1 && userIdentity == 3 ? '0rpx' : '188rpx',
  3051. paddingTop: CustomBar + 'px'
  3052. }"
  3053. >
  3054. <custom-p
  3055. v-if="isHeaderPoduct"
  3056. :systeminfo="systeminfo"
  3057. :navbar-data="nvabarData"
  3058. :headerBtnPosi="headerBtnPosi"
  3059. :headerColor="headerColor"
  3060. :type="isShareType"
  3061. :page="backPage"
  3062. />
  3063. <view
  3064. class="product-topnav"
  3065. id="topBar"
  3066. v-show="isNavbarFiexd"
  3067. :class="navbarFiexd"
  3068. :style="{ top: CustomBar - 2 + 'px' }"
  3069. >
  3070. <view class="search-input">
  3071. <view class="gosearch-btn" :class="navbarFiexd" @click="this.$api.navigateTo(clickPath)">
  3072. <view class="search-icon"><text class="iconfont icon-iconfonticonfontsousuo1"></text></view>
  3073. <view class="search-text">搜索商品/项目仪器</view>
  3074. </view>
  3075. </view>
  3076. <view class="navbar">
  3077. <view
  3078. class="nav-item tui-skeleton-fillet"
  3079. :class="{ current: tabCurrentIndex === 0 }"
  3080. @click="tabClick(0)"
  3081. >
  3082. <text>详情</text> <text class="line"></text>
  3083. </view>
  3084. <view
  3085. class="nav-item tui-skeleton-fillet"
  3086. :class="{ current: tabCurrentIndex === 1 }"
  3087. @click="tabClick(1)"
  3088. >
  3089. <text>服务项目</text> <text class="line"></text>
  3090. </view>
  3091. <view
  3092. class="nav-item tui-skeleton-fillet"
  3093. :class="{ current: tabCurrentIndex === 2 }"
  3094. @click="tabClick(2)"
  3095. v-if="product.qualificationImg"
  3096. >
  3097. <text>商品资质</text> <text class="line"></text>
  3098. </view>
  3099. <view
  3100. class="nav-item tui-skeleton-fillet"
  3101. :class="{ current: tabCurrentIndex === 3 }"
  3102. @click="tabClick(3)"
  3103. >
  3104. <text>推荐</text> <text class="line"></text>
  3105. </view>
  3106. <view
  3107. class="nav-item tui-skeleton-fillet"
  3108. :class="{ current: tabCurrentIndex === 4 }"
  3109. @click="tabClick(4)"
  3110. v-if="product.archiveId !== 0"
  3111. >
  3112. <text>相关资料</text> <text class="line"></text>
  3113. </view>
  3114. </view>
  3115. </view>
  3116. <tui-skeleton
  3117. v-if="skeletonShow"
  3118. backgroundColor="#fafafa"
  3119. borderRadius="10rpx"
  3120. :isLoading="true"
  3121. :loadingType="5"
  3122. />
  3123. <template v-else>
  3124. <view class="cart-content empty" v-if="isInvalid">
  3125. <view class="empty-container">
  3126. <image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
  3127. <text class="error-text">商品已失效,去商城逛逛别的吧~</text>
  3128. <view class="login-btn" @click="goIndex">去商城</view>
  3129. </view>
  3130. </view>
  3131. <view class="container-product tui-skeleton" v-else>
  3132. <view class="container-product-main">
  3133. <view class="product-top">
  3134. <view class="banner-section">
  3135. <view class="cm-product-type" v-if="product.productType == 2">医疗器械</view>
  3136. <view class="cm-product-cover" v-if="product.appletsActType === 1"></view>
  3137. <uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode">
  3138. <swiper
  3139. class="banner tui-banner tui-skeleton-rect"
  3140. @change="swiperChange"
  3141. :duration="800"
  3142. :autoplay="false"
  3143. :circular="true"
  3144. >
  3145. <swiper-item v-for="(item, index) in productImage" :key="index" class="banner-item">
  3146. <image :src="item" @click="previewImg(index)" class="product-img" />
  3147. </swiper-item>
  3148. </swiper>
  3149. <view class="swiper__dots-box">
  3150. <tui-tag
  3151. padding="12rpx 24rpx"
  3152. type="translucent"
  3153. shape="circleLeft"
  3154. size="32rpx"
  3155. :scaleMultiple="0.82"
  3156. originRight
  3157. >
  3158. {{ current + 1 }}/{{ productImage && productImage.length }}
  3159. </tui-tag>
  3160. </view>
  3161. </uni-swiper-dot>
  3162. </view>
  3163. <view class="product-wrap clearfix">
  3164. <view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
  3165. <view class="wrap-top-price">
  3166. <cm-price
  3167. v-if="isRequest"
  3168. :product="product"
  3169. :userIdentity="userIdentity"
  3170. :shopID="shopID"
  3171. :promotions="product.promotions"
  3172. :ladderPriceList="ladderPriceList"
  3173. />
  3174. </view>
  3175. <view class="p-title tui-skeleton-fillet">
  3176. <view class="mclap-tag" v-if="product.beautyActFlag == '1'">美博会</view>
  3177. <view class="p-title-name" :class="product.beautyActFlag == '1' ? 'indent' : ''">
  3178. {{ product.name == undefined ? '' : product.name }}
  3179. </view>
  3180. <button
  3181. open-type="share"
  3182. class="p-title-share tui-share-position"
  3183. @tap="onShare"
  3184. v-if="userInfo.userIdentity !== 1"
  3185. >
  3186. <view class=""><text class="iconfont icon-fenxiang1"></text></view>
  3187. <view class="">分享</view>
  3188. </button>
  3189. <button class="p-title-share tui-share-position" @click="handleShare" v-else>
  3190. <view class=""><text class="iconfont icon-fenxiang1"></text></view>
  3191. <view class="">分享</view>
  3192. </button>
  3193. </view>
  3194. <view class="wrap-label" v-if="product.tagsList && product.tagsList.length > 0">
  3195. <view
  3196. class="label-a tui-skeleton-fillet"
  3197. v-for="(label, index) in product.tagsList"
  3198. :key="index"
  3199. >
  3200. {{ label }}
  3201. </view>
  3202. </view>
  3203. <view class="product-seve" v-if="hasLogin">
  3204. <text class="label">采美承诺:</text>
  3205. <text class="iconfont icon-dui tui-skeleton-rect">
  3206. <text class="text">无忧退货</text>
  3207. </text>
  3208. <text class="iconfont icon-dui tui-skeleton-rect">
  3209. <text class="text">快速退款</text>
  3210. </text>
  3211. <text class="iconfont icon-dui tui-skeleton-rect">
  3212. <text class="text">正品保证</text>
  3213. </text>
  3214. </view>
  3215. <view
  3216. class="productRemarks"
  3217. v-if="product.productRemarks != '' && product.productRemarks != null"
  3218. >
  3219. 备注:{{ product.productRemarks }}
  3220. </view>
  3221. </view>
  3222. </view>
  3223. </view>
  3224. <view class="product-item-none" v-if="goodsData.isNoneDisabled">
  3225. <image class="none-image" :src="productNoneImage" mode=""></image>
  3226. <view class="none-text">此商品已{{ goodsData.disabledText }},请浏览以下推荐商品~</view>
  3227. <view class="none-text">咨询类似商品,请联系客服!</view>
  3228. </view>
  3229. <!-- 选择规格 -->
  3230. <view class="product-parameter" v-if="isShowButton || userIdentity === 1" @click="showPopup(3)">
  3231. <text class="title">选择:</text> <text class="name">共{{ skusCount }}种规格可选</text>
  3232. <text class="iconfont icon-xiayibu"></text>
  3233. </view>
  3234. <!-- 参数 -->
  3235. <view class="product-parameter" @click="showPopup(0)" v-if="!goodsData.isNoneDisabled">
  3236. <text class="title">参数:</text> <text class="name">品牌 分类...</text>
  3237. <text class="iconfont icon-xiayibu"></text>
  3238. </view>
  3239. <!-- 特殊商品退货须知 -->
  3240. <view class="return-instructions" v-if="returnGoodsStutas">
  3241. <cm-return-instructions :content="helpContent"></cm-return-instructions>
  3242. </view>
  3243. <!-- 配套商品 -->
  3244. <view
  3245. class="product-supporting"
  3246. v-if="!goodsData.isNoneDisabled && isShowSupportingList && supportingList.length > 0"
  3247. @click.stop="handleSupporting"
  3248. >
  3249. <view class="product-supporting-title">配套商品({{ supportingNum }})</view>
  3250. <view class="product-supporting-list">
  3251. <view
  3252. class="list"
  3253. v-for="(supporting, index) in supportingList"
  3254. :key="index"
  3255. v-if="index < 4"
  3256. >
  3257. <image class="list-image" :src="supporting.image" mode=""></image>
  3258. </view>
  3259. <text class="iconfont icon-xiayibu"></text>
  3260. </view>
  3261. </view>
  3262. <!-- 优惠券 -->
  3263. <view
  3264. class="product-parameter coupon"
  3265. v-if="isShowButton && productCoupon.length > 0"
  3266. @click="showPopup(2)"
  3267. >
  3268. <text class="title">优惠券:</text>
  3269. <view class="coupon">
  3270. <text class="tags" v-for="(coupon, index) in productCoupon.slice(0, 3)" :key="index">
  3271. 满{{ coupon.touchPrice }}减{{ coupon.couponAmount }}
  3272. </text>
  3273. </view>
  3274. <text class="iconfont icon-xiayibu"></text>
  3275. </view>
  3276. <!-- 仪器培训方案 -->
  3277. <view
  3278. class="product-parameter"
  3279. @click="showPopup(1)"
  3280. v-if="product.commodityType == 2 && product.trainingMethod"
  3281. >
  3282. <text class="title">培训方案:</text>
  3283. <text class="name">{{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}</text>
  3284. <text class="iconfont icon-xiayibu"></text>
  3285. </view>
  3286. <!-- 供应商 -->
  3287. <view class="product-supplier" @click="goSupplier">
  3288. <view class="logo">
  3289. <img
  3290. :src="
  3291. shop.logo
  3292. ? shop.logo
  3293. : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'
  3294. "
  3295. alt=""
  3296. />
  3297. </view>
  3298. <view class="main">
  3299. <view class="name">{{ shop.name }}</view>
  3300. <view class="massgs">
  3301. <view class="label">满意度:</view>
  3302. <view class="p-stars">
  3303. <uni-stars
  3304. :stars="6"
  3305. :iconClass="iconClass"
  3306. :iconColor="iconColor"
  3307. :fontSize="36"
  3308. :widthInfo="176"
  3309. ></uni-stars>
  3310. </view>
  3311. <view class="acount">
  3312. <text>{{ shop.normalNum }}</text> 件商品
  3313. </view>
  3314. </view>
  3315. </view>
  3316. <view class="right" v-if="!isShowCaimeiShop"><text class="iconfont icon-xiayibu"></text></view>
  3317. </view>
  3318. </view>
  3319. <!-- 商品详情 -->
  3320. <view v-show="tabCurrentIndex !== 4">
  3321. <view class="product-details product-details0">
  3322. <view class="title"><view class="title-tab">商品详情</view></view>
  3323. <view class="content tui-banner product-rich-text tui-skeleton-rect">
  3324. <template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
  3325. <mp-html :content="html" :tag-style="tagStyle" />
  3326. </template>
  3327. <view class="product-rich-text-none" v-else>暂无商品信息</view>
  3328. </view>
  3329. </view>
  3330. <!-- 服务项目 -->
  3331. <view class="product-details service product-details1">
  3332. <view class="title"><view class="title-tab">服务项目</view></view>
  3333. <view
  3334. class="content service"
  3335. v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo"
  3336. >
  3337. <cm-service :product="product.productDetail" v-if="isRequest" />
  3338. </view>
  3339. <view class="content-none" v-else><text>暂无服务项目</text></view>
  3340. </view>
  3341. <!-- 商品资质 -->
  3342. <view class="product-details qualifications product-details2" v-if="product.qualificationImg">
  3343. <view class="title"><view class="title-tab">商品资质</view></view>
  3344. <view class="product-details-image">
  3345. <view class="product-details-table clearfix" v-if="product.qualificationNo">
  3346. <view class="ladder-tr">
  3347. <view class="ladder-item-td th">证书编号</view>
  3348. <view class="ladder-item-td th">产品名称</view>
  3349. <view class="ladder-item-td th">详情</view>
  3350. </view>
  3351. <view class="ladder-tr">
  3352. <view class="ladder-item-td">
  3353. <view class="te-text">{{ product.qualificationNo }}</view>
  3354. </view>
  3355. <view class="ladder-item-td">
  3356. <view class="te-text">{{ product.productName }}</view>
  3357. </view>
  3358. <view class="ladder-item-td">
  3359. <view class="te-text last">{{ product.qualificationLink }}</view>
  3360. <view class="te-copy">
  3361. <text class="clipboard" @click.stop="clipboard(product.qualificationLink)">
  3362. 复制
  3363. </text>
  3364. </view>
  3365. </view>
  3366. </view>
  3367. </view>
  3368. <image
  3369. class="qualificationImg-image"
  3370. :src="product.qualificationImg"
  3371. mode="aspectFill"
  3372. @click="previewImg1(product.qualificationImg)"
  3373. ></image>
  3374. </view>
  3375. </view>
  3376. <!-- 相关推荐 -->
  3377. <view class="product-details recommend product-details3">
  3378. <view class="title"><view class="title-tab">相关推荐</view></view>
  3379. <view class="content hot">
  3380. <cm-recommend
  3381. :query-productid="product.productId"
  3382. :query-type="product.recommendType"
  3383. v-if="isRequest"
  3384. />
  3385. </view>
  3386. </view>
  3387. </view>
  3388. <!-- 相关资料 -->
  3389. <view class="product-details recommend product-details4" v-if="tabCurrentIndex === 4">
  3390. <cm-product-doc
  3391. @previewImage="changePreViewImageStatus"
  3392. :archiveId="product.archiveId"
  3393. :userId="userId"
  3394. />
  3395. </view>
  3396. <!-- 优惠券 -->
  3397. <tui-bottom-popup :radius="true" :show="popupShow2" @close="hidePopup(2)">
  3398. <view class="tui-popup-box clearfix">
  3399. <view class="title">优惠券</view>
  3400. <view class="tui-popup-close" @click="hidePopup(2)">
  3401. <text class="iconfont icon-iconfontguanbi"></text>
  3402. </view>
  3403. <view class="tui-popup-tabs">
  3404. <coupon-tabs
  3405. :tabs="navbar"
  3406. :currentTab="currentTab > 2 ? 0 : currentTab"
  3407. @change="couponChange"
  3408. :itemWidth="100 / navbar.length + '%'"
  3409. selectedColor="#FF5B00"
  3410. sliderBgColor="#FF5B00"
  3411. />
  3412. </view>
  3413. <div class="tui-popup-main coupon">
  3414. <scroll-view class="tui-popup-scroll" scroll-y="true">
  3415. <view class="coupon-empty" v-if="isCouponEmpty">
  3416. <image
  3417. class="empty-container-image"
  3418. :src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"
  3419. ></image>
  3420. <text class="error-text">暂无可领的优惠券~</text>
  3421. </view>
  3422. <template v-else>
  3423. <view
  3424. v-for="(coupon, index) in productCouponList"
  3425. :key="index"
  3426. :id="coupon.couponId"
  3427. class="coupon-list"
  3428. >
  3429. <view class="list-cell-le">
  3430. <view class="coupon-maxMoney">
  3431. <text class="small">¥</text> {{ coupon.couponAmount }}
  3432. </view>
  3433. <view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
  3434. </view>
  3435. <view class="list-cell-ri">
  3436. <view class="list-cell-top">
  3437. <view class="list-cell-type">
  3438. <view class="list-cell-tags">
  3439. <template v-if="coupon.moneyCouponFlag == 1">
  3440. <text class="tags" v-if="coupon.moneyCouponType == 1">
  3441. 意向{{ coupon.couponType | TypeFormat }}
  3442. </text>
  3443. <text class="tags" v-else>
  3444. 定向{{ coupon.couponType | TypeFormat }}
  3445. </text>
  3446. </template>
  3447. <template v-else>
  3448. <text class="tags">
  3449. {{ coupon.couponType | TypeFormat }}
  3450. </text>
  3451. </template>
  3452. </view>
  3453. <view class="list-cell-texts">
  3454. <text v-if="coupon.couponType == 0">
  3455. {{
  3456. coupon.productType && coupon.productType == 1
  3457. ? '全商城商品通用'
  3458. : '仅可购买指定商品'
  3459. }}
  3460. </text>
  3461. <text v-if="coupon.couponType == 1">
  3462. {{
  3463. coupon.categoryType == 1
  3464. ? '仅限购买产品类商品'
  3465. : '仅限购买仪器类商品'
  3466. }}
  3467. </text>
  3468. <text v-if="coupon.couponType == 3">
  3469. 仅限购买店铺【{{ coupon.shopName }}】的商品
  3470. </text>
  3471. <text v-if="coupon.couponType == 4 || coupon.couponType == 2">
  3472. 全商城商品通用
  3473. </text>
  3474. </view>
  3475. </view>
  3476. <view class="list-cell-btn">
  3477. <view class="icon-used">
  3478. <template v-if="coupon.couponBtnType == 0">
  3479. <template v-if="coupon.couponPayWay == 2">
  3480. <view class="icon-used-text">
  3481. {{ coupon.moneyCouponPrice }}采美豆
  3482. </view>
  3483. <view
  3484. class="icon-used-btn receive"
  3485. @click="toDeductCoupon(coupon)"
  3486. >
  3487. 抵扣
  3488. </view>
  3489. </template>
  3490. <template v-else-if="coupon.couponPayWay == 1">
  3491. <view class="icon-used-text">购买</view>
  3492. <view
  3493. class="icon-used-btn receive"
  3494. @click="toPayCoupon(coupon)"
  3495. >
  3496. ¥{{ coupon.moneyCouponPrice }}
  3497. </view>
  3498. </template>
  3499. <template v-else>
  3500. <view
  3501. class="icon-used-btn receive"
  3502. @click="receiveCoupon(coupon)"
  3503. >
  3504. 领取
  3505. </view>
  3506. </template>
  3507. </template>
  3508. <view
  3509. class="icon-used-btn make"
  3510. v-if="coupon.couponBtnType == 1"
  3511. >
  3512. 已领取
  3513. </view>
  3514. </view>
  3515. </view>
  3516. </view>
  3517. <view class="list-cell-time">
  3518. {{ coupon.startDate }} - {{ coupon.endDate }}
  3519. </view>
  3520. </view>
  3521. </view>
  3522. </template>
  3523. </scroll-view>
  3524. </div>
  3525. </view>
  3526. </tui-bottom-popup>
  3527. <!-- 培训方案 -->
  3528. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  3529. <view class="tui-popup-box clearfix">
  3530. <view class="title">培训方案</view>
  3531. <div class="tui-popup-main">
  3532. <scroll-view class="tui-popup-scroll train" scroll-y="true">
  3533. <view class="content-tr">
  3534. <view class="content-td">培训方式:</view>
  3535. <view class="content-th">
  3536. {{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}
  3537. </view>
  3538. </view>
  3539. <view class="content-tr">
  3540. <view class="content-td">培训费用:</view>
  3541. <view class="content-th">
  3542. {{ product.trainingType == 1 ? '¥' + product.trainingFee : '售价已包含' }}
  3543. </view>
  3544. </view>
  3545. </scroll-view>
  3546. </div>
  3547. <view
  3548. class="tui-right-flex tui-popup-btn"
  3549. :style="{ paddingBottom: isIphoneX ? '68rpx' : '.34rpx' }"
  3550. >
  3551. <view class="tui-flex-1"><view class="tui-button" @click="hidePopup(1)">收起</view></view>
  3552. </view>
  3553. </view>
  3554. </tui-bottom-popup>
  3555. <!-- 底部按钮 -->
  3556. <view class="menu" v-if="isShowButton">
  3557. <view class="bottom-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  3558. <view class="bottom-le">
  3559. <view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
  3560. <image src="../../static/icon-home-active@3x.png"></image> <text>首页</text>
  3561. </view>
  3562. <view class="item-bt" @click="handleCollection">
  3563. <image
  3564. :src="
  3565. collectionType
  3566. ? StaticUrl + 'icon/icon-collection@2x.png'
  3567. : StaticUrl + 'icon/icon-collection-none@2x.png'
  3568. "
  3569. ></image>
  3570. <text>{{ collectionType ? '已收藏' : '收藏' }}</text>
  3571. </view>
  3572. <view class="item-bt" @click="buyProductCart()">
  3573. <image src="https://static.caimei365.com/app/img/icon/icon-cart-active@3x.png"></image>
  3574. <text>购物车</text>
  3575. <text
  3576. v-if="hasLogin && bottomCartNumber > 0"
  3577. class="uni-badge uni-badge-error uni-small uni-badge--small icon-num"
  3578. :class="[bottomCartNumber < 10 ? 'goleft' : '']"
  3579. >
  3580. {{ bottomCartNumber >= 100 ? '99+' : bottomCartNumber }}
  3581. </text>
  3582. <view class="animation-num" :class="isAnimation ? 'animation' : 'restion'">+1</view>
  3583. </view>
  3584. </view>
  3585. <view class="bottom-ri">
  3586. <button
  3587. :disabled="goodsData.disabled"
  3588. class="btn btn-cart"
  3589. :class="[goodsData.disabled ? 'disabled' : '']"
  3590. @tap.stop="btnGetConfirm('add')"
  3591. >
  3592. 加入购物车
  3593. </button>
  3594. <button
  3595. :disabled="goodsData.disabled"
  3596. class="btn btn-bay"
  3597. :class="[goodsData.disabled ? 'disabled' : '']"
  3598. @tap.stop="btnGetConfirm('buy')"
  3599. >
  3600. 立即购买
  3601. </button>
  3602. </view>
  3603. </view>
  3604. </view>
  3605. <!-- 侧边 -->
  3606. <scroll-top :isScrollTop="isScrollTop" :bottom="200" v-show="tabCurrentIndex !== 3"></scroll-top>
  3607. </view>
  3608. </template>
  3609. <!-- 商品参数 -->
  3610. <cm-prams-popup v-if="popupShow0" :popupShow="popupShow0" :product="product" />
  3611. <!-- 选择规格弹窗 -->
  3612. <cm-unit-popup
  3613. v-if="popupShow3"
  3614. :popupShow="popupShow3"
  3615. :skuProduct="skuProduct"
  3616. :productCoupon="productCoupon"
  3617. :type="unitPopupType"
  3618. :btnType="btnType"
  3619. :goodsData="goodsData"
  3620. @buyConfirm="handleBuyConfirm"
  3621. @skuClick="handleSkuClick"
  3622. />
  3623. <!-- 弹窗提示 -->
  3624. <tui-modal
  3625. :show="modal"
  3626. @click="handleClick"
  3627. @cancel="hideMobel"
  3628. :content="contentModalText"
  3629. :button="modalButton"
  3630. color="#333"
  3631. :size="32"
  3632. shape="circle"
  3633. :maskClosable="false"
  3634. />
  3635. <!-- 商品详情可见度弹窗提醒 -->
  3636. <cm-product-modal
  3637. v-if="showModal"
  3638. :showModal="showModal"
  3639. :commodityDetailsFlag="product.commodityDetailsFlag"
  3640. :isShareType="isShareType"
  3641. :userIdentity="userIdentity"
  3642. :firstClubType="firstClubType"
  3643. />
  3644. <!-- 供应商收集用户信息弹窗 -->
  3645. <cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisement="advertisement" />
  3646. <!-- 分享弹窗 -->
  3647. <cm-share-popup ref="sharePopup" :data="posterData" type="product" />
  3648. <!-- 协销名片 -->
  3649. <cm-seller-modal :suid="suid" />
  3650. </view>
  3651. </template>
  3652. <script>
  3653. import { mapState, mapMutations } from 'vuex'
  3654. import customP from './components/cm-header.vue' //自定义导航
  3655. import cmPrice from './components/cm-price.vue' //价格显示
  3656. import cmAttributes from './components/cm-attributes.vue' //规格信息
  3657. import cmRecommend from './components/recommend' //相关推荐
  3658. import cmParameter from './components/cm-parameter' //相关参数
  3659. import cmService from './components/cm-service' //服务项目
  3660. import cmProductDoc from './components/cm-product-doc.vue'
  3661. import cmProductModal from './components/cm-product-modal.vue'
  3662. import cmPramsPopup from './components/cm-prams-popup.vue'
  3663. import cmUnitPopup from './components/cm-unit-popup.vue'
  3664. import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
  3665. import cmRossPopup from '@/components/cm-module/cm-ross/cm-ross-popup'
  3666. import cmReturnInstructions from './components/cm-return-instructions.vue'
  3667. import authorize from '@/common/config/authorize.js'
  3668. import wxLogin from '@/common/config/wxLogin.js'
  3669. import { debounce } from '@/common/config/common.js'
  3670. import payMixins from '@/mixins/payMixins.js'
  3671. import proMixins from './mixins/proMixins.js'
  3672. import cmSrsMixins from '@/utils/cmSrsMixins.js'
  3673. import thorui from '@/components/clipboard/clipboard.thorui.js'
  3674. import cmSharePopup from '@/components/cm-share-popup/cm-share-popup.vue'
  3675. import cmSellerModal from '@/components/cm-share-popup/cm-seller-modal.vue'
  3676. import { queryParse } from './mixins/share.helper.js'
  3677. var isPreviewImg
  3678. export default {
  3679. mixins: [payMixins, proMixins, cmSrsMixins],
  3680. components: {
  3681. customP,
  3682. cmRecommend,
  3683. cmPrice,
  3684. cmAttributes,
  3685. cmParameter,
  3686. cmService,
  3687. couponTabs,
  3688. cmProductDoc,
  3689. cmPramsPopup,
  3690. cmUnitPopup,
  3691. cmProductModal,
  3692. cmRossPopup,
  3693. cmReturnInstructions,
  3694. cmSharePopup,
  3695. cmSellerModal
  3696. },
  3697. data() {
  3698. return {
  3699. StaticUrl: this.$Static, //静态图片路径
  3700. clickPath: '/pages/search/search',
  3701. html: '',
  3702. productNoneImage: 'https://static.caimei365.com/app/img/icon/icon-pnone.png',
  3703. mode: 'round',
  3704. iconClass: 'icon-aixin',
  3705. iconColor: '#ff9100',
  3706. specClass: '', // 规格弹窗css类,控制开关动画
  3707. isBtnType: '',
  3708. isRequest: false,
  3709. isScrollTop: false,
  3710. current: 0,
  3711. isShareType: '',
  3712. isHeaderPoduct: false,
  3713. isNavbarFiexd: false,
  3714. navbarFiexd: 'none',
  3715. ladderPriceFlag: '',
  3716. ladderPriceList: '',
  3717. isInvalid: false,
  3718. isEvaluate: false,
  3719. isAnimation: false,
  3720. skeletonShow: true,
  3721. isStock: false,
  3722. disabled: false,
  3723. isNoneDisabled: false,
  3724. tabCurrentIndex: 0,
  3725. userId: 0,
  3726. shopId: 0,
  3727. shopID: 0,
  3728. typeId: 0,
  3729. vipFlag: 0,
  3730. firstClubType: 0,
  3731. productId: 0,
  3732. skusCount: 0, // 规格种类
  3733. userIdentity: 0, // 用户类型
  3734. goodsData: {}, // 自定义数据
  3735. shop: {}, //供应商信息
  3736. product: {}, //采美
  3737. productImage: [],
  3738. retailPrice: 0,
  3739. stock: 0,
  3740. number: 0,
  3741. minBuyNumber: 0,
  3742. productsList: [],
  3743. goodListData: [],
  3744. productCoupon: [], // 优惠券
  3745. productCouponList: [], // 优惠券弹窗列表
  3746. headerBtnPosi: this.setHeaderBtnPosi(), // 获取设备顶部胶囊高度
  3747. systeminfo: this.setSysteminfo(), // 获取设备信息
  3748. windowHeight: '',
  3749. headerColor: false,
  3750. backPage: 1,
  3751. nvabarData: {
  3752. // 顶部自定义导航
  3753. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  3754. title: '' // 导航栏 中间的标题
  3755. },
  3756. linkPath: '',
  3757. CustomBar: this.CustomBar, // 顶部导航栏高度
  3758. popupShow0: false, // 参数弹窗
  3759. popupShow1: false, // 培训方案
  3760. popupShow2: false, // 优惠券
  3761. popupShow3: false, // 购买弹窗
  3762. tabSelectFlag: false,
  3763. sectionPropsArr: [],
  3764. scrollTopArray: [],
  3765. winHeight: '',
  3766. isShowButton: true,
  3767. isCouponEmpty: false,
  3768. currentTab: 0,
  3769. couponParam: {
  3770. // 获取弹窗优惠券领取参数
  3771. userId: 0,
  3772. productId: 0,
  3773. status: 1,
  3774. source: 2
  3775. },
  3776. bottomCartNumber: 0,
  3777. navbar: [{ name: '未领取', num: 0 }, { name: '已领取', num: 0 }],
  3778. isPreviewImage: false,
  3779. opentype: '',
  3780. collectionType: false,
  3781. isShowSupportingList: false,
  3782. supportingList: [],
  3783. supportingNum: 0, // 组合商品总数
  3784. contentModalText: '', //操作文字提示语句
  3785. modal: false,
  3786. modalButton: [
  3787. {
  3788. text: '取消',
  3789. type: 'gray',
  3790. plain: true //是否空心
  3791. },
  3792. {
  3793. text: '去升级',
  3794. customStyle: {
  3795. color: '#fff',
  3796. bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
  3797. },
  3798. plain: false
  3799. }
  3800. ],
  3801. showModal: false,
  3802. isShowCaimeiShop: false,
  3803. unitPopupType: 0, // 选择类型 1 点击加入购物车 立即购买 2:点击规格选择
  3804. returnGoodsStutas: false,
  3805. helpContent: '',
  3806. posterData: {}, // 商品详情
  3807. suid: 0, // 协销id
  3808. scene: {}, //获取二维码参数
  3809. options: {}
  3810. }
  3811. },
  3812. computed: {
  3813. ...mapState(['hasLogin', 'clubType', 'identity', 'isIphoneX', 'userInfo'])
  3814. },
  3815. filters: {
  3816. TypeFormat(value) {
  3817. switch (value) {
  3818. case 0:
  3819. return '活动券'
  3820. break
  3821. case 1:
  3822. return '品类券'
  3823. break
  3824. case 2:
  3825. return '用户专享券'
  3826. break
  3827. case 3:
  3828. return '店铺券'
  3829. break
  3830. case 4:
  3831. return '新用户券'
  3832. break
  3833. }
  3834. }
  3835. },
  3836. watch: {
  3837. isNavbarFiexd(val) {
  3838. if (!this.isRequest || !val) return
  3839. let timer = null
  3840. clearTimeout(timer)
  3841. timer = setTimeout(() => {
  3842. if (this.sectionPropsArr.length > 0) return
  3843. this.getSectionProps()
  3844. }, 200)
  3845. }
  3846. },
  3847. onLoad(option) {
  3848. if (option.scene) {
  3849. // 识别小程序二维码
  3850. this.scene = queryParse(decodeURIComponent(option.scene)) // 转码
  3851. }
  3852. this.productId = this.couponParam.productId = this.addParams.productId = this.handleProsId =
  3853. option.id || this.scene.id //获取商品ID
  3854. if (option.typeId) {
  3855. this.typeId = option.typeId
  3856. }
  3857. this.opentype = option.open
  3858. this.isShareType = option.type
  3859. this.linkPath = option.path
  3860. this.isHeaderPoduct = true
  3861. if (option.page == 2) {
  3862. this.backPage = option.page
  3863. }
  3864. this.options = option.scene ? this.scene : option
  3865. this.getWinHeight()
  3866. },
  3867. onReady() {
  3868. if (this.opentype == 'caimei') {
  3869. // 跳转到资料详情
  3870. uni.showLoading({
  3871. title: '加载中'
  3872. })
  3873. setTimeout(() => {
  3874. this.isNavbarFiexd = true
  3875. this.tabClick(4)
  3876. uni.hideLoading()
  3877. }, 2000)
  3878. }
  3879. console.log('是iPhoneX', this.isIphoneX)
  3880. },
  3881. methods: {
  3882. async initGetStotage() {
  3883. // 初始化
  3884. const userInfo = await this.$api.getStorage()
  3885. this.userId = this.couponParam.userId = this.addParams.userId = userInfo.userId ? userInfo.userId : 0
  3886. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  3887. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  3888. this.shopID = userInfo.shopId ? userInfo.shopId : 0
  3889. this.firstClubType = this.clubType
  3890. if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
  3891. this.isShowButton = true
  3892. } else {
  3893. this.isShowButton = false
  3894. }
  3895. if (isPreviewImg) {
  3896. isPreviewImg = false
  3897. return
  3898. } else {
  3899. this.initData()
  3900. }
  3901. },
  3902. initData() {
  3903. // 初始化商品详情查询
  3904. this.ProductService.QueryProductDetils({
  3905. userId: this.userId,
  3906. productId: this.productId,
  3907. identity: this.identity,
  3908. typeId: this.typeId
  3909. })
  3910. .then(response => {
  3911. let productLabel = ''
  3912. this.productImage = []
  3913. this.shop = response.data.shop
  3914. this.shopId = response.data.shopId
  3915. const dataStr = JSON.stringify(response.data)
  3916. this.product = JSON.parse(dataStr)
  3917. this.skuProduct = JSON.parse(dataStr)
  3918. this.skusCount = this.product.skus.length
  3919. this.addParams.skuId = this.product.skuId
  3920. if (this.product.tinyTypeName) {
  3921. productLabel = this.product.tinyTypeName
  3922. } else if (!this.product.tinyTypeName && this.product.smallTypeName) {
  3923. productLabel = this.product.smallTypeName
  3924. } else {
  3925. productLabel = this.product.bigTypeName
  3926. }
  3927. //设置统计数据标签
  3928. if (this.product.relatedLabels) {
  3929. uni.setStorageSync('productLabel', this.product.relatedLabels)
  3930. } else {
  3931. uni.setStorageSync(
  3932. 'productLabel',
  3933. `${productLabel}-${this.product.brandName ? this.product.brandName : ''}`
  3934. )
  3935. }
  3936. //校验是否为ross
  3937. this.checkedIsRossSet()
  3938. //判断是否可以跳转供应商主页
  3939. if (this.product.shopType === 2) {
  3940. this.isShowCaimeiShop = true
  3941. }
  3942. // 判断是否显示已收藏
  3943. if (this.product.userLike && this.product.userLike == 1) {
  3944. this.collectionType = true
  3945. } else {
  3946. this.collectionType = false
  3947. }
  3948. //已删除/已冻结
  3949. if (this.product.validFlag === 0 || this.product.validFlag == 10) {
  3950. this.isInvalid = true
  3951. } else if (this.product.validFlag === 9) {
  3952. if (this.userIdentity == 1) {
  3953. this.isInvalid = false
  3954. } else {
  3955. this.isInvalid = true
  3956. }
  3957. }
  3958. this.ladderPriceFlag = this.product.ladderPriceFlag
  3959. this.html = this.adaptRichTextImg(this.product)
  3960. this.stock = this.product.stock
  3961. this.number = this.product.minBuyNumber
  3962. this.minBuyNumber = this.product.minBuyNumber
  3963. //处理商品图片列表
  3964. this.product.imageList.forEach(item => {
  3965. this.productImage.push(item.image)
  3966. })
  3967. //处理阶梯价格
  3968. if (this.product.ladderPriceList != null) {
  3969. this.ladderPriceList = this.product.ladderPriceList
  3970. }
  3971. //拆分金额并转千分位格式显示
  3972. if (this.product.price != null) {
  3973. this.retailPrice = this.product.price.toFixed(2)
  3974. }
  3975. //处理下架商品和售罄商品
  3976. if (this.product.validFlag == 3 || this.product.saleOutFlag === 1) {
  3977. this.isNoneDisabled = true
  3978. this.disabled = true
  3979. } else {
  3980. this.disabled = false
  3981. this.isNoneDisabled = false
  3982. this.goodsData.disabledText = ''
  3983. }
  3984. if (this.product.priceFlag == 1) {
  3985. this.disabled = true
  3986. } else if (this.product.priceFlag == 2) {
  3987. if (this.userIdentity == 4 && this.vipFlag != 1) {
  3988. this.disabled = true
  3989. } else {
  3990. this.disabled = false
  3991. }
  3992. } else if (this.product.priceFlag == 3) {
  3993. if (this.userIdentity == 4) {
  3994. this.disabled = true
  3995. } else if (this.userIdentity == 2 && this.firstClubType != 1) {
  3996. this.disabled = true
  3997. } else {
  3998. this.disabled = false
  3999. }
  4000. } else {
  4001. this.disabled = false
  4002. }
  4003. this.goodsData.disabled = this.disabled
  4004. this.goodsData.isNoneDisabled = this.isNoneDisabled
  4005. if (this.product.validFlag == 3) {
  4006. this.goodsData.disabledText = '下架'
  4007. }
  4008. if (this.product.validFlag == 10) {
  4009. this.goodsData.disabledText = '停售'
  4010. }
  4011. if (this.product.saleOutFlag === 1) {
  4012. this.goodsData.disabledText = '售罄'
  4013. }
  4014. console.log(this.disabled)
  4015. // setTimeout(() => {
  4016. // this.getSectionProps()
  4017. // }, 2000)
  4018. this.handleShowProductType(this.product.commodityDetailsFlag)
  4019. if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
  4020. this.ProductCartNumber()
  4021. }
  4022. this.queryProductDetilsCoupons()
  4023. this.getCommodityCombinationList()
  4024. // 特殊商品退货须知
  4025. this.returnGoodsStutas = response.data.returnGoodsStutas && response.data.returnGoodsStutas === 2 // 1:可以 2:不可以
  4026. this.helpContent = response.data.helpContent
  4027. setTimeout(() => {
  4028. this.skeletonShow = false
  4029. this.isRequest = true
  4030. }, 1000)
  4031. })
  4032. .catch(error => {
  4033. this.$util.msg(error.msg, 2000)
  4034. })
  4035. },
  4036. handleShowProductType(flag = '') {
  4037. // 根据商品详情可见度显示弹窗 flag 1.所有人可见 2.所有机构可见 3.仅会员机构可见 4.仅医美机构可见
  4038. const flagMap = {
  4039. '2': true,
  4040. '3': true,
  4041. '4': true
  4042. }
  4043. if (!this.hasLogin) {
  4044. this.showModal = flagMap[flag]
  4045. return
  4046. }
  4047. if (this.vipFlag === 1) {
  4048. this.showModal = false
  4049. return
  4050. }
  4051. if (flag === 3 && this.userIdentity === 4) {
  4052. this.showModal = true
  4053. return
  4054. }
  4055. if (flag === 4 && this.userIdentity === 4) {
  4056. this.showModal = true
  4057. return
  4058. }
  4059. if (flag === 4 && this.userIdentity === 2 && this.firstClubType !== 1) {
  4060. this.showModal = true
  4061. return
  4062. }
  4063. },
  4064. hideMobel1() {
  4065. this.modal1 = false
  4066. this.$api.navigateBack(1)
  4067. },
  4068. adaptRichTextImg(product) {
  4069. // 商品详情
  4070. let defaulHtml = '<div style="text-align: center;color:#333333;">暂无内容</div>'
  4071. let html = ''
  4072. if (product.productDetailChose == 1) {
  4073. // 同资质机构显示商品详情
  4074. html = product.productDetail ? this.$api.adaptRichTextImg(product.productDetail.detailInfo) : defaulHtml
  4075. } else {
  4076. if (this.hasLogin && this.userIdentity != 4) {
  4077. html = product.productDetail
  4078. ? this.$api.adaptRichTextImg(product.productDetail.detailInfo)
  4079. : defaulHtml
  4080. } else {
  4081. if (product.productDetail.commonDetailInfo) {
  4082. html = product.productDetail
  4083. ? this.$api.adaptRichTextImg(product.productDetail.commonDetailInfo)
  4084. : defaulHtml
  4085. } else {
  4086. html = defaulHtml
  4087. }
  4088. }
  4089. }
  4090. return html
  4091. },
  4092. getCommodityCombinationList() {
  4093. // 初始化商品详情配套商品
  4094. this.ProductService.getCommodityCombinationList({
  4095. userId: this.userId,
  4096. productId: this.productId,
  4097. source: 2,
  4098. pageNum: 1,
  4099. pageSize: 4
  4100. })
  4101. .then(response => {
  4102. const data = response.data
  4103. this.supportingList = data.results
  4104. this.supportingNum = data.totalRecord
  4105. if (this.supportingList.length > 0) {
  4106. if (!this.hasLogin || this.userIdentity == 2 || this.userIdentity == 4) {
  4107. this.isShowSupportingList = true
  4108. }
  4109. }
  4110. })
  4111. .catch(error => {
  4112. console.log('获取组合商品列表失败')
  4113. })
  4114. },
  4115. queryProductDetilsCoupons() {
  4116. // 初始化商品详情优惠券信息
  4117. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  4118. .then(response => {
  4119. this.productCoupon = response.data.list
  4120. })
  4121. .catch(error => {
  4122. console.log('获取优惠券列表失败')
  4123. })
  4124. },
  4125. queryPopupCoupons() {
  4126. // 获取弹窗优惠券列表
  4127. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  4128. .then(response => {
  4129. let data = response.data
  4130. this.navbar[0].num = data.notCouponNum
  4131. this.navbar[1].num = data.couponNum
  4132. if (data.couponList && data.couponList.length > 0) {
  4133. this.productCouponList = data.couponList
  4134. this.isCouponEmpty = false
  4135. } else {
  4136. this.isCouponEmpty = true
  4137. }
  4138. })
  4139. .catch(error => {
  4140. console.log('获取优惠券列表失败')
  4141. })
  4142. },
  4143. ProductCartNumber() {
  4144. // 获取用户购物车储量
  4145. this.ProductService.ProductCartNumber({ userId: this.userId })
  4146. .then(response => {
  4147. this.bottomCartNumber = response.data
  4148. })
  4149. .catch(error => {
  4150. console.log('获取购物车数量失败')
  4151. })
  4152. },
  4153. receiveCoupon(coupon) {
  4154. // 点击优惠券领取按钮,友盟埋点收集领取优惠券
  4155. if (process.env.NODE_ENV != 'development') {
  4156. this.$uma.trackEvent('Um_Event_productCouponReceive', {
  4157. Um_Key_PageName: '商品详情',
  4158. Um_Key_EvenName: '领取优惠券',
  4159. Um_Key_CouponId: `${coupon.couponId}`
  4160. })
  4161. }
  4162. this.ProductService.ReceiveCoupon({
  4163. userId: this.couponParam.userId,
  4164. couponId: coupon.couponId,
  4165. source: 1
  4166. })
  4167. .then(response => {
  4168. this.$util.msg('领取成功', 1500, true, 'success')
  4169. setTimeout(() => {
  4170. this.currentTab = 1
  4171. this.couponParam.status = 2
  4172. this.queryPopupCoupons()
  4173. }, 1500)
  4174. })
  4175. .catch(error => {
  4176. this.$util.msg(error.msg, 2000)
  4177. })
  4178. },
  4179. toDeductCoupon(coupon) {
  4180. // 点击采美豆抵扣优惠券
  4181. if (process.env.NODE_ENV != 'development') {
  4182. this.$uma.trackEvent('Um_Event_userCouponCollectionBuy', {
  4183. Um_Key_PageName: '领券中心',
  4184. Um_Key_EvenName: '抵扣优惠券',
  4185. Um_Key_CouponId: `${coupon.couponId}`
  4186. })
  4187. }
  4188. if (this.hasLogin) {
  4189. if (this.userIdentity === 1 || this.userIdentity === 3) {
  4190. this.$util.msg('您的身份暂不支持领取优惠券', 2000)
  4191. return
  4192. }
  4193. this.WeChatPayCouponBeans(coupon)
  4194. } else {
  4195. this.$api.navigateTo('/pages/login/login')
  4196. }
  4197. },
  4198. WeChatPayCouponBeans(coupon) {
  4199. // 采美豆抵扣优惠券
  4200. this.PayService.WeChatPayCouponBeans({
  4201. source: 1, //领取渠道 1 小程序 2 网站
  4202. userId: this.couponParam.userId,
  4203. couponId: coupon.couponId
  4204. })
  4205. .then(response => {
  4206. this.$util.msg('抵扣成功', 1500)
  4207. setTimeout(() => {
  4208. this.currentTab = 1
  4209. this.couponParam.status = 2
  4210. this.queryPopupCoupons()
  4211. }, 1500)
  4212. })
  4213. .catch(error => {
  4214. this.$util.msg(error.msg, 2000)
  4215. })
  4216. },
  4217. toPayCoupon(coupon) {
  4218. // 点击购买优惠券,友盟埋点收集购买优惠券
  4219. if (process.env.NODE_ENV != 'development') {
  4220. this.$uma.trackEvent('Um_Event_productCouponBuy', {
  4221. Um_Key_PageName: '商品详情',
  4222. Um_Key_EvenName: '购买优惠券',
  4223. Um_Key_CouponId: `${coupon.couponId}`
  4224. })
  4225. }
  4226. this.createCouponRecord(coupon)
  4227. },
  4228. createCouponRecord(coupon) {
  4229. // 生成购买优惠券记录Id
  4230. this.PayService.WeChatCouponRecord({
  4231. userId: this.userId,
  4232. couponId: coupon.couponId
  4233. })
  4234. .then(response => {
  4235. this.MiniWxPayFor(coupon, response.data.couponRecordId)
  4236. })
  4237. .catch(error => {
  4238. if (error.code == -1) {
  4239. //个人机构不能购买
  4240. this.contentModalText = '该优惠券仅限医美机构购买,请升级为医美机构后再次购买。'
  4241. this.modal = true
  4242. } else if (error.code == -2) {
  4243. //会员机构不是医美机构不能购买
  4244. this.$util.msg('该优惠券仅限医美机构购买', 2000)
  4245. }
  4246. })
  4247. },
  4248. async MiniWxPayFor(coupon, couponRecordId) {
  4249. const wechatcode = await authorize.getCode('weixin')
  4250. const params = {
  4251. userId: this.userId,
  4252. couponId: coupon.couponId,
  4253. couponRecordId: couponRecordId,
  4254. payType: 'XCX',
  4255. code: wechatcode,
  4256. source: 1 //支付来源 1 小程序 2 WWW
  4257. }
  4258. this.weChatMiniCouponWxPay(
  4259. params,
  4260. 'Um_Event_productCouponPay',
  4261. '商品详情',
  4262. '线上支付优惠券',
  4263. coupon.couponId,
  4264. this.userId
  4265. )
  4266. },
  4267. hideMobel() {
  4268. this.modal = false
  4269. },
  4270. handleClick(e) {
  4271. //个人机构跳转升级页面
  4272. if (e.index == 1) {
  4273. this.$api.navigateTo('/pages/login/apply')
  4274. }
  4275. this.modal = false
  4276. },
  4277. swiperChange(e) {
  4278. //顶部商品图片切换
  4279. const index = e.detail.current
  4280. this.current = index
  4281. },
  4282. previewImg1(url) {
  4283. let mentuzArray = []
  4284. mentuzArray.push(url)
  4285. uni.previewImage({
  4286. urls: mentuzArray,
  4287. current: 0
  4288. })
  4289. },
  4290. previewImg(index) {
  4291. //顶部商品图片预览
  4292. isPreviewImg = true
  4293. let previewUrls = this.productImage
  4294. uni.previewImage({
  4295. current: index, //图片索引
  4296. urls: previewUrls, //必须是http图片,本地图片无效
  4297. longPressActions: ''
  4298. })
  4299. },
  4300. //商品详情&&供应商信息tab切换
  4301. tabClick(index) {
  4302. // 重新标记
  4303. this.getSectionProps()
  4304. this.tabCurrentIndex = index
  4305. this.tabSelectFlag = true
  4306. let timer = null
  4307. clearTimeout(timer)
  4308. // 点击tab 300ms才执行跳转,避免出错(来回跳动)
  4309. timer = setTimeout(() => {
  4310. this.tabClickAction(index)
  4311. }, 500)
  4312. },
  4313. // 跳转执行
  4314. tabClickAction(index) {
  4315. const that = this
  4316. if (index === 4) {
  4317. return uni.pageScrollTo({
  4318. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  4319. scrollTop: this.sectionPropsArr[0].scrollTop
  4320. })
  4321. }
  4322. uni.pageScrollTo({
  4323. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  4324. scrollTop: this.sectionPropsArr[index].scrollTop,
  4325. success() {
  4326. setTimeout(() => {
  4327. that.tabSelectFlag = false
  4328. }, 300)
  4329. }
  4330. })
  4331. },
  4332. handleContact(e) {
  4333. //跳转小程序客服
  4334. console.log(e.detail.path)
  4335. console.log(e.detail.query)
  4336. },
  4337. buyProductCart() {
  4338. //底部购物车按钮点击
  4339. if (this.hasLogin) {
  4340. // 友盟埋点商品详情购物车入口点击事件
  4341. if (process.env.NODE_ENV != 'development') {
  4342. this.$uma.trackEvent('Um_Event_ProductShoppingCart', {
  4343. Um_Key_PageName: '去购物车',
  4344. Um_Key_SourcePage: '商品详情购物车入口'
  4345. })
  4346. }
  4347. this.$api.navigateTo('/pages/goods/cart')
  4348. } else {
  4349. this.$api.navigateTo('/pages/login/login?type=1')
  4350. }
  4351. },
  4352. btnGetConfirm(type) {
  4353. //加入购物车&&立即购买点击
  4354. if (this.hasLogin) {
  4355. this.btnType = type
  4356. this.popupShow3 = true
  4357. this.unitPopupType = 1
  4358. } else {
  4359. this.$api.navigateTo('/pages/login/login?type=1')
  4360. }
  4361. },
  4362. getAddProductCart() {
  4363. //增加购物车成功和toast弹窗提示成功
  4364. this.ProductService.shoppingAddCart({
  4365. productId: this.productId,
  4366. userId: this.userId,
  4367. productCount: this.number,
  4368. source: 2
  4369. })
  4370. .then(response => {
  4371. this.specClass = 'hide'
  4372. this.$util.msg('加入购物车成功', 1500, true, 'success')
  4373. this.isAnimation = true
  4374. setTimeout(() => {
  4375. this.specClass = 'none'
  4376. }, 200)
  4377. setTimeout(() => {
  4378. this.isAnimation = false
  4379. }, 2000)
  4380. this.bottomCartNumber = response.data
  4381. })
  4382. .catch(error => {
  4383. console.log('error', error.msg)
  4384. })
  4385. },
  4386. setHeaderBtnPosi() {
  4387. // 获得胶囊按钮位置信息
  4388. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  4389. return headerBtnPosi
  4390. },
  4391. setSysteminfo() {
  4392. let systeminfo
  4393. uni.getSystemInfo({
  4394. // 获取设备信息
  4395. success: res => {
  4396. systeminfo = res
  4397. }
  4398. })
  4399. return systeminfo
  4400. },
  4401. goIndex() {
  4402. //商城首页
  4403. uni.switchTab({
  4404. url: '/pages/tabBar/home/index'
  4405. })
  4406. },
  4407. goSupplier() {
  4408. //跳供应商资料页
  4409. if (!this.isShowCaimeiShop) {
  4410. this.$api.navigateTo('/pages/supplier/user/my-shop?shopId=' + this.shopId)
  4411. }
  4412. },
  4413. discard() {
  4414. //丢弃
  4415. },
  4416. onShare(res) {
  4417. //分享转发
  4418. if (res.from === 'button') {
  4419. // 来自页面内转发按钮
  4420. }
  4421. return {
  4422. title: `${this.product.name}`,
  4423. path: `pages/goods/product?type=share&id=${this.productId}`,
  4424. imageUrl: `${this.productImage[0]}`
  4425. }
  4426. },
  4427. // 分享海报
  4428. handleShare() {
  4429. this.posterData = {
  4430. productName: this.product.name,
  4431. productImage: this.productImage[0],
  4432. suid: this.suid,
  4433. path: 'pages/goods/product',
  4434. id: this.productId
  4435. }
  4436. this.$refs.sharePopup.open()
  4437. },
  4438. handleCollection() {
  4439. // 收藏
  4440. if (this.hasLogin) {
  4441. this.ProductService.getProductUserLike({
  4442. userId: this.userId,
  4443. productId: this.product.productId
  4444. })
  4445. .then(response => {
  4446. this.collectionType = !this.collectionType
  4447. this.$util.msg(response.data, 1500, true, 'success')
  4448. })
  4449. .catch(error => {
  4450. this.$util.msg(error.msg, 2000)
  4451. })
  4452. } else {
  4453. this.$api.navigateTo('/pages/login/login')
  4454. }
  4455. },
  4456. showPopup(index) {
  4457. switch (index) {
  4458. case 0:
  4459. this.popupShow0 = true
  4460. break
  4461. case 1:
  4462. this.popupShow1 = true
  4463. break
  4464. case 2:
  4465. if (this.hasLogin) {
  4466. this.queryPopupCoupons()
  4467. this.popupShow2 = true
  4468. } else {
  4469. this.$api.navigateTo('/pages/login/login')
  4470. }
  4471. break
  4472. case 3:
  4473. this.popupShow3 = true
  4474. this.unitPopupType = 2
  4475. break
  4476. }
  4477. },
  4478. hidePopup(index) {
  4479. switch (index) {
  4480. case 0:
  4481. this.popupShow0 = false
  4482. break
  4483. case 1:
  4484. this.popupShow1 = false
  4485. break
  4486. case 2:
  4487. this.popupShow2 = false
  4488. break
  4489. case 3:
  4490. this.popupShow3 = false
  4491. break
  4492. }
  4493. },
  4494. couponChange(e) {
  4495. this.currentTab = e.index
  4496. switch (this.currentTab) {
  4497. case 0:
  4498. this.couponParam.status = 1
  4499. this.queryPopupCoupons()
  4500. break
  4501. case 1:
  4502. this.couponParam.status = 2
  4503. this.queryPopupCoupons()
  4504. break
  4505. }
  4506. },
  4507. handleSupporting() {
  4508. // 跳转组合商品页面
  4509. this.$api.navigateTo(`/pages/goods/goods-supporting?productId=${this.productId}`)
  4510. },
  4511. // 获取每个tab对应区域的区间
  4512. async getSectionProps() {
  4513. const sectionPropsArr = [],
  4514. scrollTopArray = [],
  4515. className = 'product-details'
  4516. // 获取相关节点元素信息
  4517. const productMain = await this.$util.boundingClientRect(this, '.container-product-main', false)
  4518. const productDetail = await this.$util.boundingClientRect(this, '.product-details', true)
  4519. const topBar = await this.$util.boundingClientRect(this, '#topBar', false)
  4520. /*
  4521. 说明:采用累加方式来计算每一个 prdocut-details 的 scrollTop 定位
  4522. scrollTop = 上一个的scrollTop + 上一个的高度
  4523. */
  4524. productDetail.forEach((item, index) => {
  4525. // 上一个 prdocut-details 的 scrollTop 值
  4526. const prev = sectionPropsArr[index - 1]
  4527. const prevScrollTop = prev ? prev.scrollTop : productMain.height
  4528. // 上一个 prdocut-details 的高度
  4529. const add = productDetail[index - 1]
  4530. // 第一个需要减去tabs的高度
  4531. const addHeight = index === 0 ? (add ? add.height : 0) - topBar.height : add ? add.height : 0
  4532. sectionPropsArr.push({
  4533. className: `${className}${index}`,
  4534. scrollTop: prevScrollTop + addHeight
  4535. })
  4536. // - topBar.height
  4537. })
  4538. this.sectionPropsArr = sectionPropsArr
  4539. console.log('更新tab影响区域', this.sectionPropsArr)
  4540. },
  4541. //当滑动时也能同步激活tab
  4542. activeTab: debounce(
  4543. (top, _this) => {
  4544. const { sectionPropsArr } = _this
  4545. if (sectionPropsArr && sectionPropsArr.length > 0) {
  4546. sectionPropsArr.forEach((item, index) => {
  4547. // 当前位置为开始位置, 下个起始位置为结束位置
  4548. const openInterval = (index === 0 ? 0 : item.scrollTop) - 20 // 自定义偏移
  4549. const next = sectionPropsArr[index + 1]
  4550. const closedInterval = (next ? next.scrollTop : 10000000) - 20 // 自定义偏移
  4551. if (top >= openInterval && top < closedInterval) {
  4552. _this.tabCurrentIndex = index
  4553. }
  4554. })
  4555. }
  4556. },
  4557. 100,
  4558. true
  4559. ),
  4560. debounce(fn, delay) {
  4561. let timer = null //借助闭包
  4562. return function() {
  4563. if (timer) {
  4564. clearTimeout(timer)
  4565. }
  4566. timer = setTimeout(fn, delay) // 简化写法
  4567. }
  4568. },
  4569. clipboard(data) {
  4570. thorui.getClipboardData(data, res => {
  4571. if (res) {
  4572. this.$util.msg('复制成功', 2000, true, 'success')
  4573. } else {
  4574. this.$util.msg('复制失败', 2000, true, 'none')
  4575. }
  4576. })
  4577. },
  4578. getWinHeight() {
  4579. this.winHeight = wx.getSystemInfoSync().windowHeight
  4580. },
  4581. changePreViewImageStatus(falg) {
  4582. this.isPreviewImage = falg
  4583. }
  4584. },
  4585. onPageScroll(e) {
  4586. //实时获取到滚动的值
  4587. const { scrollTop } = e
  4588. this.debounce(this.getSectionProps(), 1000)
  4589. if (!this.tabSelectFlag) {
  4590. this.activeTab(scrollTop, this)
  4591. }
  4592. if (e.scrollTop > 60) {
  4593. this.headerColor = true
  4594. this.navbarFiexd = 'fixed'
  4595. this.isNavbarFiexd = true
  4596. this.nvabarData = {
  4597. showCapsule: 1,
  4598. title: '商品详情'
  4599. }
  4600. } else {
  4601. this.headerColor = false
  4602. this.isNavbarFiexd = false
  4603. this.navbarFiexd = 'none'
  4604. this.nvabarData = {
  4605. showCapsule: 1,
  4606. title: ''
  4607. }
  4608. }
  4609. if (e.scrollTop > 700) {
  4610. this.isScrollTop = true
  4611. } else {
  4612. this.isScrollTop = false
  4613. }
  4614. },
  4615. onShareAppMessage(res) {
  4616. //分享转发
  4617. if (res.from === 'button') {
  4618. // 来自页面内转发按钮
  4619. }
  4620. return {
  4621. title: `${this.product.name}`,
  4622. path: `pages/goods/product?type=4&id=${this.productId}&suid=${
  4623. this.userInfo.userIdentity === 1 ? this.userInfo.userId : 0
  4624. }&spId=${this.userInfo.userIdentity === 1 ? this.userInfo.serviceProviderId : 0}`,
  4625. imageUrl: `${this.productImage[0]}`
  4626. }
  4627. },
  4628. onShow() {
  4629. wxLogin.wxLoginAuthorize()
  4630. // 是否开启图片预览 true 不刷新调用接口 false刷新调用接口
  4631. if (!this.isPreviewImage) {
  4632. this.initGetStotage()
  4633. }
  4634. this.isPreviewImage = false
  4635. const suid = this.options.suid
  4636. ? this.options.suid
  4637. : this.scene.suid
  4638. ? this.scene.suid
  4639. : uni.getStorageSync('suid') * 1
  4640. ? uni.getStorageSync('suid') * 1
  4641. : 0 // 协销userId
  4642. const spId = this.options.spId
  4643. ? this.options.spId
  4644. : this.scene.spId
  4645. ? this.scene.spId
  4646. : uni.getStorageSync('spId') * 1
  4647. ? uni.getStorageSync('spId') * 1
  4648. : 0 // 协销id
  4649. const isShare = this.options.type == 4 ? true : this.scene.type == 4 ? true : false //是否从分享页进入
  4650. if ((isShare || uni.getStorageSync('suid') * 1 > 0) && this.userInfo.userIdentity !== 1) {
  4651. // 分享进入 且 用户非协销 或不是从分享进入有缓存
  4652. if (
  4653. !uni.getStorageSync('spUserId') ||
  4654. uni.getStorageSync('spUserId') * 1 === uni.getStorageSync('suid') * 1
  4655. ) {
  4656. // 如果未分配或者分配相同
  4657. this.suid = suid
  4658. uni.setStorageSync('suid', suid)
  4659. uni.setStorageSync('spId', spId)
  4660. } else {
  4661. uni.setStorageSync('suid', 0)
  4662. this.suid = 0
  4663. uni.setStorageSync('spId', 0)
  4664. }
  4665. }
  4666. console.log(this.suid, "uni.getStorageSync('spId')", uni.getStorageSync('spId'))
  4667. }
  4668. }
  4669. </script>
  4670. <style lang="scss">
  4671. page {
  4672. background-color: #ffffff;
  4673. }
  4674. .banner-section {
  4675. width: 100%;
  4676. height: 750rpx;
  4677. position: relative;
  4678. .cm-product-tags {
  4679. position: absolute;
  4680. right: 30rpx;
  4681. top: 0;
  4682. z-index: 999;
  4683. }
  4684. .cm-product-type {
  4685. width: 64rpx;
  4686. height: 64rpx;
  4687. text-align: justify;
  4688. box-sizing: border-box;
  4689. padding: 10rpx;
  4690. border-radius: 0 0 8rpx 8rpx;
  4691. background-color: #33ccbf;
  4692. font-size: $font-size-22;
  4693. color: #ffffff;
  4694. line-height: 25rpx;
  4695. position: absolute;
  4696. left: 30rpx;
  4697. top: 0;
  4698. z-index: 999;
  4699. }
  4700. .cm-product-cover {
  4701. width: 120rpx;
  4702. height: 77rpx;
  4703. line-height: 57rpx;
  4704. font-size: 24rpx;
  4705. color: #fff;
  4706. text-align: center;
  4707. background: url(https://static.caimei365.com/app/img/icon2/cm_cover_bg_app.png) no-repeat center;
  4708. background-size: 120rpx;
  4709. float: left;
  4710. position: absolute;
  4711. right: 30rpx;
  4712. top: 0;
  4713. z-index: 999;
  4714. }
  4715. }
  4716. .banner {
  4717. width: 100%;
  4718. height: 750rpx;
  4719. .product-img {
  4720. width: 750rpx;
  4721. }
  4722. image {
  4723. width: 100%;
  4724. height: 100%;
  4725. }
  4726. .banner-item {
  4727. position: relative;
  4728. }
  4729. }
  4730. .swiper__dots-box {
  4731. position: absolute;
  4732. color: #fff;
  4733. bottom: 30rpx;
  4734. right: 0;
  4735. }
  4736. .product-wrap {
  4737. width: 100%;
  4738. height: auto;
  4739. padding: 24rpx 0 0 0;
  4740. background-color: #ffffff;
  4741. border-bottom: 20rpx solid #f7f7f7;
  4742. .productRemarks {
  4743. height: 48rpx;
  4744. width: 100%;
  4745. float: left;
  4746. line-height: 48rpx;
  4747. font-size: 24rpx;
  4748. color: #999999;
  4749. text-align: left;
  4750. }
  4751. .wrap-top {
  4752. width: 702rpx;
  4753. padding: 0 24rpx;
  4754. height: auto;
  4755. float: left;
  4756. padding-bottom: 20rpx;
  4757. border-bottom: 1px solid #f8f8f8;
  4758. &.none {
  4759. .p-title {
  4760. color: #999999;
  4761. }
  4762. }
  4763. .p-title {
  4764. width: 100%;
  4765. height: auto;
  4766. float: left;
  4767. position: relative;
  4768. .p-title-name {
  4769. width: 602rpx;
  4770. height: auto;
  4771. float: left;
  4772. line-height: 48rpx;
  4773. font-size: $font-size-28;
  4774. color: $text-color;
  4775. -o-text-overflow: ellipsis;
  4776. text-overflow: ellipsis;
  4777. display: -webkit-box;
  4778. word-break: break-all;
  4779. -webkit-box-orient: vertical;
  4780. -webkit-line-clamp: 2;
  4781. overflow: hidden;
  4782. &.indent {
  4783. text-indent: 95rpx;
  4784. }
  4785. }
  4786. .mclap-tag {
  4787. display: block;
  4788. width: 84rpx;
  4789. height: 32rpx;
  4790. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  4791. border-radius: 4rpx 48rpx 4px 4px;
  4792. line-height: 32rpx;
  4793. font-size: $font-size-22;
  4794. color: #ffffff;
  4795. text-align: center;
  4796. position: absolute;
  4797. left: 0;
  4798. top: 6rpx;
  4799. }
  4800. .p-title-share {
  4801. width: 96rpx;
  4802. height: 96rpx;
  4803. position: absolute;
  4804. right: 0;
  4805. text-align: center;
  4806. color: #999999;
  4807. font-size: $font-size-24;
  4808. box-sizing: border-box;
  4809. display: block;
  4810. background: transparent;
  4811. border-radius: 0;
  4812. border: 0;
  4813. margin: 0;
  4814. padding: 8rpx 0;
  4815. z-index: 20;
  4816. .icon-fenxiang1 {
  4817. font-size: $font-size-34;
  4818. }
  4819. }
  4820. .tui-share-btn::after {
  4821. border: 0;
  4822. }
  4823. }
  4824. .wrap-main-text {
  4825. line-height: 56rpx;
  4826. color: #ff2a2a;
  4827. font-size: $font-size-26;
  4828. display: block;
  4829. float: left;
  4830. font-weight: normal;
  4831. }
  4832. .wrap-main-none {
  4833. display: block;
  4834. width: 256rpx;
  4835. height: 44rpx;
  4836. padding-left: 20rpx;
  4837. border-radius: 11rpx;
  4838. background: $btn-confirm;
  4839. float: right;
  4840. line-height: 44rpx;
  4841. color: #ffffff;
  4842. text-align: center;
  4843. font-size: $font-size-24;
  4844. }
  4845. .p-price-none {
  4846. height: 44rpx;
  4847. line-height: 44rpx;
  4848. float: left;
  4849. font-size: $font-size-24;
  4850. color: #666;
  4851. text-decoration: line-through;
  4852. margin-left: 8rpx;
  4853. }
  4854. .p-minBuy {
  4855. height: 44rpx;
  4856. line-height: 44rpx;
  4857. float: right;
  4858. padding: 0 18rpx;
  4859. border-radius: 22rpx;
  4860. background-color: #f7f7f7;
  4861. color: #7f7f7f;
  4862. font-size: 24rpx;
  4863. text-align: center;
  4864. .min-text {
  4865. margin: 0 6rpx;
  4866. }
  4867. }
  4868. .p-login {
  4869. height: 56rpx;
  4870. line-height: 56rpx;
  4871. color: $color-system;
  4872. font-size: $font-size-24;
  4873. &.grade {
  4874. .price-left {
  4875. float: left;
  4876. .none {
  4877. display: block;
  4878. font-size: $font-size-20;
  4879. line-height: 48rpx;
  4880. color: #4a4b54;
  4881. float: left;
  4882. font-weight: bold;
  4883. margin-left: 5rpx;
  4884. text {
  4885. letter-spacing: 4rpx;
  4886. font-size: $font-size-32;
  4887. }
  4888. }
  4889. }
  4890. }
  4891. .p-no {
  4892. float: left;
  4893. margin-right: 5rpx;
  4894. font-size: $font-size-28;
  4895. color: $text-color;
  4896. }
  4897. .p-login-btn {
  4898. display: block;
  4899. height: 44rpx;
  4900. padding: 0 10rpx 0 20rpx;
  4901. border-radius: 11rpx;
  4902. background: $btn-confirm;
  4903. float: right;
  4904. line-height: 44rpx;
  4905. color: #ffffff;
  4906. text-align: center;
  4907. font-size: $font-size-24;
  4908. }
  4909. }
  4910. }
  4911. .wrap-label {
  4912. float: left;
  4913. width: 85%;
  4914. box-sizing: border-box;
  4915. .label-a {
  4916. padding: 0 18rpx;
  4917. line-height: 32rpx;
  4918. font-size: $font-size-20;
  4919. color: $color-system;
  4920. text-align: center;
  4921. border-radius: 6rpx;
  4922. background: #ffe6dc;
  4923. margin: 0 20rpx 15rpx 0;
  4924. display: inline-block;
  4925. }
  4926. }
  4927. .wrap-top-price {
  4928. float: left;
  4929. width: 100%;
  4930. box-sizing: border-box;
  4931. .wrap-main-item {
  4932. width: 100%;
  4933. height: 56rpx;
  4934. .p-price {
  4935. height: 56rpx;
  4936. line-height: 56rpx;
  4937. float: left;
  4938. color: #ff2a2a;
  4939. font-weight: bold;
  4940. &.none {
  4941. text-decoration: line-through;
  4942. color: #999999;
  4943. font-weight: normal;
  4944. }
  4945. .txt {
  4946. margin: 0 2rpx;
  4947. }
  4948. .txt.sm {
  4949. font-size: $font-size-26;
  4950. }
  4951. .txt.big {
  4952. font-size: $font-size-34;
  4953. }
  4954. }
  4955. .p-right-price {
  4956. height: 56rpx;
  4957. line-height: 56rpx;
  4958. float: right;
  4959. color: #999999;
  4960. font-size: $font-size-30;
  4961. .none {
  4962. font-size: $font-size-26;
  4963. text-decoration: line-through;
  4964. }
  4965. }
  4966. }
  4967. .floor-item-act {
  4968. height: 56rpx;
  4969. text-align: center;
  4970. box-sizing: border-box;
  4971. float: left;
  4972. padding: 10rpx 0;
  4973. margin-left: 10rpx;
  4974. }
  4975. .floor-item-btn {
  4976. float: right;
  4977. height: 40rpx;
  4978. margin-top: 8rpx;
  4979. margin-left: 10rpx;
  4980. .btn {
  4981. line-height: 40rpx;
  4982. padding: 0 20rpx;
  4983. height: 40rpx;
  4984. background: $btn-confirm;
  4985. color: #ffffff;
  4986. font-size: $font-size-20;
  4987. border-radius: 4rpx;
  4988. }
  4989. }
  4990. }
  4991. .wrap-info {
  4992. float: left;
  4993. width: 702rpx;
  4994. padding: 24rpx 24rpx 0 24rpx;
  4995. border-bottom: 1px solid #f8f8f8;
  4996. .info-viewT {
  4997. width: 100%;
  4998. min-height: 40rpx;
  4999. font-size: $font-size-28;
  5000. color: $text-color;
  5001. line-height: 40rpx;
  5002. text-align: left;
  5003. &.none {
  5004. color: #999999;
  5005. }
  5006. .info-viewL {
  5007. min-width: 350rpx;
  5008. float: left;
  5009. margin-bottom: 24rpx;
  5010. }
  5011. .info-viewR {
  5012. min-width: 352rpx;
  5013. float: left;
  5014. margin-bottom: 24rpx;
  5015. }
  5016. }
  5017. .info-viewB {
  5018. width: 100%;
  5019. height: auto;
  5020. }
  5021. .info-f {
  5022. width: 50%;
  5023. float: left;
  5024. font-size: $font-size-28;
  5025. color: $text-color;
  5026. line-height: 40rpx;
  5027. margin-bottom: 24rpx;
  5028. text-align: left;
  5029. }
  5030. }
  5031. }
  5032. .product-seve {
  5033. width: 100%;
  5034. height: 60rpx;
  5035. background-color: #ffffff;
  5036. position: relative;
  5037. display: flex;
  5038. line-height: 60rpx;
  5039. .label {
  5040. font-size: $font-size-28;
  5041. color: #333333;
  5042. }
  5043. .iconfont {
  5044. color: #fea785;
  5045. margin-right: 20rpx;
  5046. font-size: $font-size-22;
  5047. }
  5048. .text {
  5049. font-size: $font-size-22;
  5050. color: #fea785;
  5051. margin-left: 10rpx;
  5052. }
  5053. }
  5054. .product-item-none {
  5055. min-height: 348rpx;
  5056. display: flex;
  5057. flex-direction: column;
  5058. align-items: center;
  5059. border-bottom: 20rpx solid #f7f7f7;
  5060. box-sizing: border-box;
  5061. padding: 40rpx 0;
  5062. .none-image {
  5063. width: 284rpx;
  5064. height: 225rpx;
  5065. }
  5066. .none-text {
  5067. text-align: center;
  5068. font-size: $font-size-28;
  5069. color: #fea785;
  5070. line-height: 40rpx;
  5071. }
  5072. }
  5073. .product-supporting {
  5074. width: 100%;
  5075. height: 274rpx;
  5076. box-sizing: border-box;
  5077. padding: 30rpx 24rpx;
  5078. background-color: #ffffff;
  5079. border-bottom: 20rpx solid #f7f7f7;
  5080. .product-supporting-title {
  5081. width: 100%;
  5082. height: 40rpx;
  5083. text-align: left;
  5084. line-height: 40rpx;
  5085. font-size: $font-size-28;
  5086. color: #333333;
  5087. }
  5088. .product-supporting-list {
  5089. width: 100%;
  5090. height: 154rpx;
  5091. box-sizing: border-box;
  5092. padding: 13rpx 0;
  5093. position: relative;
  5094. .icon-xiayibu {
  5095. line-height: 154rpx;
  5096. display: inline-block;
  5097. position: absolute;
  5098. width: 80rpx;
  5099. top: 0;
  5100. right: 0;
  5101. color: #b2b2b2;
  5102. text-align: right;
  5103. }
  5104. .list {
  5105. width: 128rpx;
  5106. height: 128rpx;
  5107. margin-right: 24rpx;
  5108. float: left;
  5109. border: 1px solid #e1e1e1;
  5110. border-radius: 8rpx;
  5111. .list-image {
  5112. width: 100%;
  5113. height: 100%;
  5114. display: block;
  5115. border-radius: 8rpx;
  5116. }
  5117. }
  5118. }
  5119. }
  5120. .return-instructions {
  5121. padding: 0 24rpx;
  5122. border-bottom: 20rpx solid #f7f7f7;
  5123. }
  5124. .product-parameter {
  5125. width: 702rpx;
  5126. height: 90rpx;
  5127. padding: 0 24rpx;
  5128. background-color: #ffffff;
  5129. position: relative;
  5130. border-bottom: 20rpx solid #f7f7f7;
  5131. &.coupon {
  5132. .title {
  5133. color: #f94b4b;
  5134. }
  5135. .icon-xiayibu {
  5136. color: #f94b4b;
  5137. }
  5138. .coupon {
  5139. float: right;
  5140. box-sizing: border-box;
  5141. padding: 29rpx 0;
  5142. padding-right: 35rpx;
  5143. .tags {
  5144. height: 32rpx;
  5145. box-sizing: border-box;
  5146. border-radius: 8rpx;
  5147. background-color: #fff1eb;
  5148. line-height: 28rpx;
  5149. color: #f94b4b;
  5150. text-align: center;
  5151. display: inline-block;
  5152. padding: 0 10rpx;
  5153. font-size: $font-size-20;
  5154. border: 1px solid #f94b4b;
  5155. float: right;
  5156. margin: 0 6rpx;
  5157. }
  5158. }
  5159. }
  5160. .title {
  5161. line-height: 90rpx;
  5162. display: inline-block;
  5163. float: left;
  5164. font-size: $font-size-28;
  5165. color: #666666;
  5166. }
  5167. .name {
  5168. line-height: 90rpx;
  5169. display: inline-block;
  5170. float: left;
  5171. font-size: $font-size-28;
  5172. color: $text-color;
  5173. padding-right: 48rpx;
  5174. overflow: hidden;
  5175. text-overflow: ellipsis;
  5176. white-space: nowrap;
  5177. text-align: right;
  5178. }
  5179. .icon-xiayibu {
  5180. line-height: 90rpx;
  5181. display: inline-block;
  5182. position: absolute;
  5183. width: 48rpx;
  5184. top: 0;
  5185. right: 0;
  5186. color: #b2b2b2;
  5187. }
  5188. }
  5189. .product-supplier {
  5190. width: 100%;
  5191. height: 174rpx;
  5192. padding: 30rpx 24rpx;
  5193. box-sizing: border-box;
  5194. background-color: #ffffff;
  5195. position: relative;
  5196. box-sizing: border-box;
  5197. border-bottom: 20rpx solid #f7f7f7;
  5198. .logo {
  5199. width: 128rpx;
  5200. height: 92rpx;
  5201. float: left;
  5202. border: 1px solid #efefef;
  5203. border-radius: 6rpx;
  5204. image {
  5205. width: 100%;
  5206. height: 100%;
  5207. display: block;
  5208. border-radius: 6rpx;
  5209. }
  5210. }
  5211. .main {
  5212. width: 470rpx;
  5213. height: 92rpx;
  5214. float: left;
  5215. margin-left: 20rpx;
  5216. .name {
  5217. width: 100%;
  5218. line-height: 46rpx;
  5219. float: left;
  5220. font-size: $font-size-28;
  5221. color: $text-color;
  5222. float: right;
  5223. overflow: hidden;
  5224. text-overflow: ellipsis;
  5225. white-space: nowrap;
  5226. text-align: left;
  5227. }
  5228. .massgs {
  5229. width: 100%;
  5230. line-height: 46rpx;
  5231. float: left;
  5232. font-size: $font-size-24;
  5233. color: #999999;
  5234. .label {
  5235. float: left;
  5236. }
  5237. .p-stars {
  5238. float: left;
  5239. margin-left: 20rpx;
  5240. }
  5241. .acount {
  5242. float: right;
  5243. text {
  5244. color: $color-system;
  5245. }
  5246. }
  5247. }
  5248. }
  5249. .icon-xiayibu {
  5250. line-height: 154rpx;
  5251. display: inline-block;
  5252. position: absolute;
  5253. width: 48rpx;
  5254. top: 0;
  5255. right: 0;
  5256. color: #b2b2b2;
  5257. }
  5258. }
  5259. .product-details {
  5260. width: 100%;
  5261. background: #ffffff;
  5262. border-bottom: 20rpx solid #f7f7f7;
  5263. &.recommend {
  5264. background-color: #f7f7f7;
  5265. border-bottom: none;
  5266. .title {
  5267. .title-tab {
  5268. background-color: #f7f7f7;
  5269. color: $text-color;
  5270. }
  5271. }
  5272. }
  5273. .product-details-image {
  5274. width: 100%;
  5275. min-height: 856rpx;
  5276. box-sizing: border-box;
  5277. padding: 0 24rpx;
  5278. .product-details-table {
  5279. width: 100%;
  5280. min-height: 160rpx;
  5281. border: 1px solid #e1e1e1;
  5282. border-radius: 10rpx;
  5283. .ladder-tr {
  5284. display: flex;
  5285. width: 100%;
  5286. justify-content: center;
  5287. height: 80rpx;
  5288. align-items: center;
  5289. border-bottom: 1px solid #e1e1e1;
  5290. &:last-child {
  5291. border-bottom: none;
  5292. }
  5293. .ladder-item-td {
  5294. height: 80rpx;
  5295. justify-content: center;
  5296. text-align: center;
  5297. box-sizing: border-box;
  5298. padding: 10rpx;
  5299. float: left;
  5300. .te-text {
  5301. line-height: 28rpx;
  5302. font-size: $font-size-24;
  5303. text-overflow: ellipsis;
  5304. display: -webkit-box;
  5305. word-break: break-all;
  5306. -webkit-box-orient: vertical;
  5307. -webkit-line-clamp: 2;
  5308. overflow: hidden;
  5309. color: #999999;
  5310. &.last {
  5311. width: 60%;
  5312. float: left;
  5313. }
  5314. }
  5315. .te-copy {
  5316. width: 40%;
  5317. float: right;
  5318. font-size: $font-size-24;
  5319. padding-top: 10rpx;
  5320. .clipboard {
  5321. width: 84rpx;
  5322. height: 36rpx;
  5323. background: #4688fa;
  5324. text-align: center;
  5325. font-size: $font-size-24;
  5326. color: #ffffff;
  5327. border-radius: 18rpx;
  5328. line-height: 36rpx;
  5329. display: inline-block;
  5330. }
  5331. }
  5332. &.th {
  5333. display: flex;
  5334. height: 80rpx;
  5335. align-items: center;
  5336. line-height: 80rpx;
  5337. font-size: 26rpx;
  5338. color: #666;
  5339. }
  5340. &:nth-child(1) {
  5341. width: 25%;
  5342. border-right: 1px solid #e1e1e1;
  5343. }
  5344. &:nth-child(2) {
  5345. width: 35%;
  5346. border-right: 1px solid #e1e1e1;
  5347. }
  5348. &:nth-child(3) {
  5349. width: 40%;
  5350. }
  5351. }
  5352. }
  5353. }
  5354. .qualificationImg-image {
  5355. width: 100%;
  5356. height: 856rpx;
  5357. display: block;
  5358. }
  5359. }
  5360. .product-rich-text-none {
  5361. box-sizing: border-box;
  5362. padding: 0 24rpx;
  5363. text-align: left;
  5364. font-size: 24rpx;
  5365. color: #999999;
  5366. line-height: 60rpx;
  5367. &.bold {
  5368. font-weight: bold;
  5369. color: #333333;
  5370. }
  5371. }
  5372. .content-none {
  5373. width: 100%;
  5374. height: 80rpx;
  5375. line-height: 80rpx;
  5376. text-align: left;
  5377. font-size: $font-size-26;
  5378. color: #999999;
  5379. box-sizing: border-box;
  5380. padding: 0 24rpx;
  5381. }
  5382. .title {
  5383. width: 100%;
  5384. box-sizing: border-box;
  5385. padding: 0 24rpx;
  5386. .title-tab {
  5387. width: 100%;
  5388. height: 100rpx;
  5389. background: #fff;
  5390. z-index: 10;
  5391. font-size: $font-size-30;
  5392. text-align: left;
  5393. color: $text-color;
  5394. line-height: 100rpx;
  5395. font-weight: 600;
  5396. }
  5397. .title-msg {
  5398. width: 100%;
  5399. height: 236rpx;
  5400. padding: 18rpx;
  5401. background-color: rgba(225, 86, 22, 0.1);
  5402. color: $color-system;
  5403. box-sizing: border-box;
  5404. margin-bottom: 30rpx;
  5405. .tit {
  5406. line-height: 46rpx;
  5407. font-size: $font-size-24;
  5408. text-align: left;
  5409. }
  5410. .txt {
  5411. line-height: 38rpx;
  5412. font-size: $font-size-20;
  5413. text-align: justify;
  5414. }
  5415. }
  5416. }
  5417. .content {
  5418. width: 100%;
  5419. background-color: #ffffff;
  5420. }
  5421. }
  5422. .isLower {
  5423. width: 100%;
  5424. height: 116rpx;
  5425. line-height: 116rpx;
  5426. text-align: center;
  5427. color: #000000;
  5428. font-size: $font-size-32;
  5429. font-weight: bold;
  5430. }
  5431. .bottom-btn {
  5432. width: 100%;
  5433. height: 100rpx;
  5434. position: fixed;
  5435. bottom: 0;
  5436. left: 0;
  5437. background: #ffffff;
  5438. z-index: 99;
  5439. .bottom-le {
  5440. width: 300rpx;
  5441. height: 100rpx;
  5442. padding: 10rpx 20rpx 10rpx 0;
  5443. float: left;
  5444. box-sizing: border-box;
  5445. .item-bt {
  5446. width: 80rpx;
  5447. height: 100%;
  5448. margin-right: 15rpx;
  5449. display: flex;
  5450. float: left;
  5451. flex-direction: column;
  5452. align-items: center;
  5453. justify-content: center;
  5454. font-size: $font-size-22;
  5455. color: $text-color;
  5456. line-height: 34rpx;
  5457. position: relative;
  5458. .animation-num {
  5459. font-size: $font-size-32;
  5460. color: #ff2a2a;
  5461. position: absolute;
  5462. top: -12rpx;
  5463. right: 4rpx;
  5464. font-weight: bold;
  5465. }
  5466. .animation {
  5467. animation: showAmnation 2.2s ease-in-out both;
  5468. }
  5469. .restion {
  5470. animation: hideAmnation 1s ease-in-out both;
  5471. }
  5472. .icon-num {
  5473. position: absolute;
  5474. right: -12rpx;
  5475. top: -5rpx;
  5476. }
  5477. .icon-num.goleft {
  5478. right: 2rpx;
  5479. }
  5480. &:last-child {
  5481. margin-right: 0;
  5482. }
  5483. image {
  5484. width: 44rpx;
  5485. height: 44rpx;
  5486. }
  5487. button.contact-btn {
  5488. width: 100%;
  5489. height: 100%;
  5490. margin: 0;
  5491. padding: 0;
  5492. display: flex;
  5493. flex-direction: column;
  5494. align-items: center;
  5495. justify-content: center;
  5496. box-sizing: border-box;
  5497. font-size: $font-size-24;
  5498. text-align: center;
  5499. text-decoration: none;
  5500. line-height: 34rpx;
  5501. border-radius: 0;
  5502. -webkit-tap-highlight-color: transparent;
  5503. overflow: hidden;
  5504. color: $text-color;
  5505. background-color: #ffffff;
  5506. }
  5507. }
  5508. }
  5509. .bottom-ri {
  5510. width: 450rpx;
  5511. height: 100%;
  5512. float: right;
  5513. display: flex;
  5514. box-sizing: border-box;
  5515. padding: 13rpx 20rpx 13rpx 0;
  5516. .btn {
  5517. flex: 1;
  5518. width: 200rpx;
  5519. line-height: 80rpx;
  5520. text-align: center;
  5521. font-size: $font-size-24;
  5522. color: #ffffff;
  5523. }
  5524. .btn-cart {
  5525. background-color: #ffe6dc;
  5526. color: $color-system;
  5527. border-radius: 42rpx 0 0 42rpx;
  5528. }
  5529. .btn-cart.disabled {
  5530. background-color: #e1e1e1;
  5531. color: #ffffff;
  5532. }
  5533. .btn-bay {
  5534. background: linear-gradient(to right, #f28f31 0%, #ff5b00 100%);
  5535. border-radius: 0 42rpx 42rpx 0;
  5536. }
  5537. .btn-bay.disabled {
  5538. background: linear-gradient(135deg, rgba(242, 143, 49, 0.5) 0%, rgba(225, 86, 22, 0.5) 100%);
  5539. }
  5540. }
  5541. }
  5542. .uni-badge--small {
  5543. -webkit-transform: scale(0.8);
  5544. -ms-transform: scale(0.8);
  5545. transform: scale(0.8);
  5546. -webkit-transform-origin: center center;
  5547. -ms-transform-origin: center center;
  5548. transform-origin: center center;
  5549. }
  5550. .uni-badge {
  5551. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  5552. -webkit-box-sizing: border-box;
  5553. box-sizing: border-box;
  5554. font-size: 12px;
  5555. line-height: 1;
  5556. display: inline-block;
  5557. padding: 3px 6px;
  5558. color: #333;
  5559. border-radius: 100px;
  5560. background-color: #f1f1f1;
  5561. }
  5562. .uni-badge-error {
  5563. color: #fff;
  5564. background-color: #dd524d;
  5565. }
  5566. .product-topnav {
  5567. width: 100%;
  5568. height: 174rpx;
  5569. box-sizing: border-box;
  5570. background: #ffffff;
  5571. z-index: 990;
  5572. position: fixed;
  5573. opacity: 1;
  5574. left: 0;
  5575. &.fixed {
  5576. animation: showFixedColor 0.1s ease-in-out both;
  5577. }
  5578. &.none {
  5579. animation: hideFixedColor 0.1s ease-in-out both;
  5580. }
  5581. .navbar {
  5582. width: 100%;
  5583. height: 60rpx;
  5584. box-sizing: border-box;
  5585. padding: 0 24rpx;
  5586. display: flex;
  5587. .nav-item {
  5588. display: flex;
  5589. flex: 1;
  5590. justify-content: center;
  5591. align-items: center;
  5592. height: 60rpx;
  5593. font-size: $font-size-28;
  5594. color: $text-color;
  5595. position: relative;
  5596. float: left;
  5597. position: relative;
  5598. .line {
  5599. width: 60rpx;
  5600. height: 2px;
  5601. border-radius: 1px;
  5602. background: #ffffff;
  5603. position: absolute;
  5604. bottom: 0;
  5605. left: 50%;
  5606. margin-left: -30rpx;
  5607. }
  5608. &.current {
  5609. color: $color-system;
  5610. .line {
  5611. background: $color-system;
  5612. }
  5613. }
  5614. }
  5615. }
  5616. .search-input {
  5617. width: 100%;
  5618. height: 114rpx;
  5619. padding: 24rpx;
  5620. box-sizing: border-box;
  5621. .gosearch-btn {
  5622. width: 100%;
  5623. height: 100%;
  5624. border-radius: 40rpx;
  5625. margin: 0 auto;
  5626. font-size: 26rpx;
  5627. line-height: 66rpx;
  5628. color: #b2b2b2;
  5629. position: relative;
  5630. box-sizing: border-box;
  5631. padding-left: 66rpx;
  5632. &.fixed {
  5633. background: rgba(70, 70, 70, 0.1);
  5634. }
  5635. &.none {
  5636. background: rgba(70, 70, 70, 0.1);
  5637. }
  5638. .search-icon {
  5639. width: 66rpx;
  5640. height: 66rpx;
  5641. position: absolute;
  5642. left: 0;
  5643. top: 2rpx;
  5644. text-align: center;
  5645. line-height: 66rpx;
  5646. .icon-iconfonticonfontsousuo1 {
  5647. margin: 0 6rpx;
  5648. font-size: $font-size-34;
  5649. color: #b2b2b2;
  5650. z-index: 10;
  5651. }
  5652. }
  5653. .search-text {
  5654. font-size: $font-size-24;
  5655. line-height: 66rpx;
  5656. color: #b2b2b2;
  5657. }
  5658. }
  5659. }
  5660. }
  5661. @keyframes showFixedColor {
  5662. 0% {
  5663. background: rgba(255, 255, 255, 0);
  5664. }
  5665. 50% {
  5666. background: rgba(255, 255, 255, 0.5);
  5667. }
  5668. 100% {
  5669. background: rgba(255, 255, 255, 1);
  5670. }
  5671. }
  5672. @keyframes hideFixedColor {
  5673. 0% {
  5674. background: rgba(255, 255, 255, 1);
  5675. }
  5676. 50% {
  5677. background: rgba(255, 255, 255, 0.5);
  5678. }
  5679. 100% {
  5680. background: rgba(255, 255, 255, 0);
  5681. }
  5682. }
  5683. /* 加入购物模态层*/
  5684. @keyframes showPopup {
  5685. 0% {
  5686. opacity: 0;
  5687. }
  5688. 100% {
  5689. opacity: 1;
  5690. }
  5691. }
  5692. @keyframes hidePopup {
  5693. 0% {
  5694. opacity: 1;
  5695. }
  5696. 100% {
  5697. opacity: 0;
  5698. }
  5699. }
  5700. @keyframes showLayer {
  5701. 0% {
  5702. transform: translateY(0);
  5703. }
  5704. 100% {
  5705. transform: translateY(-100%);
  5706. }
  5707. }
  5708. @keyframes hideLayer {
  5709. 0% {
  5710. transform: translateY(-100%);
  5711. }
  5712. 100% {
  5713. transform: translateY(0);
  5714. }
  5715. }
  5716. @keyframes showAmnation {
  5717. 0% {
  5718. top: -12rpx;
  5719. opacity: 0;
  5720. }
  5721. 50% {
  5722. top: -60rpx;
  5723. opacity: 1;
  5724. }
  5725. 100% {
  5726. top: -100rpx;
  5727. opacity: 0;
  5728. }
  5729. }
  5730. @keyframes hideAmnation {
  5731. 0% {
  5732. top: -100rpx;
  5733. opacity: 0;
  5734. }
  5735. 100% {
  5736. top: -12rpx;
  5737. opacity: 0;
  5738. }
  5739. }
  5740. .tui-popup-box {
  5741. position: relative;
  5742. box-sizing: border-box;
  5743. min-height: 220rpx;
  5744. padding: 40rpx 24rpx 0 24rpx;
  5745. .tui-popup-close {
  5746. width: 90rpx;
  5747. height: 90rpx;
  5748. position: absolute;
  5749. right: 0;
  5750. top: 24rpx;
  5751. line-height: 90rpx;
  5752. text-align: center;
  5753. color: #b2b2b2;
  5754. .icon-iconfontguanbi {
  5755. font-size: $font-size-40;
  5756. }
  5757. }
  5758. .title {
  5759. font-size: $font-size-34;
  5760. color: $text-color;
  5761. line-height: 88rpx;
  5762. text-align: center;
  5763. float: left;
  5764. width: 100%;
  5765. height: 88rpx;
  5766. font-weight: bold;
  5767. }
  5768. .tui-popup-main {
  5769. width: 100%;
  5770. float: left;
  5771. &.coupon {
  5772. padding-bottom: 40rpx;
  5773. .coupon-empty {
  5774. width: 100%;
  5775. height: 600rpx;
  5776. display: flex;
  5777. align-items: center;
  5778. justify-content: center;
  5779. flex-direction: column;
  5780. position: fixed;
  5781. background: $bg-color;
  5782. .empty-container-image {
  5783. width: 150rpx;
  5784. height: 150rpx;
  5785. margin-bottom: 0;
  5786. margin-top: 0;
  5787. }
  5788. .error-text {
  5789. font-size: $font-size-28;
  5790. color: #999999;
  5791. line-height: 88rpx;
  5792. }
  5793. }
  5794. }
  5795. .tui-popup-scroll {
  5796. width: 100%;
  5797. height: 600rpx;
  5798. .coupon-list {
  5799. width: 100%;
  5800. height: 200rpx;
  5801. margin-top: 24rpx;
  5802. box-sizing: border-box;
  5803. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  5804. background-size: cover;
  5805. &:last-child {
  5806. margin-bottom: 24rpx;
  5807. }
  5808. .list-cell-le {
  5809. width: 224rpx;
  5810. height: 100%;
  5811. box-sizing: border-box;
  5812. padding: 37rpx 0;
  5813. float: left;
  5814. .coupon-maxMoney {
  5815. width: 100%;
  5816. height: 78rpx;
  5817. line-height: 78rpx;
  5818. font-size: 56rpx;
  5819. color: #ffffff;
  5820. text-align: center;
  5821. .small {
  5822. font-size: $font-size-24;
  5823. }
  5824. }
  5825. .coupon-minMoney {
  5826. width: 100%;
  5827. height: 33rpx;
  5828. line-height: 33rpx;
  5829. font-size: $font-size-24;
  5830. color: #ffffff;
  5831. text-align: center;
  5832. }
  5833. }
  5834. .list-cell-ri {
  5835. width: 478rpx;
  5836. height: 100%;
  5837. box-sizing: border-box;
  5838. padding: 20rpx 24rpx 0 24rpx;
  5839. float: right;
  5840. .list-cell-top {
  5841. width: 100%;
  5842. height: 121rpx;
  5843. float: left;
  5844. border-bottom: 1px solid #e1e1e1;
  5845. .list-cell-type {
  5846. width: 286rpx;
  5847. height: 100%;
  5848. float: left;
  5849. .list-cell-tags {
  5850. width: 100%;
  5851. height: 32rpx;
  5852. margin-bottom: 7rpx;
  5853. .tags {
  5854. display: inline-block;
  5855. padding: 0 10rpx;
  5856. height: 32rpx;
  5857. line-height: 32rpx;
  5858. background-color: #ffdcce;
  5859. color: #f94b4b;
  5860. font-size: $font-size-20;
  5861. border-radius: 8rpx;
  5862. text-align: center;
  5863. float: left;
  5864. }
  5865. }
  5866. .list-cell-texts {
  5867. width: 100%;
  5868. height: auto;
  5869. line-height: 35rpx;
  5870. text-overflow: ellipsis;
  5871. display: -webkit-box;
  5872. word-break: break-all;
  5873. -webkit-box-orient: vertical;
  5874. -webkit-line-clamp: 2;
  5875. overflow: hidden;
  5876. font-size: 26rpx;
  5877. color: #333333;
  5878. }
  5879. }
  5880. .list-cell-btn {
  5881. width: 128rpx;
  5882. height: 100%;
  5883. float: right;
  5884. .icon-used {
  5885. width: 100%;
  5886. height: 100%;
  5887. box-sizing: border-box;
  5888. padding-top: 28rpx;
  5889. .icon-used-text {
  5890. width: 100%;
  5891. text-align: center;
  5892. line-height: 26rpx;
  5893. font-size: $font-size-20;
  5894. color: #f94b4b;
  5895. }
  5896. .icon-used-btn {
  5897. width: 128rpx;
  5898. height: 48rpx;
  5899. border-radius: 28rpx;
  5900. line-height: 48rpx;
  5901. font-size: $font-size-26;
  5902. text-align: center;
  5903. &.receive {
  5904. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);
  5905. color: #ffffff;
  5906. }
  5907. &.make {
  5908. border: solid 1px #f94b4b;
  5909. color: #f94b4b;
  5910. }
  5911. }
  5912. }
  5913. }
  5914. }
  5915. .list-cell-time {
  5916. width: 100%;
  5917. height: 58rpx;
  5918. line-height: 58rpx;
  5919. text-align: left;
  5920. font-size: $font-size-20;
  5921. color: #999999;
  5922. }
  5923. }
  5924. }
  5925. &.train {
  5926. height: 240rpx;
  5927. }
  5928. .content-tr {
  5929. width: 100%;
  5930. min-height: 58rpx;
  5931. line-height: 58rpx;
  5932. display: flex;
  5933. .content-td {
  5934. display: flex;
  5935. flex: 3;
  5936. font-size: $font-size-26;
  5937. color: #999999;
  5938. line-height: 58rpx;
  5939. text-align: left;
  5940. }
  5941. .content-th {
  5942. display: flex;
  5943. flex: 7;
  5944. font-size: $font-size-26;
  5945. color: #333333;
  5946. line-height: 58rpx;
  5947. text-align: left;
  5948. padding-left: 10rpx;
  5949. }
  5950. }
  5951. }
  5952. }
  5953. .tui-shopping-main {
  5954. width: 100%;
  5955. .layer-smimg {
  5956. width: 114rpx;
  5957. height: 114rpx;
  5958. float: left;
  5959. border-radius: 10rpx;
  5960. margin-right: 24rpx;
  5961. image {
  5962. width: 114rpx;
  5963. height: 114rpx;
  5964. border-radius: 10rpx;
  5965. }
  5966. }
  5967. .layer-nunbox {
  5968. justify-content: space-between;
  5969. align-items: center;
  5970. width: 536rpx;
  5971. height: auto;
  5972. float: left;
  5973. .layer-nunbox-t {
  5974. width: 100%;
  5975. height: 44rpx;
  5976. position: relative;
  5977. display: flex;
  5978. margin-bottom: 10rpx;
  5979. .text {
  5980. font-size: $font-size-24;
  5981. line-height: 48rpx;
  5982. color: #999999;
  5983. }
  5984. .layer-nunbox-text {
  5985. line-height: 44rpx;
  5986. font-size: $font-size-28;
  5987. }
  5988. .number-box {
  5989. display: flex;
  5990. justify-content: center;
  5991. align-items: center;
  5992. border: 2rpx solid #ffe6dc;
  5993. border-radius: 30rpx;
  5994. height: 48rpx;
  5995. margin-left: 20rpx;
  5996. .iconfont {
  5997. font-size: $font-size-24;
  5998. padding: 0 18rpx;
  5999. color: #999999;
  6000. text-align: center;
  6001. line-height: 48rpx;
  6002. font-weight: bold;
  6003. background: #fef6f3;
  6004. &.icon-jianhao {
  6005. border-radius: 30rpx 0 0 30rpx;
  6006. }
  6007. &.icon-jiahao {
  6008. border-radius: 0 30rpx 30rpx 0;
  6009. }
  6010. }
  6011. .btn-input {
  6012. width: 62rpx;
  6013. height: 48rpx;
  6014. line-height: 48rpx;
  6015. background: #ffffff;
  6016. border-radius: 4rpx;
  6017. text-align: center;
  6018. font-size: $font-size-28;
  6019. }
  6020. }
  6021. .product-step {
  6022. position: absolute;
  6023. left: 45rpx;
  6024. bottom: 0;
  6025. height: 44rpx;
  6026. background: #ffffff;
  6027. }
  6028. }
  6029. .layer-nunbox-b {
  6030. width: 100%;
  6031. height: 44rpx;
  6032. margin-top: 13rpx;
  6033. }
  6034. .text {
  6035. line-height: 44rpx;
  6036. font-size: $font-size-28;
  6037. .p {
  6038. color: #ff2a2a;
  6039. }
  6040. .p:first-child {
  6041. margin-left: 30rpx;
  6042. }
  6043. .p.sm {
  6044. font-size: $font-size-24;
  6045. }
  6046. }
  6047. }
  6048. }
  6049. }
  6050. .tui-popup-btn {
  6051. width: 100%;
  6052. height: auto;
  6053. float: left;
  6054. margin-top: 24rpx;
  6055. .tui-button {
  6056. width: 100%;
  6057. height: 88rpx;
  6058. background: $btn-confirm;
  6059. line-height: 88rpx;
  6060. text-align: center;
  6061. color: #ffffff;
  6062. font-size: $font-size-28;
  6063. border-radius: 44rpx;
  6064. }
  6065. }
  6066. /*富文本样式*/
  6067. rich-text.p {
  6068. width: 702rpx !important;
  6069. padding: 0 24rpx;
  6070. text-align: justify;
  6071. }
  6072. rich-text.img {
  6073. width: 100%;
  6074. height: auto;
  6075. }
  6076. >>>>>>> 731998a9ad0679346181c50ed13c5e96f704b3dd
  6077. </style>