goods.vue 108 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879
  1. <template>
  2. <view>
  3. <!-- 展示蒙层 显示推广画报 -->
  4. <view class="poster" v-if="myqr_show">
  5. <view class="title">
  6. <text>推广文案</text>
  7. </view>
  8. <view class="ads">
  9. <view style="width: 480rpx">{{ myqr_ads }}</view>
  10. </view>
  11. <image :src="myqr_url" mode="widthFix" style="width: 480rpx" :show-menu-by-longpress="true"></image>
  12. <view class="tool">
  13. <view @tap="posterCopy" style="text-align: right">
  14. <image class="img" style="width: 110rpx; height: 130rpx" src="/static/images/share/p_copy.png">
  15. </image>
  16. </view>
  17. <button open-type="share" class="share-btn">
  18. <image class="img" style="width: 85rpx; height: 127rpx" src="/static/images/share/p_dy.png"></image>
  19. </button>
  20. <view style="text-align: left">
  21. <image class="img" @tap="goSaveQrcode" src="/static/images/share/p_save.png"></image>
  22. </view>
  23. </view>
  24. <view style="text-align: center">
  25. <image class="closeImg" @tap="hidePoster" src="/static/images/share/close.png"></image>
  26. </view>
  27. </view>
  28. <view class="container" :style="'filter:brightness(' + myqr_blur + '%)'">
  29. <image src="/static/images/new/isnew.png" v-if="goods.isNew" class="isNew"></image>
  30. <swiper class="goodsimgs" :indicator-dots="goods.gallery.length > 1 ? true : false" :autoplay="true"
  31. interval="3000" duration="1000" indicator-color="rgba(0, 192, 255, .2)"
  32. indicator-active-color="rgba(0, 192, 255)">
  33. <swiper-item v-for="(item, index) in gallery" :key="index">
  34. <image :src="item" mode="aspectFill"></image>
  35. </swiper-item>
  36. </swiper>
  37. <!-- 分享
  38. <view class='goods_name'>
  39. <view class='goods_name_left'>{{goods.name}}</view>
  40. <view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">
  41. <image class="img" src="/static/images/share.png" />
  42. </view>
  43. </view>-->
  44. <view class="share-pop-box" v-if="openShare">
  45. <view class="share-pop">
  46. <view class="close" @tap="closeShare">
  47. <!-- <van-icon class="icon" name="cross" /> -->
  48. </view>
  49. <!-- <view class='share-info'>
  50. <button class="sharebtn" open-type="share" wx:if="{{!isGroupon}}">
  51. <image class='sharebtn_image' src='/static/images/wechat.png'></image>
  52. <view class='sharebtn_text'>分享给好友</view>
  53. </button>
  54. <button class="savesharebtn" open-type="openSetting" bindopensetting="handleSetting" wx:if="{{(!isGroupon) && (!canWrite)}}">
  55. <image class='sharebtn_image' src='/static/images/friend.png'></image>
  56. <view class='sharebtn_text'>发朋友圈1</view>
  57. </button>
  58. <button class="savesharebtn" bindtap="saveShare" wx:if="{{!isGroupon && canWrite}}">
  59. <image class='sharebtn_image' src='/static/images/friend.png'></image>
  60. <view class='sharebtn_text'>发朋友圈</view>
  61. </button>
  62. </view>-->
  63. </view>
  64. </view>
  65. <!-- <view class="goods-info">
  66. <view wx:if="{{activited}}" class="activity">
  67. <view style="display: flex;flex-direction: row;justify-content: space-between;">
  68. <view class="img">限时活动</view>
  69. <view class="activityDay">
  70. <image src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/clock.png">
  71. </image>
  72. <text>距离活动仅剩{{activityDay}}天</text>
  73. </view>
  74. </view>
  75. <view style="display: flex;justify-content: space-between;">
  76. <view style="display: flex;">
  77. <view class="activityPrice">¥<text>{{activityPrice}}</text></view>
  78. <view class="activityCounterPrice">原价¥<text>{{goods.counterPrice}}</text></view>
  79. </view>
  80. <view class="activityTime">
  81. <view>{{activityHour}}</view><text>:</text>
  82. <view>{{activityMinute}}</view><text>:</text>
  83. <view>{{activitySecond}}</view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="c">
  88. <view style="display: flex;flex-direction: column;">
  89. <view wx:if="{{!activited}}" class="price">
  90. <view class="retailPrice">¥<text class="checked-price">{{goods.retailPrice}}</text> </view>
  91. <view wx:if="{{goods.counterPrice!=goods.retailPrice}}" class="counterPrice">
  92. 原价¥<text>{{goods.counterPrice}}</text></view>
  93. </view>
  94. <view class='goods_name'>
  95. <view class='goods_name_left'>{{goods.name}}</view>
  96. </view>
  97. <text class="desc sub-color" wx:if="{{goods.brief}}">{{goods.brief}}</text>
  98. </view>
  99. </view>
  100. </view> -->
  101. <!-- 商品价格 销量 -->
  102. <view class="goods-info-new">
  103. <view class="price-line">
  104. <!-- <view class="real-price">到手价 ¥ <text>{{goods.retailPrice}}</text></view> -->
  105. <view class="real-price">
  106. <text style="padding-bottom: 4rpx" >{{checkedSku.newCus==true?'新客价':'到手价'}}</text>
  107. <text style="font-weight: bold">¥</text>
  108. <text class="bold-price">{{ finallyPrice }}</text>
  109. </view>
  110. <view class="sale-price">原价¥{{ goods.counterPrice }}</view>
  111. <view class="sale-num">已售{{ countSalesNumber }}件</view>
  112. </view>
  113. <view class="goods-coupon" v-if="couponVoList.length > 0">
  114. <view class="goupon-tag" v-for="(item, index) in couponVoList" :key="index">{{ item.tag }}</view>
  115. </view>
  116. </view>
  117. <!-- 购买提醒 -->
  118. <!-- wx:if="{{buyToastShow}}" -->
  119. <view class="buy-toast" v-if="buyToastShow">
  120. <swiper :autoplay="true" :circular="true" interval="3000" duration="1000" :vertical="true"
  121. class="toast-swiper">
  122. <swiper-item class="toast-swiper-item" v-for="(item, index) in goodsBuyTime" :key="index">
  123. <view class="toast-item">
  124. <image :src="item.cusHeadImg + '?w=20'" mode="aspectFill"></image>
  125. <view>{{ item.comment }}</view>
  126. </view>
  127. </swiper-item>
  128. </swiper>
  129. </view>
  130. <!-- 服务 须知 门店 -->
  131. <view class="other-info">
  132. <view class="name">
  133. {{ goods.name }}
  134. </view>
  135. <view class="common-info">
  136. <view class="info-title">服务</view>
  137. <view class="info-content">
  138. <!-- 专业服务·六区清洁·108项验收标准 -->
  139. {{ goods.serviceStandards }}
  140. </view>
  141. </view>
  142. <view class="common-info">
  143. <view class="info-title">须知</view>
  144. <view class="info-content">
  145. {{ goods.serviceInstructions }}
  146. </view>
  147. <!-- <image src="https://mall.zhaijieshi.cc/file/wx-dy/arrow-grey.png" mode="aspectFit" class="arrow-img">
  148. </image> -->
  149. </view>
  150. <view class="common-info">
  151. <view class="info-title">门店</view>
  152. <view class="info-content">全国{{ storeNum }}家门店通用</view>
  153. <!-- <image src="https://mall.zhaijieshi.cc/file/wx-dy/arrow-grey.png" mode="aspectFit" class="arrow-img">
  154. </image> -->
  155. </view>
  156. </view>
  157. <!-- 规格 -->
  158. <view class="sku-wrapper" @tap="showSkuPopup(0)" v-if="goods.productType == 2">
  159. <view class="sku-info">
  160. <view class="sku-left">
  161. <view>规格</view>
  162. <view class="current-sku">已选: {{ checkedSku.specifications }}</view>
  163. </view>
  164. <view class="sku-right">
  165. <image src="https://mall.zhaijieshi.cc/file/wx-dy/arrow-grey.png" mode="aspectFit"
  166. class="arrow-img"></image>
  167. </view>
  168. </view>
  169. <view class="all-sku">
  170. <image :src="item.url" class="sku-thumb" v-for="(item, index) in productList" :key="index"></image>
  171. <view>共{{ specTotalNum }}种规格可选</view>
  172. </view>
  173. </view>
  174. <!-- 加购数量 -->
  175. <!-- v-if="productList.length == 1 && productList[0].isSupportAddbuy" -->
  176. <view class="num-module" v-if="productList.length == 1 && productList[0].isSupportAddbuy">
  177. <view class="plus-buy">
  178. <view class="title">加购</view>
  179. <view class="plus-name">
  180. {{ productList[0].unitDescribe }}
  181. <text>¥{{ productList[0].unitPrice }}</text>
  182. /{{ productList[0].unitArea }}
  183. </view>
  184. </view>
  185. <view class="plus-num" style="padding-left: 80rpx">
  186. <view class="title" style="color: #000; width: 160rpx">加购数量</view>
  187. <view class="calc-counter">
  188. <view :class="'minus-btn ' + (plusNum == minNum ? 'disable' : '')" @tap="minusNum">-</view>
  189. <input
  190. class="num-input"
  191. @input="bindGoodsNumInput"
  192. type="number"
  193. maxlength="3"
  194. placeholder=""
  195. :value="plusNum"
  196. />
  197. <!-- <view class="num-input">{{ plusNum }}</view> -->
  198. <view :class="'plus-btn ' + (plusNum >= productList[0].unitMaximum ? 'disable' : '')" @tap="addNum">+</view>
  199. </view>
  200. </view>
  201. <view style="color: #fe2b54; margin: 8rpx 0 0" :tt-if="plusNum != 0">
  202. 每份{{ productList[0].unitArea }},加购{{ plusNum }}份,合计{{ addPurchaseAmount }}元</view>
  203. </view>
  204. <!-- 补差 -->
  205. <!-- <view class="num-module" v-if="goods.type == 4">
  206. <view class="plus-num">
  207. <view class="title" style="color: #000; width: 160rpx; text-align: left; display: inline-block">购买数量</view>
  208. <view class="calc-counter">
  209. <view :class="'minus-btn ' + (plusNum == minNum ? 'disable' : '')" @tap="minusNum">-</view>
  210. <view class="num-input">{{ plusNum }}</view>
  211. <view :class="'plus-btn ' + (goods.unitMaximum && plusNum >= goods.unitMaximum ? 'disable' : '')" @tap="addNum">+</view>
  212. </view>
  213. </view>
  214. <view style="color: #fe2b54; margin: 8rpx 0 0">购买多份,叠加服务内容和服务时长。</view>
  215. </view> -->
  216. <!-- 无限购 -->
  217. <!-- wx:if="{{goods.productType==4&&goods.unitPrice&&goods.unitPrice>0}}" -->
  218. <!-- <view class="num-module" v-if="goods.productType == 4 && goods.unitPrice && goods.unitPrice > 0">
  219. <view class="plus-num">
  220. <view class="title" style="color: #000; width: 160rpx; justify-content: flex-start">购买数量</view>
  221. <view style="display: flex; align-items: center">
  222. <view class="calc-counter" style="height: 62rpx; line-height: 62rpx">
  223. <input
  224. class="num-input"
  225. style="height: 62rpx; line-height: 62rpx; width: 140rpx; border: none"
  226. @input="bindGoodsNumInput"
  227. type="number"
  228. maxlength="4"
  229. placeholder=""
  230. :value="plusNum"
  231. />
  232. </view>
  233. <view style="margin-left: 8rpx">{{ goods.unitArea }}</view>
  234. </view>
  235. </view>
  236. <view style="color: #fe2b54; margin: 8rpx 0 0">每增加1{{ goods.unitArea }},增加{{ goods.unitPrice }}元,服务人数根据实际购买量指派。</view>
  237. </view> -->
  238. <!-- 关联工单 -->
  239. <!-- <view class="service-list" v-if="goods.type == 4">
  240. <view class="service-item">
  241. <view class="order-title">关联工单</view>
  242. <view class="service-title">
  243. <view class="service-id">工单编号:{{ bookDetail.bookDetailId }}</view>
  244. <view class="service-status">{{ bookDetail.statusName }}</view>
  245. </view>
  246. <view class="service-main">
  247. <view class="customer-info">
  248. <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-order-map.png"></image>
  249. <view class="customer-main">
  250. <view class="main-line">
  251. <view>{{ bookDetail.consignee }}</view>
  252. <view class="phone">{{ bookDetail.mobile }}</view>
  253. </view>
  254. <view class="customer-address">{{ bookDetail.address }}</view>
  255. </view>
  256. </view>
  257. <view class="row">
  258. <text>上门时段:</text>
  259. {{ bookDetail.bookTime }}
  260. </view>
  261. <view class="row">
  262. <text>预约备注:</text>
  263. {{ bookDetail.message }}
  264. </view>
  265. </view>
  266. <view class="service-remark-wrapper">
  267. <view class="service-store">
  268. <view class="store-left">
  269. <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-store.png"></image>
  270. <view>{{ bookDetail.fraName }}</view>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view> -->
  276. <!-- 团购评价 -->
  277. <view class="group-evaluation">
  278. <view class="title" @tap="goWholeEval">
  279. <view class="left">团购评价({{goodsCommentCount}}条)</view>
  280. <view class="right">
  281. <view>查看全部</view>
  282. <image src="https://mall.zhaijieshi.cc/file/wx-dy/arrow-grey.png" mode="aspectFit"
  283. class="arrow-img"></image>
  284. </view>
  285. </view>
  286. <view class="evaluation-item" v-for="(item, index) in goodsComment" :key="index">
  287. <view class="item-left">
  288. <view class="eval-top">
  289. <image :src="item.cusHeadImg + '?w=100'" mode="aspectFill" class="avatar"></image>
  290. <view class="name">{{ item.cusName }}</view>
  291. <view class="tag">{{ item.cusLabel }}</view>
  292. <view class="hp">{{ item.commentType }}</view>
  293. </view>
  294. <view class="eval-content">
  295. {{ item.comment }}
  296. </view>
  297. </view>
  298. <view class="item-right">
  299. <image :src="item.commentImg + '?w=200'" mode="aspectFill"></image>
  300. </view>
  301. </view>
  302. </view>
  303. <view class="detail">
  304. <image mode="widthFix" :src="item + '?w=1024'" v-for="(item, index) in detailList" :key="index"></image>
  305. </view>
  306. <!-- 产品推荐 -->
  307. <view class="recommend-title" v-if="recGoodsList.length > 0">产品推荐</view>
  308. <view class="recommend-list">
  309. <navigator :url="'/pages/goods/goods?id=' + item.id" v-for="(item, index) in recGoodsList" :key="index">
  310. <view class="recommend-item">
  311. <image :src="item.picUrl" mode="aspectFill"></image>
  312. <view class="recommend-goods-name">
  313. {{ item.name }}
  314. </view>
  315. <view class="recommend-goods-price">
  316. ¥
  317. <text>{{ item.retailPrice }}</text>
  318. </view>
  319. </view>
  320. </navigator>
  321. </view>
  322. <!-- 大家都在看
  323. <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
  324. <view class="h">
  325. <view class="line"></view>
  326. <text class="title">大家都在看</text>
  327. </view>
  328. <view class="b">
  329. <view class="item" wx:for="{{relatedGoods}}" wx:key="id">
  330. <navigator url="/pages/goods/goods?id={{item.id}}">
  331. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  332. <text class="name">{{item.name}}</text>
  333. <text class="price">¥{{item.retailPrice}}</text>
  334. </navigator>
  335. </view>
  336. </view>
  337. </view> -->
  338. </view>
  339. <!-- 联系客服
  340. <view class="contact">
  341. <contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="36">
  342. </contact-button>
  343. </view> -->
  344. <!-- 底部按钮 -->
  345. <view class="bottom-btn">
  346. <view class="contact-block">
  347. <!-- <button class="contact-btn" open-type="contact">客服</button> -->
  348. <view class="contact-wrapper" @tap="goIM">
  349. <image class="contact-img" mode="aspectFit" src="/static/images/online-new.png"></image>
  350. <view class="text">客服</view>
  351. </view>
  352. </view>
  353. <view class="final-price">
  354. <!-- <view class="total-new">¥<text>{{goods.retailPrice}}</text></view>
  355. <view class="total-old">¥{{goods.counterPrice}}</view> -->
  356. <view class="total-new">
  357. ¥
  358. <text>{{ totalPrice }}</text>
  359. </view>
  360. <view class="total-old">¥{{ checkedSku.counterPrice }}</view>
  361. </view>
  362. <!-- <view class="share" bindtap="reSpread" wx:if="{{!soldout||!hasLogin}}">分享</view> -->
  363. <view class="c" @tap="addFast">立即购买</view>
  364. </view>
  365. <!-- sku规格列表 -->
  366. <view class="appoint-overlay-wrapper" @tap="onSkuClose" v-if="chooseSkuVisible" @touchmove.stop.prevent="preventTouchMove">
  367. <view class="spu-popup" @tap.stop.prevent="stopClick">
  368. <!-- <view class="popup-good">
  369. <view class="left">
  370. <image :src="currentSku.url" mode="aspectFill"></image>
  371. <view class="spu-price">
  372. ¥
  373. <text>{{ currentSku.price }}</text>
  374. </view>
  375. <view class="spu-price-old">¥{{ currentSku.counterPrice }}</view>
  376. </view>
  377. </view> -->
  378. <!-- <image src="https://jzmall.lifejingzhi.com/file/jzmall/weixin/sku-close.png" mode="aspectFill" class="sku-close" @tap="onSkuClose"></image> -->
  379. <view class="sku-popup-title">请选择购买规格</view>
  380. <view class="sku-popup-tips">选择实际服务数量对应的规格</view>
  381. <scroll-view scroll-y="true" class="sku-list-block" style="height: 300rpx;">
  382. <view class="sku-list-block">
  383. <!-- <view class="spu-title">规格</view> -->
  384. <view style="padding-bottom: 20rpx ;">
  385. <view :class="'sku-item ' + (activeSku == item.id ? 'active-sku' : '')" :data-index="index"
  386. :data-id="item.id" @tap="selectSku" v-for="(item, index) in productList" :key="index">
  387. <span v-if="item.newCus==true" class="xinke">新客专享</span>
  388. <view>
  389. {{ item.specifications }}
  390. </view>
  391. <view class="sku-price">¥{{item.price}}</view>
  392. </view>
  393. </view>
  394. </view>
  395. </scroll-view>
  396. <view class="sku-btn" @tap="confSku">确定</view>
  397. </view>
  398. </view>
  399. <!-- 自购提示 -->
  400. <!-- <van-overlay show="{{ selfPayShow }}">
  401. <view class="overlay-wrapper">
  402. <view class="tips-wrapper">
  403. <view class="tips-top">
  404. <view class="tips-title">立省金额说明</view>
  405. <view>立省金额会以佣金形式发放,请在引荐人中心查收哦</view>
  406. </view>
  407. <view class="notip-again">
  408. <van-checkbox value="{{selfPayChecked}}" shape="square" icon-size="20px" bind:change="onSelfPayChange" checked-color="#09afff"></van-checkbox>
  409. <text class="user-agree">我已知晓,不再提示</text>
  410. </view>
  411. <view class="tips-bottom">
  412. <view class="cancel-btn" bindtap="cancelSelfPay">取消</view>
  413. <view class="btn-devide"></view>
  414. <view class="repay-btn" bindtap="reSelfPay">继续购买</view>
  415. </view>
  416. </view>
  417. </view>
  418. </van-overlay> -->
  419. <!-- 推广提示 -->
  420. <!-- <van-overlay show="{{spreadPayShow }}">
  421. <view class="overlay-wrapper">
  422. <view class="tips-wrapper">
  423. <view class="tips-top">
  424. <view class="tips-title">推广佣金说明</view>
  425. <view>页面展示推广佣金为预计最高返现金额,实际金额根据购买者团队身份计算,请在引荐人中心查看实际佣金</view>
  426. </view>
  427. <view class="notip-again">
  428. <van-checkbox value="{{spreadPayChecked}}" shape="square" icon-size="20px" bind:change="onSpreadPayChange" checked-color="#09afff"></van-checkbox>
  429. <text class="user-agree">我已知晓,不再提示</text>
  430. </view>
  431. <view class="tips-bottom">
  432. <view class="cancel-btn" bindtap="cancelSpreadPay">取消</view>
  433. <view class="btn-devide"></view>
  434. <view class="repay-btn" bindtap="reSpread">继续推广</view>
  435. </view>
  436. </view>
  437. </view>
  438. </van-overlay> -->
  439. </view>
  440. </template>
  441. <script>
  442. var app = getApp();
  443. // var WxParse = require('../../lib/wxParse/wxParse.js');
  444. var util = require('../../utils/util.js');
  445. var api = require('../../config/api.js');
  446. var user = require('../../utils/user.js');
  447. export default {
  448. data() {
  449. return {
  450. gallery: [],
  451. goodsCommentCount: '',
  452. showType: 0, // 1弹窗后确认立即下单
  453. chooseSkuVisible: false,
  454. activeSku: 0,
  455. checkedSku: {
  456. specifications: [],
  457. id: 0,
  458. retailPrice: '',
  459. counterPrice: '',
  460. url: ''
  461. },
  462. currentSku: {
  463. specifications: [],
  464. id: 0,
  465. retailPrice: '',
  466. counterPrice: '',
  467. url: '',
  468. price: ''
  469. },
  470. productList: [],
  471. specTotalNum: '',
  472. buyToastShow: false,
  473. goodsBuyTime: {
  474. cusHeadImg: '',
  475. comment: ''
  476. },
  477. recGoodsList: [],
  478. plusNum: '0',
  479. detailList: [],
  480. detailListAll: [],
  481. countSalesNumber: '',
  482. selfPayShow: false,
  483. selfPayCheck: false,
  484. spreadPayShow: false,
  485. spreadPayChecked: false,
  486. canShare: false,
  487. id: 0,
  488. goods: {
  489. unitMaximum: 1,
  490. isNew: '',
  491. gallery: [],
  492. counterPrice: '',
  493. name: '',
  494. serviceInstructions: '',
  495. productType: 0,
  496. unitPrice: '',
  497. unitArea: '',
  498. type: 0
  499. },
  500. groupon: [],
  501. //该商品支持的团购规格
  502. grouponLink: {},
  503. //参与的团购
  504. attribute: [],
  505. issueList: [],
  506. comment: [],
  507. //brand: {},
  508. specificationList: [],
  509. relatedGoods: [],
  510. cartGoodsCount: 0,
  511. userHasCollect: 0,
  512. number: 1,
  513. checkedSpecText: '规格数量选择',
  514. tmpSpecText: '请选择规格数量',
  515. checkedSpecPrice: 0,
  516. openAttr: false,
  517. openShare: false,
  518. collect: false,
  519. shareImage: '',
  520. isGroupon: false,
  521. //标识是否是一个参团购买
  522. soldout: false,
  523. canWrite: false,
  524. //用户是否获取了保存相册的权限
  525. name_height: 58,
  526. //根据名称长度 设置高度
  527. userInfo: {},
  528. hasLogin: false,
  529. shareId: 0,
  530. //options传递过来的参数 表示是打开哪个分享
  531. wxShareId: 0,
  532. //如果要分享此商品的分享id
  533. addressInfo: {},
  534. rId: 0,
  535. //分享人id,
  536. selfDiscount: 0,
  537. spreadDiscount: 0,
  538. referee: {
  539. self: 0,
  540. share: 0
  541. },
  542. myqr_show: false,
  543. //我的分享二维码
  544. myqr_url: null,
  545. //分享海报及推广语言
  546. myqr_ads: '',
  547. myqr_blur: 100,
  548. //背景模糊值
  549. myqr_bottom_btn: 'fixed',
  550. //底部功能按钮
  551. activited: false,
  552. //是否活动中
  553. activityPrice: 0,
  554. //活动价格
  555. activityTime: 89646,
  556. //活动倒计时总计时间 (整型 秒)
  557. activityDay: 0,
  558. //活动天数
  559. activityHour: 0,
  560. //活动小时
  561. activityMinute: 0,
  562. //活动分钟
  563. activitySecond: 0,
  564. //活动秒
  565. activityTimer: null,
  566. //定时器
  567. code: '',
  568. //抖音登录code
  569. isCommiting: false,
  570. //是否提交中 防止多次提交
  571. //以下是支付使用参数
  572. openId: '',
  573. checkedAddress: '',
  574. actualPrice: '',
  575. couponPrice: '',
  576. addressId: '',
  577. couponId: '',
  578. userCouponId: '',
  579. mobile: '',
  580. couponVoList: [],
  581. //优惠券列表
  582. finallyPrice: '',
  583. storeNum: '267',
  584. totalPrice: '',
  585. addPurchaseAmount: 0,
  586. addPurchase: [],
  587. serviceId: '',
  588. bookDetail: {
  589. bookDetailId: '',
  590. statusName: '',
  591. consignee: '',
  592. mobile: '',
  593. address: '',
  594. fraName: ''
  595. },
  596. minNum: 0,
  597. //达人id 表示是否从小雪花进入
  598. talentId: '',
  599. goodsComment: '',
  600. selfPayChecked: '',
  601. qid: '' //短链id(表示短链进入)
  602. };
  603. }, // 页面分享
  604. onShareAppMessage: function() {
  605. let that = this;
  606. if (!app.globalData.hasLogin) {
  607. uni.navigateTo({
  608. url: '/pages/auth/login/login'
  609. });
  610. return;
  611. }
  612. //获取分享id 用来追踪链接
  613. //引荐人和非引荐人的 链接不同
  614. let imgUrl = that.goods.shareWxUrl ? that.goods.shareWxUrl : that.goods.gallery[0];
  615. var path = '/pages/goods/goods?id=' + that.id + '&rId=' + that.userInfo.id;
  616. if (that.userInfo.isDis) {
  617. //是引荐人
  618. path = '/pages/goods/goods?id=' + that.id + '&shareId=' + that.wxShareId;
  619. }
  620. this.hidePoster();
  621. return {
  622. title: that.goods.name + '\n' + that.myqr_ads,
  623. path: path,
  624. imageUrl: imgUrl
  625. };
  626. },
  627. onLoad: async function(options) {
  628. console.log(options);
  629. console.log(this.$store.state)
  630. // 页面初始化 options为页面跳转所带来的参数
  631. var addressInfo = uni.getStorageSync('addressInfo');
  632. if (addressInfo) {
  633. this.setData({
  634. addressInfo: addressInfo
  635. });
  636. }
  637. var openId = uni.getStorageSync('openId');
  638. if (openId) {
  639. this.setData({
  640. openId: openId
  641. });
  642. }else{
  643. openId=app.globalData.openId;//首页会获取一次
  644. if (openId==''||openId==null||openId==undefined) {
  645. //openid为空 需要去获取
  646. await this.getUserOpenId();
  647. }else{
  648. console.log('进入onload,已提前拿到openid:'+openId);
  649. this.setData({
  650. openId: openId
  651. });
  652. uni.setStorageSync('openId', openId);
  653. }
  654. }
  655. if (options.rId) {
  656. this.setData({
  657. rId: parseInt(options.rId)
  658. });
  659. }
  660. //达人id 小雪花过来的
  661. if (options.talentId) {
  662. this.setData({
  663. talentId: options.talentId
  664. });
  665. }
  666. if (options.shareId) {
  667. this.setData({
  668. shareId: parseInt(options.shareId)
  669. });
  670. }
  671. if (options.id) {
  672. this.setData({
  673. id: parseInt(options.id)
  674. });
  675. this.getGoodsInfo();
  676. }
  677. // 补差产品扫二维码进入
  678. if (options.service_id) {
  679. this.setData({
  680. id: parseInt(options.goods_id),
  681. serviceId: options.service_id
  682. });
  683. this.getGoodsInfo();
  684. }
  685. //短链或者二维码的id
  686. if (options.qid) {
  687. this.setData({
  688. qid: options.qid
  689. })
  690. }
  691. this.getStore();
  692. },
  693. onShow: function() {
  694. if (app.globalData.hasLogin) {
  695. let userInfo = uni.getStorageSync('userInfo');
  696. app.globalData.userInfo = userInfo;
  697. this.setData({
  698. userInfo: userInfo,
  699. hasLogin: true
  700. });
  701. }
  702. util.addLog(1, 1, 1, {
  703. goodsId: this.id
  704. });
  705. },
  706. onHide: function() {
  707. // 页面隐藏
  708. clearInterval(this.activityTimer);
  709. util.addLog(2, 1, 2, {
  710. goodsId: this.id
  711. });
  712. },
  713. onUnload: function() {
  714. // 页面关闭
  715. clearInterval(this.activityTimer);
  716. },
  717. onReady: function() {
  718. // 页面渲染完成
  719. },
  720. onReachBottom: function() {
  721. console.info('reachbottom');
  722. let detailListAll = this.detailListAll;
  723. let detailList = this.detailList;
  724. //console.info(detailList)
  725. if (detailListAll.length > detailList.length) {
  726. // detailListAll = detailListAll.splice(1);
  727. detailList.push(detailListAll[detailList.length]);
  728. this.setData({
  729. detailList: detailList
  730. // detailListAll: detailListAll
  731. });
  732. }
  733. },
  734. methods: {
  735. //禁止蒙版下面的页面滑动
  736. preventTouchMove(){},
  737. goCustomerService() {
  738. //跳转微信客服
  739. console.info('goCustomerService');
  740. uni.openCustomerServiceChat({
  741. extInfo: {
  742. url: 'https://work.weixin.qq.com/kfid/kfc1fcfae84340d5125'
  743. },
  744. corpId: 'ww034f0b524f8ead00',
  745. success(res) {},
  746. fail(res) {
  747. console.info(res);
  748. }
  749. });
  750. },
  751. shareFriendOrCircle: function() {
  752. if (!app.globalData.hasLogin) {
  753. uni.navigateTo({
  754. url: '/pages/auth/login/login'
  755. });
  756. return;
  757. }
  758. //分享 弹出图片
  759. let that = this;
  760. uni.removeStorageSync(String(that.goods.id));
  761. //取出本地缓存中的分享图
  762. // let sUrl=wx.getStorageSync(String(that.data.goods.id));
  763. // if(sUrl!=null&&sUrl!=""){//获取过的分享图 不需要再次获取
  764. // that.setData({
  765. // myqr_url:sUrl,
  766. // myqr_show:true,
  767. // myqr_blur:5
  768. // });
  769. // return;
  770. // }
  771. uni.showLoading({
  772. title: '生成中'
  773. });
  774. util.request(api.QrGoodsCodeCreate, {
  775. goodsId: that.goods.id
  776. }).then(function(res) {
  777. uni.hideLoading();
  778. if (res.errno == 0) {
  779. that.setData({
  780. myqr_url: res.data.imgUrl,
  781. myqr_show: true,
  782. myqr_blur: 5
  783. });
  784. //保存分享图url到本地缓存
  785. // wx.setStorageSync(String(that.data.goods.id),res.data.imgUrl);
  786. } else if (res.errno == 501) {
  787. uni.navigateTo({
  788. url: '/pages/auth/login/login'
  789. });
  790. } else {
  791. uni.showToast({
  792. title: res.errmsg,
  793. duration: 5000
  794. });
  795. }
  796. });
  797. //var that = this;
  798. /*if (this.data.openShare === false) {
  799. this.setData({
  800. openShare: !this.data.openShare
  801. });
  802. } else {
  803. return false;
  804. }*/
  805. },
  806. /**活动剩余时间 格式化 */
  807. handleActivityTime() {
  808. let that = this;
  809. let interval = setInterval(function() {
  810. if (that.activityTime <= 1) {
  811. return;
  812. }
  813. let activityTime = that.activityTime;
  814. let day = parseInt(activityTime / 86400);
  815. let hour = parseInt((activityTime % 86400) / 3600);
  816. console.info((activityTime % 86400) % 3600);
  817. let minte = parseInt(((activityTime % 86400) % 3600) / 60);
  818. let second = parseInt(((activityTime % 86400) % 3600) % 60);
  819. that.setData({
  820. activityDay: day,
  821. activityHour: hour < 10 ? '0' + hour.toString() : hour.toString(),
  822. activityMinute: minte < 10 ? '0' + minte.toString() : minte.toString(),
  823. activitySecond: second < 10 ? '0' + second.toString() : second.toString(),
  824. activityTime: activityTime - 1
  825. });
  826. }, 1000);
  827. that.setData({
  828. activityTimer: interval
  829. });
  830. },
  831. handleSetting: function(e) {
  832. var that = this;
  833. // console.log(e)
  834. if (!e.detail.authSetting['scope.writePhotosAlbum']) {
  835. uni.showModal({
  836. title: '警告',
  837. content: '不授权无法保存',
  838. showCancel: false
  839. });
  840. that.setData({
  841. canWrite: false
  842. });
  843. } else {
  844. uni.showToast({
  845. title: '保存成功'
  846. });
  847. that.setData({
  848. canWrite: true
  849. });
  850. }
  851. },
  852. // 保存分享图
  853. saveShare: function() {
  854. let that = this;
  855. uni.showLoading({
  856. title: '图片保存中'
  857. });
  858. console.log(that);
  859. uni.downloadFile({
  860. url: that.myqr_url,
  861. success: function(res) {
  862. console.log(res);
  863. uni.saveImageToPhotosAlbum({
  864. filePath: res.tempFilePath,
  865. success: function(res) {
  866. uni.hideLoading();
  867. uni.showModal({
  868. title: '存图成功',
  869. content: '图片成功保存到相册了,可以分享到朋友圈了',
  870. showCancel: false,
  871. confirmText: '好的',
  872. confirmColor: '#a78845',
  873. success: function(res) {
  874. if (res.confirm) {
  875. console.log('用户点击确定');
  876. that.setData({
  877. myqr_show: false,
  878. myqr_blur: 0
  879. });
  880. }
  881. }
  882. });
  883. },
  884. fail: function(res) {
  885. uni.hideLoading();
  886. uni.showModal({
  887. title: '警告',
  888. content: '不授权无法保存',
  889. showCancel: false
  890. });
  891. that.setData({
  892. myqr_show: false,
  893. myqr_blur: 0
  894. });
  895. }
  896. });
  897. },
  898. fail: function(res) {
  899. uni.hideLoading();
  900. console.log(res);
  901. }
  902. });
  903. },
  904. // 获取商品信息
  905. getGoodsInfo: function() {
  906. let that = this;
  907. let params = {
  908. id: that.id,
  909. rId: that.rId,
  910. openId:this.openId
  911. };
  912. if (this.serviceId) {
  913. params = {
  914. id: that.id,
  915. rId: that.rId,
  916. openId:this.openId,
  917. serviceId: that.serviceId
  918. };
  919. }
  920. console.info('1-》getGoodsInfo start');
  921. util.request(api.GoodsDetail, params).then(function(res) {
  922. console.info('2-》getGoodsInfo end');
  923. console.info(res);
  924. if (res.errno === 0) {
  925. //设置显示名称的控件高度
  926. // let height = 56;
  927. // if (res.data.info.name.length > 17 & res.data.info.name.length < 36) height = 76;
  928. // else if (res.data.info.name.length >= 36) height = 116;
  929. let goodsComment = res.data.goodsComment;
  930. let list = [];
  931. if (goodsComment) {
  932. goodsComment.forEach((item) => {
  933. let obj = item;
  934. if (item.commentImgs) {
  935. let img = item.commentImgs.split(',');
  936. if (img.length >= 1) {
  937. obj.commentImg = img[0];
  938. } else {
  939. obj.commentImg = '';
  940. }
  941. }
  942. list.push(obj);
  943. });
  944. }
  945. let checkedSku = {};
  946. // if (res.data.info.productType == 3) {
  947. // let plusInit = res.data.productList.filter((pro) => {
  948. // return pro.unitIncreaseNumber == 0;
  949. // });
  950. // if (plusInit.length >= 1) {
  951. // checkedSku = plusInit[0];
  952. // }
  953. // } else {
  954. checkedSku = res.data.productList[0];
  955. // }
  956. // if (res.data.info.type == 4) {
  957. that.setData({
  958. plusNum: 0,
  959. minNum: 0
  960. });
  961. // }
  962. that.setData({
  963. goods: res.data.info,
  964. gallery: res.data.info.gallery.split(','),
  965. detailList: res.data.info.detail == '' || res.data.info.detail == null ?
  966. [] : [res.data.info.detail.split(',')[0]],
  967. detailListAll: res.data.info.detail == '' || res.data.info.detail == null ?
  968. [] : res.data.info.detail.split(','),
  969. // attribute: res.data.attribute,
  970. // issueList: res.data.issue,
  971. // comment: res.data.comment,
  972. //brand: res.data.brand,
  973. specificationList: res.data.specificationList,
  974. userHasCollect: res.data.userHasCollect,
  975. shareImage: res.data.shareImage,
  976. checkedSpecPrice: res.data.info.retailPrice,
  977. countSalesNumber: res.data.countSalesNumber,
  978. // canShare: res.data.share,
  979. // name_height: height,
  980. wxShareId: res.data.shareId,
  981. activited: res.data.activited,
  982. activityTime: res.data.activityTime,
  983. activityPrice: res.data.activityPrice,
  984. productList: res.data.productList,
  985. specTotalNum: res.data.productList.length,
  986. goodsComment: list,
  987. buyToastShow: true,
  988. goodsBuyTime: res.data.goodsBuyTime,
  989. // checkedSku:res.data.productList[0],
  990. // currentSku:res.data.productList[0],
  991. checkedSku: checkedSku,
  992. currentSku: checkedSku,
  993. recGoodsList: res.data.recGoodsList,
  994. finallyPrice: Number(res.data.info.retailPrice).toFixed(2),
  995. // addPurchase:res.data.addPurchase,
  996. bookDetail: res.data.bookDetail,
  997. goodsCommentCount: res.data.goodsCommentCount
  998. });
  999. that.getMaxCoupon();
  1000. // setTimeout(()=>{
  1001. // that.setData({
  1002. // buyToastShow:true
  1003. // });
  1004. // },200);
  1005. // setTimeout(()=>{
  1006. // that.setData({
  1007. // buyToastShow:false
  1008. // })
  1009. // },3200);
  1010. if (res.data.activited) {
  1011. that.handleActivityTime();
  1012. }
  1013. if (res.data.userHasCollect == 1) {
  1014. that.setData({
  1015. collect: true
  1016. });
  1017. } else {
  1018. that.setData({
  1019. collect: false
  1020. });
  1021. }
  1022. // WxParse.wxParse('goodsDetail', 'html', res.data.info.detail, that);
  1023. //获取推荐商品
  1024. //that.getGoodsRelated();
  1025. }
  1026. });
  1027. },
  1028. // 获取推荐商品
  1029. getGoodsRelated: function() {
  1030. let that = this;
  1031. util.request(api.GoodsRelated, {
  1032. id: that.id,
  1033. shopId: this.addressInfo.shopId
  1034. }).then(function(res) {
  1035. if (res.errno === 0) {
  1036. that.setData({
  1037. relatedGoods: res.data.list
  1038. });
  1039. }
  1040. });
  1041. },
  1042. // 规格选择
  1043. clickSkuValue: function(event) {
  1044. let that = this;
  1045. let specName = event.currentTarget.dataset.name;
  1046. let specValueId = event.currentTarget.dataset.valueId;
  1047. //判断是否可以点击
  1048. //TODO 性能优化,可在wx:for中添加index,可以直接获取点击的属性名和属性值,不用循环
  1049. let _specificationList = this.specificationList;
  1050. for (let i = 0; i < _specificationList.length; i++) {
  1051. if (_specificationList[i].name === specName) {
  1052. for (let j = 0; j < _specificationList[i].valueList.length; j++) {
  1053. if (_specificationList[i].valueList[j].id == specValueId) {
  1054. //如果已经选中,则反选
  1055. if (_specificationList[i].valueList[j].checked) {
  1056. _specificationList[i].valueList[j].checked = false;
  1057. } else {
  1058. _specificationList[i].valueList[j].checked = true;
  1059. }
  1060. } else {
  1061. _specificationList[i].valueList[j].checked = false;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. this.setData({
  1067. specificationList: _specificationList
  1068. });
  1069. //重新计算spec改变后的信息
  1070. this.changeSpecInfo();
  1071. //重新计算哪些值不可以点击
  1072. },
  1073. //获取选中的规格信息
  1074. getCheckedSpecValue: function() {
  1075. let checkedValues = [];
  1076. let _specificationList = this.specificationList;
  1077. for (let i = 0; i < _specificationList.length; i++) {
  1078. let _checkedObj = {
  1079. name: _specificationList[i].name,
  1080. valueId: 0,
  1081. valueText: ''
  1082. };
  1083. for (let j = 0; j < _specificationList[i].valueList.length; j++) {
  1084. if (_specificationList[i].valueList[j].checked) {
  1085. _checkedObj.valueId = _specificationList[i].valueList[j].id;
  1086. _checkedObj.valueText = _specificationList[i].valueList[j].value;
  1087. }
  1088. }
  1089. checkedValues.push(_checkedObj);
  1090. }
  1091. return checkedValues;
  1092. },
  1093. //判断规格是否选择完整
  1094. isCheckedAllSpec: function() {
  1095. return !this.getCheckedSpecValue().some(function(v) {
  1096. if (v.valueId == 0) {
  1097. return true;
  1098. }
  1099. });
  1100. },
  1101. getCheckedSpecKey: function() {
  1102. let checkedValue = this.getCheckedSpecValue().map(function(v) {
  1103. return v.valueText;
  1104. });
  1105. return checkedValue;
  1106. },
  1107. // 规格改变时,重新计算价格及显示信息
  1108. changeSpecInfo: function() {
  1109. let checkedNameValue = this.getCheckedSpecValue();
  1110. //设置选择的信息
  1111. let checkedValue = checkedNameValue
  1112. .filter(function(v) {
  1113. if (v.valueId != 0) {
  1114. return true;
  1115. } else {
  1116. return false;
  1117. }
  1118. })
  1119. .map(function(v) {
  1120. return v.valueText;
  1121. });
  1122. if (checkedValue.length > 0) {
  1123. this.setData({
  1124. tmpSpecText: checkedValue.join(' ')
  1125. });
  1126. } else {
  1127. this.setData({
  1128. tmpSpecText: '请选择规格数量'
  1129. });
  1130. }
  1131. if (this.isCheckedAllSpec()) {
  1132. this.setData({
  1133. checkedSpecText: this.tmpSpecText
  1134. });
  1135. // 规格所对应的货品选择以后
  1136. let checkedProductArray = this.getCheckedProductItem(this.getCheckedSpecKey());
  1137. if (!checkedProductArray || checkedProductArray.length <= 0) {
  1138. this.setData({
  1139. soldout: true
  1140. });
  1141. console.error('规格所对应货品不存在');
  1142. return;
  1143. }
  1144. let checkedProduct = checkedProductArray[0];
  1145. if (checkedProduct.number > 0) {
  1146. this.setData({
  1147. checkedSpecPrice: checkedProduct.price,
  1148. soldout: false
  1149. });
  1150. } else {
  1151. this.setData({
  1152. checkedSpecPrice: this.goods.retailPrice,
  1153. soldout: true
  1154. });
  1155. }
  1156. } else {
  1157. this.setData({
  1158. checkedSpecText: '规格数量选择',
  1159. checkedSpecPrice: this.goods.retailPrice,
  1160. soldout: false
  1161. });
  1162. }
  1163. },
  1164. // 获取选中的产品(根据规格)
  1165. getCheckedProductItem: function(key) {
  1166. return this.productList.filter(function(v) {
  1167. if (v.specifications.toString() == key.toString()) {
  1168. return true;
  1169. } else {
  1170. return false;
  1171. }
  1172. });
  1173. },
  1174. goIM() {
  1175. console.info('goIm');
  1176. uni.navigateTo({
  1177. url: '/pages/chat/im/im'
  1178. });
  1179. util.addLog(1, 1, 12, {
  1180. goodsId: this.id
  1181. });
  1182. },
  1183. //添加或是取消收藏
  1184. addCollectOrNot: function() {
  1185. let that = this;
  1186. util.request(
  1187. api.CollectAddOrDelete, {
  1188. type: 0,
  1189. valueId: this.id
  1190. },
  1191. 'POST'
  1192. ).then(function(res) {
  1193. if (that.userHasCollect == 1) {
  1194. that.setData({
  1195. collect: false,
  1196. userHasCollect: 0
  1197. });
  1198. } else {
  1199. that.setData({
  1200. collect: true,
  1201. userHasCollect: 1
  1202. });
  1203. }
  1204. });
  1205. },
  1206. //立即购买(先自动加入购物车)
  1207. async addFast() {
  1208. var that = this;
  1209. if (that.goods.productType == 2) { //多规格,先弹窗选规格后
  1210. that.showSkuPopup(1);
  1211. return;
  1212. }
  1213. //如果是买约一体商品 必须授权登录
  1214. // if (that.goods.type != 3 && that.hasLogin == false) {
  1215. // uni.navigateTo({
  1216. // url: '/pages/auth/login/login'
  1217. // });
  1218. // return;
  1219. // }
  1220. that.fastOrder();
  1221. },
  1222. async fastOrder() {
  1223. //防止多次提交
  1224. var that = this;
  1225. if (that.isCommiting) {
  1226. return;
  1227. }
  1228. that.setData({
  1229. isCommiting: true
  1230. });
  1231. let boo = await this.checkGoods();
  1232. console.info(boo);
  1233. if (!boo) {
  1234. that.setData({
  1235. isCommiting: false
  1236. });
  1237. return;
  1238. }
  1239. //不用加购物车 直接跳转
  1240. app.globalData.infoGoods = {
  1241. name: that.goods.name,
  1242. brief: that.goods.brief,
  1243. picUrl: that.goods.picUrl,
  1244. type: that.checkedSku.type,
  1245. id: that.goods.id
  1246. };
  1247. //20230523对于买约分离的商品 不用提单页 直接结算
  1248. // 商品类型 0 服务类商品 1保险 2中介 3买约分离次卡
  1249. if (that.checkedSku.type == 3 || that.checkedSku.type == 4) {
  1250. console.info('直接拉起支付');
  1251. that.checkoutInfo();
  1252. return;
  1253. }
  1254. uni.setStorageSync('cartId', 0);
  1255. uni.setStorageSync('goodsId', that.goods.id);
  1256. // uni.navigateTo({
  1257. // url: '/pages/checkout/checkout'
  1258. // });
  1259. if (that.checkedSku.type == 0) {
  1260. uni.navigateTo({
  1261. url: '/pages/checkout/checkout?productId=' + this.checkedSku.id +
  1262. '&unitIncreaseNumber=' + this.plusNum
  1263. });
  1264. }
  1265. that.setData({
  1266. isCommiting: false
  1267. });
  1268. },
  1269. async checkGoods() {
  1270. let boo = true;
  1271. let that = this;
  1272. //console.info(code);
  1273. await util
  1274. .request(
  1275. api.OrderCheckGoods, {
  1276. goodsId: this.goods.id,
  1277. openId: this.openId,
  1278. productId: this.checkedSku.id,
  1279. unitIncreaseNumber: this.plusNum
  1280. // bookDetailId:this.data.bookDetail.bookDetailId
  1281. },
  1282. 'GET'
  1283. )
  1284. .then(function(res) {
  1285. console.info(res);
  1286. if (res.data && res.data.user) {
  1287. app.globalData.hasLogin = true;
  1288. app.globalData.userInfo = res.data.user.userInfo;
  1289. uni.setStorageSync('userInfo', res.data.user.userInfo);
  1290. uni.setStorageSync('token', res.data.user.token);
  1291. }
  1292. //弹出框信息
  1293. if (res.errno != 0) {
  1294. boo = false;
  1295. util.showErrorToast(res.errmsg);
  1296. } else if (res.data.code === 1) {
  1297. //存在未付款订单 直接拉起支付
  1298. that.setData({
  1299. actualPrice: res.data.actualPrice
  1300. });
  1301. let goNewPage = res.data.goNewPage;
  1302. that.continueToPay(res.data.orderSn, goNewPage);
  1303. boo = false;
  1304. //that.showMyModel(res.data.msg, that);
  1305. } else if (res.data.code === 2) {
  1306. boo = false;
  1307. //新客初体验商品,每个客户只有1次机会哦~
  1308. if (res.data.goodsId) {
  1309. uni.showModal({
  1310. title: '提醒',
  1311. content: res.data.msg,
  1312. confirmText: '去购买',
  1313. success(ress) {
  1314. if (ress.confirm) {
  1315. uni.navigateTo({
  1316. url: '/pages/goods/goods?id=' + res.data.goodsId
  1317. });
  1318. }
  1319. }
  1320. });
  1321. } else {
  1322. uni.showModal({
  1323. title: '提醒',
  1324. content: res.data.msg,
  1325. confirmText: '确定',
  1326. })
  1327. }
  1328. }
  1329. });
  1330. return boo;
  1331. },
  1332. async getStore() {
  1333. let res = await util.request(api.allStore, {}, 'GET');
  1334. if (res.errno == 0) {
  1335. console.log(res);
  1336. this.setData({
  1337. storeNum: res.data.count
  1338. });
  1339. }
  1340. },
  1341. async getMaxCoupon() {
  1342. if (this.openId) {
  1343. let res = await util.request(
  1344. api.selectMaxCoupon, {
  1345. goodsId: this.goods.id,
  1346. openId: this.openId
  1347. },
  1348. 'GET'
  1349. );
  1350. console.log(res);
  1351. if (res.errno == 0) {
  1352. this.setData({
  1353. couponPrice: res.data.couponPrice,
  1354. couponId: res.data.couponId,
  1355. userCouponId: res.data.userCouponId,
  1356. couponVoList: res.data.couponVoList,
  1357. finallyPrice: Number(this.checkedSku.price - res.data.couponPrice).toFixed(2)
  1358. });
  1359. this.setData({
  1360. totalPrice: this.finallyPrice
  1361. });
  1362. }
  1363. } else {
  1364. await this.getUserOpenId();
  1365. let res = await util.request(
  1366. api.selectMaxCoupon, {
  1367. // productId: this.data.checkedSku.id,
  1368. goodsId: this.goods.id,
  1369. openId: this.openId
  1370. },
  1371. 'GET'
  1372. );
  1373. console.log(res);
  1374. if (res.errno == 0) {
  1375. this.setData({
  1376. couponPrice: res.data.couponPrice,
  1377. couponId: res.data.couponId,
  1378. userCouponId: res.data.userCouponId,
  1379. couponVoList: res.data.couponVoList,
  1380. finallyPrice: Number(this.checkedSku.price - res.data.couponPrice).toFixed(2)
  1381. });
  1382. this.setData({
  1383. totalPrice: this.finallyPrice
  1384. });
  1385. }
  1386. }
  1387. },
  1388. aliSubmit() {
  1389. uni.showLoading({
  1390. title: '加载中'
  1391. });
  1392. util.request(api.OrderSubmit, {
  1393. addressId: 0,
  1394. shopId: 0,
  1395. cart: 0,
  1396. goodsId: this.goods.id,
  1397. couponId: this.couponId,
  1398. userCouponId: this.userCouponId,
  1399. productId: this.checkedSku.id,
  1400. unitIncreaseNumber: this.plusNum,
  1401. openId:this.openId,
  1402. orderDate: {
  1403. type: 0,
  1404. weeks: [],
  1405. },
  1406. }, 'POST')
  1407. .then(res => {
  1408. if (res.errno === 0) {
  1409. this.aliPrepay(res.data.orderId);
  1410. } else {
  1411. uni.showModal({
  1412. title: '提醒',
  1413. showCancel: false,
  1414. content: res.errmsg
  1415. });
  1416. }
  1417. })
  1418. .catch((res) => {
  1419. uni.hideLoading();
  1420. util.showErrorToast(res.errmsg);
  1421. });
  1422. },
  1423. aliPrepay(orderId) {
  1424. uni.showLoading({
  1425. title: '加载中'
  1426. });
  1427. let that = this;
  1428. util.request(api.aliPrepay, {
  1429. orderId: orderId
  1430. }).then(function(res) {
  1431. if (res.errno === 0) {
  1432. //是否跳转新支付结果页面
  1433. let goNewPage = res.data.goNewPage;
  1434. let tradeNo = res.data.payment.tradeNo;
  1435. let outOrderNo = res.data.payment.outTradeNo;
  1436. my.tradePay({
  1437. tradeNO: tradeNo,
  1438. success: (payres) => {
  1439. uni.hideLoading();
  1440. util.addLog(1, 3, 15, {
  1441. goodsId: that.goods.id,
  1442. productId: that.checkedSku.id
  1443. });
  1444. uni.hideLoading();
  1445. console.log('ali调起支付成功');
  1446. console.log(payres);
  1447. let resultCode = payres.resultCode;
  1448. if (resultCode == '9000') {
  1449. //如果是静默状态未登录 开始授权登录
  1450. if (!app.globalData.hasLogin) {
  1451. user.getLoginInfo(outOrderNo).then((resUser) => {
  1452. if (resUser.errno == 0) {
  1453. app.globalData.hasLogin = true;
  1454. app.globalData.userInfo = resUser.data
  1455. .userInfo;
  1456. uni.setStorageSync('userInfo', resUser.data
  1457. .userInfo);
  1458. uni.setStorageSync('token', resUser.data
  1459. .token);
  1460. }
  1461. });
  1462. }
  1463. if (goNewPage) {
  1464. uni.redirectTo({
  1465. url: '/pages/checkout/payResult/payResultNew?status=1&outOrderNo=' +
  1466. outOrderNo + '&actualPrice=' + that
  1467. .actualPrice + '&goodsId=' + that.id +
  1468. '&productId=' + that.checkedSku.id
  1469. });
  1470. } else {
  1471. uni.redirectTo({
  1472. url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' +
  1473. outOrderNo + '&actualPrice=' + that
  1474. .actualPrice + '&goodsId=' + that.id
  1475. });
  1476. }
  1477. } else {
  1478. util.addLog(1, 3, 14, {
  1479. goodsId: that.goods.id,
  1480. productId: that.checkedSku.id
  1481. });
  1482. uni.showModal({
  1483. title: '提示',
  1484. content: "未支付成功," + payres.memo,
  1485. showCancel: false,
  1486. success: function(modalres) {
  1487. if (modalres.confirm) {
  1488. uni.navigateTo({
  1489. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' +
  1490. outOrderNo
  1491. });
  1492. }
  1493. }
  1494. });
  1495. }
  1496. },
  1497. fail: (failres) => {
  1498. console.log(failres);
  1499. uni.hideLoading();
  1500. }
  1501. });
  1502. } else {
  1503. uni.hideLoading();
  1504. uni.showModal({
  1505. title: '提醒',
  1506. showCancel: false,
  1507. content: res.errmsg
  1508. });
  1509. }
  1510. })
  1511. .catch((res) => {
  1512. uni.hideLoading();
  1513. util.showErrorToast(res.errmsg);
  1514. });
  1515. },
  1516. orderPrepay() {
  1517. let that = this;
  1518. util.request(api.OrderPrepay, {
  1519. addressId: 0,
  1520. shopId: 0,
  1521. cart: 0,
  1522. goodsId: that.goods.id,
  1523. couponId: that.couponId,
  1524. userCouponId: that.userCouponId,
  1525. productId: that.checkedSku.id,
  1526. unitIncreaseNumber: that.plusNum,
  1527. openId:that.openId
  1528. })
  1529. .then(function(res) {
  1530. if (res.errno === 0) {
  1531. //是否跳转新支付结果页面
  1532. let goNewPage = res.data.goNewPage;
  1533. var callbackData = {
  1534. cartId: null,
  1535. addressId: 0,
  1536. couponId: that.couponId,
  1537. userCouponId: that.userCouponId,
  1538. orderDate: {
  1539. goodId: that.goods.id,
  1540. productId: that.checkedSku.id
  1541. // bookDetailId:that.data.serviceId,
  1542. // originalOrderId:that.data.bookDetail.originalOrderId,
  1543. // unitIncreaseNumber:that.data.plusNum
  1544. },
  1545. phone_num: that.mobile,
  1546. userId: that.userInfo ? that.userInfo.id : '',
  1547. unitIncreaseNumber: that.plusNum,
  1548. talentId: that.talentId,
  1549. qid: that.qid,
  1550. tradeOption: res.data.tradeOption,
  1551. buyAndBook: res.data.buyAndBook,
  1552. };
  1553. uni.showLoading({
  1554. title: '加载中'
  1555. });
  1556. console.info(callbackData);
  1557. uni.createOrder({
  1558. tenantId: res.data.tenantId,
  1559. skuList: res.data.skuList,
  1560. // goodsList: res.data.goodsList,
  1561. tradeOption: res.data.tradeOption,
  1562. payment: res.data.payment,
  1563. callbackData: callbackData,
  1564. callbackUrl: res.data.callbackUrl,
  1565. success: (res) => {
  1566. util.addLog(1, 3, 15, {
  1567. goodsId: that.goods.id,
  1568. productId: that.checkedSku.id
  1569. });
  1570. uni.hideLoading();
  1571. console.log('预下单成功11');
  1572. console.log(res);
  1573. const {
  1574. orderId,
  1575. outOrderNo
  1576. } = res;
  1577. console.log('success res', res, 'orderId', orderId, 'outOrderNo',
  1578. outOrderNo);
  1579. //如果是静默状态未登录 开始授权登录
  1580. if (!app.globalData.hasLogin) {
  1581. user.getLoginInfo(outOrderNo).then((resUser) => {
  1582. if (resUser.errno == 0) {
  1583. app.globalData.hasLogin = true;
  1584. app.globalData.userInfo = resUser.data.userInfo;
  1585. uni.setStorageSync('userInfo', resUser.data
  1586. .userInfo);
  1587. uni.setStorageSync('token', resUser.data.token);
  1588. }
  1589. });
  1590. }
  1591. if (goNewPage) {
  1592. uni.redirectTo({
  1593. url: '/pages/checkout/payResult/payResultNew?status=1&outOrderNo=' +
  1594. outOrderNo + '&actualPrice=' + that.actualPrice +
  1595. '&goodsId=' + that.id + '&productId=' + that
  1596. .checkedSku.id
  1597. });
  1598. } else {
  1599. uni.redirectTo({
  1600. url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' +
  1601. outOrderNo + '&actualPrice=' + that.actualPrice +
  1602. '&goodsId=' + that.id
  1603. });
  1604. }
  1605. },
  1606. fail: (res) => {
  1607. util.addLog(1, 3, 14, {
  1608. goodsId: that.goods.id,
  1609. productId: that.checkedSku.id
  1610. });
  1611. uni.hideLoading();
  1612. console.log('预下单失败');
  1613. console.log(res);
  1614. const {
  1615. orderId,
  1616. outOrderNo,
  1617. errNo,
  1618. errMsg,
  1619. errLogId
  1620. } = res;
  1621. if (errLogId) {
  1622. console.log('预下单失败', errNo, errMsg, errLogId);
  1623. let tomsg = errMsg;
  1624. if (tomsg.indexOf('createOrder') != -1) {
  1625. tomsg = tomsg.replace('createOrder:fail 开发者限购:', '');
  1626. tomsg = tomsg.replace('createOrder:fail 开发者拒绝交易:', '');
  1627. tomsg = tomsg.replace('createOrder:fail', '');
  1628. }
  1629. uni.showModal({
  1630. title: '提示',
  1631. content: tomsg,
  1632. showCancel: false
  1633. });
  1634. }
  1635. if (orderId || outOrderNo) {
  1636. uni.navigateTo({
  1637. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' +
  1638. outOrderNo
  1639. });
  1640. console.log('支付失败', errNo, errMsg, orderId, outOrderNo);
  1641. // that.setData({
  1642. // payFailShow: true
  1643. // });
  1644. }
  1645. console.log(errNo, errMsg);
  1646. }
  1647. });
  1648. } else {
  1649. uni.showModal({
  1650. title: '提醒',
  1651. showCancel: false,
  1652. content: res.errmsg
  1653. });
  1654. }
  1655. })
  1656. .catch((res) => {
  1657. uni.hideLoading();
  1658. util.showErrorToast(res.errmsg);
  1659. });
  1660. },
  1661. checkoutInfo() {
  1662. let that = this;
  1663. util.request(api.CartCheckout, {
  1664. cartId: 0,
  1665. addressId: 0,
  1666. couponId: that.couponId,
  1667. userCouponId: that.userCouponId,
  1668. goodsId: that.goods.id,
  1669. openId: that.openId,
  1670. productId: this.checkedSku.id,
  1671. unitIncreaseNumber: this.plusNum,
  1672. qid: that.qid
  1673. }).then(function(res) {
  1674. if (res.errno === 0) {
  1675. console.info(res);
  1676. that.setData({
  1677. checkedAddress: res.data.checkedAddress,
  1678. actualPrice: res.data.actualPrice,
  1679. couponPrice: res.data.couponPrice,
  1680. addressId: res.data.addressId,
  1681. couponId: res.data.couponId,
  1682. userCouponId: res.data.userCouponId,
  1683. mobile: res.data.mobile
  1684. });
  1685. //提交订单
  1686. that.submitOrder();
  1687. that.setData({
  1688. isCommiting: false
  1689. });
  1690. } else {
  1691. uni.showModal({
  1692. title: '提示',
  1693. content: res.errmsg,
  1694. showCancel: false
  1695. });
  1696. }
  1697. });
  1698. },
  1699. submitOrder() {
  1700. util.addLog(1, 3, 13, {
  1701. goodsId: this.goods.id,
  1702. productId: this.checkedSku.id
  1703. });
  1704. // #ifdef MP-TOUTIAO
  1705. this.orderPrepay();
  1706. // #endif
  1707. // #ifdef MP-ALIPAY
  1708. this.aliSubmit();
  1709. // #endif
  1710. },
  1711. continueToPay(outOrderNo, goNewPage) {
  1712. //已有订单重复提交
  1713. let that = this;
  1714. uni.continueToPay({
  1715. outOrderNo: outOrderNo,
  1716. // 外部订单号 2个订单号必填一个
  1717. success: (res) => {
  1718. console.log(res);
  1719. const {
  1720. orderId,
  1721. outOrderNo
  1722. } = res;
  1723. console.log('success res', res);
  1724. console.log('orderId', orderId, 'outOrderNo', outOrderNo);
  1725. if (goNewPage) {
  1726. uni.redirectTo({
  1727. url: '/pages/checkout/payResult/payResultNew?status=1&outOrderNo=' +
  1728. outOrderNo + '&actualPrice=' + that.actualPrice + '&goodsId=' +
  1729. that.id + '&productId=' + that.checkedSku.id
  1730. });
  1731. } else {
  1732. uni.redirectTo({
  1733. url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' +
  1734. outOrderNo + '&actualPrice=' + that.actualPrice + '&goodsId=' +
  1735. that.id
  1736. });
  1737. }
  1738. // uni.redirectTo({
  1739. // url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' + outOrderNo + '&actualPrice=' + that.actualPrice
  1740. // });
  1741. },
  1742. fail: (res) => {
  1743. console.log(res);
  1744. const {
  1745. orderId,
  1746. outOrderNo,
  1747. errNo,
  1748. errMsg,
  1749. errLogId
  1750. } = res;
  1751. if (errLogId) {
  1752. console.log('查询订单信息失败', errNo, errMsg, errLogId);
  1753. }
  1754. if (orderId || outOrderNo) {
  1755. console.log('支付失败', errNo, errMsg, orderId, outOrderNo);
  1756. console.log('订单号' + outOrderNo);
  1757. uni.navigateTo({
  1758. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' + outOrderNo
  1759. });
  1760. }
  1761. // util.showErrorToast('放弃支付');
  1762. }
  1763. });
  1764. },
  1765. async getUserOpenId() {
  1766. let that = this;
  1767. let res = await user.userOpenId();
  1768. console.log(res);
  1769. that.setData({
  1770. openId: res.data
  1771. });
  1772. console.info(res);
  1773. uni.setStorageSync('openId', res.data);
  1774. // .then(res => {
  1775. // that.setData({
  1776. // openId: res.data
  1777. // })
  1778. // console.info(res)
  1779. // wx.setStorageSync('openId', res.data);
  1780. // });
  1781. },
  1782. gofastAddCart() {
  1783. var that = this;
  1784. //提示选择完整规格
  1785. // if (!this.isCheckedAllSpec()) {
  1786. // util.showErrorToast('请选择完整规格');
  1787. // return false;
  1788. // }
  1789. //根据选中的规格,判断是否有对应的sku信息
  1790. // let checkedProductArray = this.getCheckedProductItem(this.getCheckedSpecKey());
  1791. // if (!checkedProductArray || checkedProductArray.length <= 0) {
  1792. // //找不到对应的product信息,提示没有库存
  1793. // util.showErrorToast('没有库存');
  1794. // return false;
  1795. // }
  1796. // let checkedProduct = checkedProductArray[0];
  1797. // //验证库存
  1798. // if (checkedProduct.number <= 0) {
  1799. // util.showErrorToast('没有库存');
  1800. // return false;
  1801. // }
  1802. //立即购买
  1803. // util.request(api.CartFastAdd, {
  1804. // goodsId: this.data.goods.id,
  1805. // number: this.data.number,
  1806. // productId: checkedProduct.id,
  1807. // shareId: this.data.shareId
  1808. // }, "POST").then(res => {
  1809. // if (res.errno == 0) {
  1810. // 如果storage中设置了cartId,则是立即购买,否则是购物车购买
  1811. try {
  1812. // wx.setStorageSync('cartId', res.data);
  1813. // wx.setStorageSync('grouponRulesId', checkedGroupon.id);
  1814. // wx.setStorageSync('grouponLinkId', that.data.grouponLink.id);
  1815. // 支付结果页面展示图片用
  1816. app.globalData.infoGoods = {
  1817. name: this.goods.name,
  1818. brief: this.goods.brief,
  1819. picUrl: this.goods.picUrl,
  1820. type: that.checkedSku.type,
  1821. };
  1822. uni.setStorageSync('cartId', 0);
  1823. uni.setStorageSync('goodsId', this.goods.id);
  1824. console.info(that.shareId);
  1825. if (that.shareId > 0) {
  1826. uni.navigateTo({
  1827. url: '/pages/checkout/checkout?shareId=' + that.shareId
  1828. });
  1829. } else {
  1830. uni.navigateTo({
  1831. url: '/pages/checkout/checkout'
  1832. });
  1833. }
  1834. } catch (e) {
  1835. console.log('CatchClause', e);
  1836. console.log('CatchClause', e);
  1837. console.info(e);
  1838. }
  1839. // } else {
  1840. // util.showErrorToast(res.errmsg);
  1841. // }
  1842. // });
  1843. },
  1844. getdefalutUserAddress() {
  1845. //登陆拿用户默认地址,如果没有就拿系统默认地址
  1846. //如果有默认地址,但是不在门店服务区域里
  1847. util.request(api.OrderBookDefaultAddress, {}, 'get').then((res) => {
  1848. if (res.errno === 0) {
  1849. let address = res.data;
  1850. var city = address.city.indexOf('市辖') != -1 ? address.province : address.city;
  1851. //通过jz_shop的shop_no关联服务力分配的门店id,拿实际的jz_shop的门店id
  1852. var addresInfo = {
  1853. city: city,
  1854. lng: address.lng,
  1855. lat: address.lat,
  1856. shopId: address.shopId,
  1857. address: address.addressDetail,
  1858. shopName: address.shopName
  1859. };
  1860. uni.setStorageSync('addressInfo', addresInfo);
  1861. } else {
  1862. //无默认地址时 拿系统的
  1863. this.getdefaultCityShop();
  1864. }
  1865. });
  1866. },
  1867. getdefaultCityShop() {
  1868. let that = this;
  1869. util.request(api.getDefaultCityShop, {}, 'get').then((res) => {
  1870. if (res.errno === 0) {
  1871. uni.setStorageSync('addressInfo', res.data);
  1872. }
  1873. });
  1874. },
  1875. showMyModel(msg, that) {
  1876. uni.showModal({
  1877. title: '',
  1878. content: msg,
  1879. confirmText: '去处理',
  1880. cancelText: '取消',
  1881. success: function(res) {
  1882. //此商品有个未支付的订单,请到订单页去支付或取消重新下单。
  1883. //去处理:跳转订单页
  1884. if (res.confirm) {
  1885. try {
  1886. uni.setStorageSync('tab', 1);
  1887. } catch (e) {
  1888. console.log('CatchClause', e);
  1889. console.log('CatchClause', e);
  1890. }
  1891. uni.navigateTo({
  1892. url: '/pages/ucenter/order/order',
  1893. success: function(res) {},
  1894. fail: function(res) {},
  1895. complete: function(res) {}
  1896. });
  1897. } else {
  1898. that.gofastAddCart();
  1899. }
  1900. }
  1901. });
  1902. },
  1903. //添加到购物车
  1904. addToCart: function() {
  1905. var that = this;
  1906. if (this.openAttr == false) {
  1907. //打开规格选择窗口
  1908. this.setData({
  1909. openAttr: !this.openAttr
  1910. });
  1911. } else {
  1912. //提示选择完整规格
  1913. if (!this.isCheckedAllSpec()) {
  1914. util.showErrorToast('请选择完整规格');
  1915. return false;
  1916. }
  1917. //根据选中的规格,判断是否有对应的sku信息
  1918. let checkedProductArray = this.getCheckedProductItem(this.getCheckedSpecKey());
  1919. if (!checkedProductArray || checkedProductArray.length <= 0) {
  1920. //找不到对应的product信息,提示没有库存
  1921. util.showErrorToast('没有库存');
  1922. return false;
  1923. }
  1924. let checkedProduct = checkedProductArray[0];
  1925. //验证库存
  1926. if (checkedProduct.number <= 0) {
  1927. util.showErrorToast('没有库存');
  1928. return false;
  1929. }
  1930. //添加到购物车
  1931. util.request(
  1932. api.CartAdd, {
  1933. goodsId: this.goods.id,
  1934. number: this.number,
  1935. productId: checkedProduct.id
  1936. },
  1937. 'POST'
  1938. ).then(function(res) {
  1939. let _res = res;
  1940. if (_res.errno == 0) {
  1941. uni.showToast({
  1942. title: '添加成功'
  1943. });
  1944. that.setData({
  1945. openAttr: !that.openAttr,
  1946. cartGoodsCount: _res.data
  1947. });
  1948. //显示tab购物车缓存
  1949. //user.cartadd(that.data.number);
  1950. if (that.userHasCollect == 1) {
  1951. that.setData({
  1952. collect: true
  1953. });
  1954. } else {
  1955. that.setData({
  1956. collect: false
  1957. });
  1958. }
  1959. } else {
  1960. util.showErrorToast(_res.errmsg);
  1961. }
  1962. });
  1963. }
  1964. },
  1965. cutNumber: function() {
  1966. this.setData({
  1967. number: this.number - 1 > 1 ? this.number - 1 : 1
  1968. });
  1969. },
  1970. addNumber: function() {
  1971. // 如果是安心包只能购买一个
  1972. console.log(this.goods);
  1973. if (this.goods.goodsSn == '1036016') {
  1974. uni.showToast({
  1975. title: '此款商品只能购买一个',
  1976. icon: 'none',
  1977. duration: 2000
  1978. });
  1979. } else {
  1980. this.setData({
  1981. number: this.number + 1
  1982. });
  1983. }
  1984. },
  1985. switchAttrPop: function() {
  1986. if (this.openAttr == false) {
  1987. this.setData({
  1988. openAttr: !this.openAttr
  1989. });
  1990. }
  1991. },
  1992. closeAttr: function() {
  1993. this.setData({
  1994. openAttr: false
  1995. });
  1996. },
  1997. closeShare: function() {
  1998. this.setData({
  1999. openShare: false
  2000. });
  2001. },
  2002. openCartPage: function() {
  2003. uni.switchTab({
  2004. url: '/pages/tabBar/cart/cart'
  2005. });
  2006. },
  2007. qrtouchstart: function() {
  2008. this.setData({
  2009. myqr_blur: 100,
  2010. myqr_show: false
  2011. });
  2012. },
  2013. copyToHM() {
  2014. let copyLink = this.goods.copyLink;
  2015. console.log(copyLink);
  2016. if (copyLink != undefined && copyLink != '') {
  2017. uni.setClipboardData({
  2018. data: copyLink,
  2019. success(res) {
  2020. uni.getClipboardData({
  2021. success(res) {
  2022. console.log(res.data); // data
  2023. }
  2024. });
  2025. }
  2026. });
  2027. } else {
  2028. uni.showToast({
  2029. title: '该商品暂未配置盒马链接',
  2030. icon: 'none'
  2031. });
  2032. }
  2033. },
  2034. onSelfPayChange(e) {
  2035. console.log(e);
  2036. this.setData({
  2037. selfPayChecked: e.detail
  2038. });
  2039. },
  2040. onSpreadPayChange(e) {
  2041. console.log(e);
  2042. this.setData({
  2043. spreadPayChecked: e.detail
  2044. });
  2045. },
  2046. cancelSelfPay() {
  2047. let selfPayChecked = this.selfPayChecked;
  2048. if (selfPayChecked == true) {
  2049. uni.setStorageSync('selfPayChecked', true);
  2050. }
  2051. this.setData({
  2052. selfPayShow: false
  2053. });
  2054. },
  2055. cancelSpreadPay() {
  2056. let spreadPayChecked = this.spreadPayChecked;
  2057. if (spreadPayChecked == true) {
  2058. uni.setStorageSync('spreadPayChecked', true);
  2059. }
  2060. this.setData({
  2061. spreadPayShow: false
  2062. });
  2063. },
  2064. goSelfPay() {
  2065. let selfPayChecked = uni.getStorageSync('selfPayChecked');
  2066. if (selfPayChecked != true) {
  2067. this.setData({
  2068. selfPayShow: true
  2069. });
  2070. } else {
  2071. this.addFast();
  2072. }
  2073. },
  2074. goSpread() {
  2075. let spreadPayChecked = uni.getStorageSync('spreadPayChecked');
  2076. console.log(spreadPayChecked);
  2077. if (spreadPayChecked != true) {
  2078. this.setData({
  2079. spreadPayShow: true
  2080. });
  2081. } else {
  2082. // wx.navigateTo({
  2083. // url: '/pages/goods/goodsPoster/goodsPoster?goodsId='+this.data.goods.id,
  2084. // })
  2085. this.createPoster();
  2086. }
  2087. },
  2088. posterCopy() {
  2089. let that = this;
  2090. uni.setClipboardData({
  2091. data: that.myqr_ads,
  2092. success: function(res) {
  2093. uni.getClipboardData({
  2094. success: function(res) {
  2095. uni.showToast({
  2096. title: '文案复制成功',
  2097. icon: 'success',
  2098. duration: 2000
  2099. });
  2100. // that.hidePoster();
  2101. }
  2102. });
  2103. }
  2104. });
  2105. },
  2106. hidePoster() {
  2107. this.setData({
  2108. myqr_show: false,
  2109. myqr_blur: 100,
  2110. myqr_bottom_btn: 'fixed'
  2111. });
  2112. },
  2113. createPoster() {
  2114. uni.showLoading({
  2115. title: '生成中'
  2116. });
  2117. uni.pageScrollTo({
  2118. scrollTop: 0
  2119. });
  2120. if (this.myqr_url != null) {
  2121. uni.hideLoading();
  2122. this.setData({
  2123. myqr_show: true,
  2124. myqr_blur: 25,
  2125. myqr_bottom_btn: 'unset'
  2126. });
  2127. return;
  2128. }
  2129. util.request(
  2130. api.QrGoodsCodeCreate, {
  2131. goods_id: this.goods.id
  2132. },
  2133. 'POST'
  2134. ).then((res) => {
  2135. uni.hideLoading();
  2136. if (res.errno == 0) {
  2137. this.setData({
  2138. myqr_url: res.data.imgUrl,
  2139. myqr_ads: res.data.ads,
  2140. myqr_show: true,
  2141. myqr_blur: 25,
  2142. myqr_bottom_btn: 'unset'
  2143. });
  2144. } else {
  2145. util.showErrorToast('未设置分享图');
  2146. }
  2147. });
  2148. },
  2149. goSaveQrcode: function() {
  2150. //保存二维码图片
  2151. let that = this;
  2152. console.info(that.myqr_url);
  2153. uni.downloadFile({
  2154. url: that.myqr_url,
  2155. success: function(res) {
  2156. if (res.statusCode === 200) {
  2157. let img = res.tempFilePath;
  2158. uni.saveImageToPhotosAlbum({
  2159. filePath: img,
  2160. success(res) {
  2161. that.goCloseMyqr('个人专属二维码图片已保存到您的相册');
  2162. },
  2163. fail(res) {
  2164. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2165. }
  2166. });
  2167. } else {
  2168. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2169. }
  2170. },
  2171. fail(res) {
  2172. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2173. }
  2174. });
  2175. },
  2176. goCloseMyqr: function(msg) {
  2177. //关闭分享图片的弹层
  2178. this.hidePoster();
  2179. if (msg) {
  2180. uni.showToast({
  2181. title: msg,
  2182. icon: 'none',
  2183. duration: 3000
  2184. });
  2185. }
  2186. },
  2187. reSelfPay() {
  2188. let selfPayChecked = this.selfPayChecked;
  2189. if (selfPayChecked == true) {
  2190. uni.setStorageSync('selfPayChecked', true);
  2191. }
  2192. this.setData({
  2193. selfPayShow: false
  2194. });
  2195. this.addFast();
  2196. },
  2197. reSpread() {
  2198. // let spreadPayChecked = this.data.spreadPayChecked;
  2199. // if (spreadPayChecked == true) {
  2200. // wx.setStorageSync('spreadPayChecked', true);
  2201. // }
  2202. this.setData({
  2203. spreadPayShow: false
  2204. });
  2205. this.createPoster();
  2206. // wx.navigateTo({
  2207. // url: '/pages/goods/goodsPoster/goodsPoster?goodsId='+this.data.goods.id,
  2208. // })
  2209. },
  2210. goMemberCenter() {
  2211. if (!app.globalData.hasLogin) {
  2212. uni.navigateTo({
  2213. url: '/pages/auth/login/login'
  2214. });
  2215. return;
  2216. } else {
  2217. uni.navigateTo({
  2218. url: '/pages/member/memberCenter/memberCenter'
  2219. });
  2220. }
  2221. },
  2222. bindGoodsNumInput(e) {
  2223. console.log(e.detail.value);
  2224. let max = this.productList[0].unitMaximum;
  2225. let plusNum = parseInt(e.detail.value == '' ? 0 : e.detail.value);
  2226. if (plusNum > max){
  2227. plusNum = max;
  2228. }
  2229. let addPurchaseAmount=this.checkedSku.unitPrice*plusNum;
  2230. this.setData({
  2231. plusNum: plusNum,
  2232. addPurchaseAmount:addPurchaseAmount,
  2233. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2234. });
  2235. // this.setData({
  2236. // totalPrice: Number(Number(this.finallyPrice) + Number(this.goods.unitPrice) * Number(this
  2237. // .plusNum)).toFixed(2)
  2238. // });
  2239. },
  2240. minusNum() {
  2241. if (this.plusNum == this.minNum) {
  2242. return false;
  2243. } else {
  2244. let result = Number(this.plusNum) - 1;
  2245. // this.setData({
  2246. // plusNum:(result==0?'0':result)
  2247. // });
  2248. // 加购类
  2249. // if (this.goods.productType == 3) {
  2250. // let currentAdd = this.productList.filter((item) => {
  2251. // return item.unitIncreaseNumber == result;
  2252. // });
  2253. // if (currentAdd.length >= 1) {
  2254. // let amount = currentAdd[0].price;
  2255. // this.setData({
  2256. // checkedSku: currentAdd[0],
  2257. // plusNum: result,
  2258. // addPurchaseAmount: amount,
  2259. // totalPrice: Number(Number(amount) - Number(this.couponPrice)).toFixed(2)
  2260. // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
  2261. // });
  2262. // } else {
  2263. // uni.showToast({
  2264. // title: '当前加购数量无效',
  2265. // icon: 'none'
  2266. // });
  2267. // }
  2268. // } else if (this.goods.type == 4) {
  2269. let addPurchaseAmount=this.checkedSku.unitPrice*result;
  2270. console.log(this.checkedSku.price * this.plusNum);
  2271. console.log(this.checkedSku.price * this.plusNum - this.couponPrice);
  2272. // 补差类
  2273. this.setData({
  2274. plusNum: result,
  2275. addPurchaseAmount:addPurchaseAmount,
  2276. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2277. });
  2278. // }
  2279. }
  2280. },
  2281. addNum() {
  2282. if (this.productList[0].unitMaximum && this.plusNum >= this.productList[0].unitMaximum) {
  2283. return false;
  2284. } else {
  2285. let result = Number(this.plusNum) + 1;
  2286. // 加购类
  2287. // if (this.goods.productType == 3) {
  2288. // let currentAdd = this.productList.filter((item) => {
  2289. // return item.unitIncreaseNumber == result;
  2290. // });
  2291. // if (currentAdd.length >= 1) {
  2292. // let amount = currentAdd[0].price;
  2293. // this.setData({
  2294. // checkedSku: currentAdd[0],
  2295. // plusNum: result,
  2296. // addPurchaseAmount: amount,
  2297. // totalPrice: Number(Number(amount) - Number(this.couponPrice)).toFixed(2)
  2298. // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
  2299. // });
  2300. // } else {
  2301. // uni.showToast({
  2302. // title: '此加购数量无效',
  2303. // icon: 'none'
  2304. // });
  2305. // }
  2306. // } else if (this.goods.type == 4) {
  2307. // 补差类
  2308. let addPurchaseAmount=this.checkedSku.unitPrice*result;
  2309. console.log(this.checkedSku.price * this.plusNum);
  2310. console.log(this.checkedSku.price * this.plusNum - this.couponPrice);
  2311. // 补差类
  2312. this.setData({
  2313. plusNum: result,
  2314. addPurchaseAmount:addPurchaseAmount,
  2315. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2316. });
  2317. // }
  2318. }
  2319. },
  2320. goWholeEval() {
  2321. uni.navigateTo({
  2322. url: '/pages/goods/wholeEvaluation/wholeEvaluation?id=' + this.id
  2323. });
  2324. },
  2325. onSkuClose() {
  2326. this.setData({
  2327. chooseSkuVisible: false
  2328. });
  2329. },
  2330. showSkuPopup(type) {
  2331. this.setData({
  2332. showType: type,
  2333. chooseSkuVisible: true,
  2334. currentSku: this.checkedSku,
  2335. activeSku: this.checkedSku.id
  2336. });
  2337. },
  2338. selectSku(e) {
  2339. let id = e.currentTarget.dataset.id;
  2340. let index = e.currentTarget.dataset.index;
  2341. this.setData({
  2342. activeSku: id,
  2343. currentSku: this.productList[index],
  2344. // checkedSku: this.productList[index]
  2345. });
  2346. },
  2347. confSku() {
  2348. this.setData({
  2349. checkedSku: this.currentSku,
  2350. chooseSkuVisible: false
  2351. });
  2352. this.setData({
  2353. finallyPrice: Number(this.checkedSku.price - this.couponPrice).toFixed(2)
  2354. });
  2355. // if (this.goods.type == 4) {
  2356. // this.setData({
  2357. // totalPrice: Number(this.checkedSku.price * this.plusNum - this.couponPrice).toFixed(2)
  2358. // });
  2359. // } else {
  2360. this.setData({
  2361. totalPrice: Number(this.checkedSku.price - this.couponPrice).toFixed(2)
  2362. });
  2363. // }
  2364. util.addLog(1, 1, 11, {
  2365. goodsId: this.goods.id,
  2366. productId: this.checkedSku.id,
  2367. });
  2368. if (this.showType == 1) {
  2369. this.fastOrder();
  2370. }
  2371. },
  2372. stopClick() {}
  2373. }
  2374. };
  2375. </script>
  2376. <style>
  2377. .myqr {
  2378. position: absolute;
  2379. z-index: 999;
  2380. width: 100%;
  2381. text-align: center;
  2382. height: auto;
  2383. margin-top: 50rpx;
  2384. }
  2385. .myqr .cancel {
  2386. width: 60rpx;
  2387. height: 60rpx;
  2388. margin-top: 30rpx;
  2389. margin-left: 480rpx;
  2390. }
  2391. .myqr .img {
  2392. width: 480rpx;
  2393. }
  2394. .myqr .btn {
  2395. width: 120rpx;
  2396. height: 120rpx;
  2397. line-height: 120rpx;
  2398. margin-top: 20rpx;
  2399. padding: 30rpx;
  2400. background: #ffffff;
  2401. border-radius: 60rpx;
  2402. }
  2403. page {
  2404. background: #f3f3f3;
  2405. }
  2406. .container {
  2407. padding-bottom: 180rpx;
  2408. position: relative;
  2409. /* margin-bottom: 100rpx; */
  2410. }
  2411. .user_column_item_image {
  2412. width: 50rpx;
  2413. height: 50rpx;
  2414. margin-right: 26rpx;
  2415. margin-top: 25rpx;
  2416. }
  2417. .flexb {
  2418. width: 750rpx;
  2419. height: 88rpx;
  2420. line-height: 103rpx;
  2421. padding-right: 31.25rpx;
  2422. border-bottom: 1px solid #f4f4f4;
  2423. font-size: 30rpx;
  2424. color: #333;
  2425. background: #fff;
  2426. display: flex;
  2427. flex-wrap: nowrap;
  2428. }
  2429. .flex {
  2430. flex-grow: 1;
  2431. text-align: center;
  2432. }
  2433. .show {
  2434. width: 750rpx;
  2435. height: 88rpx;
  2436. background: #fff;
  2437. border-bottom: 1px solid #f4f4f4;
  2438. }
  2439. .show .t {
  2440. float: left;
  2441. width: 600rpx;
  2442. height: 88rpx;
  2443. line-height: 88rpx;
  2444. font-size: 29rpx;
  2445. color: #333;
  2446. margin-left: 31.25rpx;
  2447. }
  2448. .show .t .s {
  2449. font-weight: 600;
  2450. }
  2451. .show .i {
  2452. float: right;
  2453. width: 52rpx;
  2454. height: 52rpx;
  2455. margin-right: 16rpx;
  2456. margin-top: 28rpx;
  2457. }
  2458. .mark-img {
  2459. width: 168rpx;
  2460. height: 68rpx;
  2461. right: 5rpx;
  2462. position: absolute;
  2463. top: 5rpx;
  2464. }
  2465. .goodsimgs {
  2466. width: 750rpx;
  2467. /* height: 492rpx; */
  2468. height: 490rpx;
  2469. }
  2470. .goodsimgs image {
  2471. width: 750rpx;
  2472. /* height: 326rpx; */
  2473. height: 490rpx;
  2474. }
  2475. .commodity_screen {
  2476. width: 100%;
  2477. height: 100%;
  2478. position: fixed;
  2479. top: 0;
  2480. left: 0;
  2481. background: #000;
  2482. opacity: 0.2;
  2483. overflow: hidden;
  2484. z-index: 1000;
  2485. color: #fff;
  2486. }
  2487. .commodity_attr_box {
  2488. width: 100%;
  2489. overflow: hidden;
  2490. position: fixed;
  2491. bottom: 0;
  2492. left: 0;
  2493. z-index: 2000;
  2494. background: #fff;
  2495. padding-top: 20rpx;
  2496. }
  2497. /* 活动样式 */
  2498. .activity {
  2499. width: 750rpx;
  2500. height: 145rpx;
  2501. background: linear-gradient(67deg, #4f43dd, #689cf2, #ba64e2);
  2502. display: flex;
  2503. flex-direction: column;
  2504. padding: 20rpx 30rpx;
  2505. }
  2506. .activity .img {
  2507. background-image: url('https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/activity.png');
  2508. width: 139rpx;
  2509. height: 32rpx;
  2510. background-size: 100% 100%;
  2511. color: #5244dd;
  2512. font-size: 23rpx;
  2513. text-align: center;
  2514. }
  2515. .activityDay {
  2516. line-height: 42rpx;
  2517. margin-right: 30rpx;
  2518. display: flex;
  2519. height: 42rpx;
  2520. }
  2521. .activityDay image {
  2522. width: 42rpx;
  2523. height: 42rpx;
  2524. margin-right: 10rpx;
  2525. }
  2526. .activityDay text {
  2527. font-size: 24rpx;
  2528. color: #f4f4f4;
  2529. }
  2530. .activityPrice {
  2531. color: #ffffff;
  2532. }
  2533. .activityPrice text {
  2534. font-size: 49rpx;
  2535. font-weight: bold;
  2536. }
  2537. .activityCounterPrice {
  2538. color: #c7c7c7;
  2539. text-decoration: line-through;
  2540. font-size: 24rpx;
  2541. margin-top: 20rpx;
  2542. margin-left: 10rpx;
  2543. }
  2544. .activityTime {
  2545. display: flex;
  2546. flex-direction: row;
  2547. margin-right: 50rpx;
  2548. }
  2549. .activityTime text {
  2550. color: #ffffff;
  2551. line-height: 45rpx;
  2552. }
  2553. .activityTime view {
  2554. width: 45rpx;
  2555. height: 45rpx;
  2556. background: #ffffff;
  2557. border-radius: 5rpx;
  2558. margin: 5rpx;
  2559. line-height: 45rpx;
  2560. text-align: center;
  2561. font-size: 25rpx;
  2562. font-weight: bold;
  2563. color: #b563e1;
  2564. }
  2565. .activityTime .mark {}
  2566. .goods-info {
  2567. width: 750rpx;
  2568. /*height: 306rpx;*/
  2569. overflow: hidden;
  2570. background: #fff;
  2571. border-bottom: 1px solid #f4f4f4;
  2572. }
  2573. .goods-info .c {
  2574. display: block;
  2575. width: 718.75rpx;
  2576. height: 182rpx;
  2577. margin-left: 31.25rpx;
  2578. padding: 3rpx 31.25rpx 20rpx 0;
  2579. }
  2580. .goods-info .c text {
  2581. /* display: block;
  2582. width: 687.5rpx;
  2583. text-align: left; */
  2584. }
  2585. .goods_name {
  2586. white-space: nowrap;
  2587. text-overflow: ellipsis;
  2588. overflow: hidden;
  2589. margin-top: 10rpx;
  2590. display: flex;
  2591. align-items: center;
  2592. }
  2593. .goods_name_left {
  2594. font-weight: 550;
  2595. margin-left: 0rpx;
  2596. font-size: 36rpx;
  2597. letter-spacing: 1rpx;
  2598. color: #2a2a2a;
  2599. font-weight: bold;
  2600. width: 688rpx;
  2601. white-space: pre-wrap;
  2602. }
  2603. .goods_name_right {
  2604. font-weight: 550;
  2605. /* top: 375px; */
  2606. width: 80rpx;
  2607. height: 80rpx;
  2608. line-height: 82rpx;
  2609. /* padding: 0;
  2610. margin: 0;
  2611. right: 10rpx; */
  2612. margin-right: 0rpx;
  2613. text-align: center;
  2614. font-size: 25rpx;
  2615. background-color: #09afff;
  2616. border-radius: 40rpx;
  2617. letter-spacing: 3rpx;
  2618. /* position: absolute; */
  2619. }
  2620. .goods_name_right .img {
  2621. width: 50rpx;
  2622. height: 50rpx;
  2623. margin-top: 15rpx;
  2624. }
  2625. .goods_name_right .txt {
  2626. margin-top: 5rpx;
  2627. font-size: 18rpx;
  2628. color: #000000;
  2629. border: 1rpx solid;
  2630. }
  2631. .goods-info .desc {
  2632. margin: 12rpx 0;
  2633. font-size: 24rpx;
  2634. line-height: 36rpx;
  2635. width: 640rpx;
  2636. white-space: nowrap;
  2637. text-overflow: ellipsis;
  2638. overflow: hidden;
  2639. display: block;
  2640. }
  2641. .goods-info .price {
  2642. height: 60rpx;
  2643. display: flex;
  2644. /* margin-top: 20rpx; */
  2645. align-items: flex-end;
  2646. }
  2647. .goods-info .counterPrice {
  2648. padding-left: 5rpx;
  2649. text-decoration: line-through;
  2650. font-size: 24rpx;
  2651. margin-top: 15rpx;
  2652. margin-left: 10rpx;
  2653. color: #85868a;
  2654. }
  2655. .goods-info .retailPrice {
  2656. height: 49rpx;
  2657. line-height: 44rpx;
  2658. /* color: #5DB5E7; */
  2659. color: #ff2958;
  2660. }
  2661. .goods-info .memberPrice {
  2662. font-size: 26rpx;
  2663. color: #dd483e;
  2664. margin: 0 10rpx 0 20rpx;
  2665. }
  2666. .member-price-tag {
  2667. width: 88rpx;
  2668. height: 26rpx;
  2669. line-height: 26rpx;
  2670. background: url('https://mall.zhaijieshi.cc/file/jzmall/weixin/member/member-price-bg.png') no-repeat center center;
  2671. background-size: 100% 100%;
  2672. color: #5e3a11;
  2673. font-size: 16rpx;
  2674. padding: 0 8rpx 0 0;
  2675. text-align: right;
  2676. margin: 0 0 6rpx 0;
  2677. }
  2678. .member-price-tag.spread-tag {
  2679. margin-left: 20rpx;
  2680. background-image: url('https://mall.zhaijieshi.cc/file/jzmall/weixin/member/spread-price-bg.png');
  2681. width: 122rpx;
  2682. }
  2683. .goods-info .retailPrice text.checked-price {
  2684. font-size: 48rpx;
  2685. font-weight: bold;
  2686. margin-left: 3rpx;
  2687. color: #ff2958;
  2688. }
  2689. .goods-info .brand {
  2690. margin-top: 5rpx;
  2691. min-height: 34rpx;
  2692. text-align: left;
  2693. }
  2694. .goods-info .brand text {
  2695. display: inline-block;
  2696. width: auto;
  2697. padding: 2px 0rpx 2px 0.5rpx;
  2698. line-height: 32.5rpx;
  2699. /*border: 1px solid #f48f18;color: #f48f18;*/
  2700. font-size: 22rpx;
  2701. color: #a98f76;
  2702. /*border-radius: 4rpx;*/
  2703. background-size: 10.75rpx 18.75rpx;
  2704. }
  2705. .section-nav {
  2706. width: 750rpx;
  2707. height: 108rpx;
  2708. background: #fff;
  2709. margin-bottom: 20rpx;
  2710. }
  2711. .section-nav .t {
  2712. float: left;
  2713. width: 600rpx;
  2714. height: 108rpx;
  2715. line-height: 108rpx;
  2716. font-size: 29rpx;
  2717. color: #333;
  2718. margin-left: 31.25rpx;
  2719. }
  2720. .section-nav .i {
  2721. float: right;
  2722. width: 52rpx;
  2723. height: 52rpx;
  2724. margin-right: 16rpx;
  2725. margin-top: 28rpx;
  2726. }
  2727. .section-act .t {
  2728. float: left;
  2729. display: flex;
  2730. align-items: center;
  2731. width: 600rpx;
  2732. height: 108rpx;
  2733. overflow: hidden;
  2734. line-height: 108rpx;
  2735. font-size: 29rpx;
  2736. color: #999;
  2737. margin-left: 31.25rpx;
  2738. }
  2739. .section-act .label {
  2740. color: #999;
  2741. }
  2742. .section-act .tag {
  2743. display: flex;
  2744. align-items: center;
  2745. padding: 0 10rpx;
  2746. border-radius: 3px;
  2747. height: 37rpx;
  2748. width: auto;
  2749. color: #f48f18;
  2750. overflow: hidden;
  2751. border: 1px solid #f48f18;
  2752. font-size: 25rpx;
  2753. margin: 0 10rpx;
  2754. }
  2755. .section-act .text {
  2756. display: flex;
  2757. align-items: center;
  2758. height: 37rpx;
  2759. width: auto;
  2760. overflow: hidden;
  2761. color: #f48f18;
  2762. font-size: 29rpx;
  2763. }
  2764. .comments {
  2765. width: 100%;
  2766. height: auto;
  2767. padding-left: 30rpx;
  2768. background: #fff;
  2769. margin: 20rpx 0;
  2770. }
  2771. .comments .h {
  2772. height: 102.5rpx;
  2773. line-height: 100.5rpx;
  2774. width: 718.75rpx;
  2775. padding-right: 16rpx;
  2776. }
  2777. .comments .h .t {
  2778. display: block;
  2779. float: left;
  2780. width: 50%;
  2781. font-size: 30rpx;
  2782. color: #333;
  2783. }
  2784. .comments .h .i {
  2785. display: block;
  2786. float: right;
  2787. width: 164rpx;
  2788. height: 100.5rpx;
  2789. line-height: 100.5rpx;
  2790. background-size: 52rpx;
  2791. }
  2792. .comments .b {
  2793. height: auto;
  2794. width: 720rpx;
  2795. }
  2796. .comments .item {
  2797. height: auto;
  2798. width: 720rpx;
  2799. overflow: hidden;
  2800. border-top: 1px solid #d9d9d9;
  2801. }
  2802. .comments .info {
  2803. height: 127rpx;
  2804. width: 100%;
  2805. padding: 33rpx 0 27rpx 0;
  2806. }
  2807. .comments .user {
  2808. float: left;
  2809. width: auto;
  2810. height: 67rpx;
  2811. line-height: 67rpx;
  2812. font-size: 0;
  2813. }
  2814. .comments .user image {
  2815. float: left;
  2816. width: 67rpx;
  2817. height: 67rpx;
  2818. margin-right: 17rpx;
  2819. border-radius: 50%;
  2820. }
  2821. .comments .user text {
  2822. display: inline-block;
  2823. width: auto;
  2824. height: 66rpx;
  2825. overflow: hidden;
  2826. font-size: 29rpx;
  2827. line-height: 66rpx;
  2828. }
  2829. .comments .time {
  2830. display: block;
  2831. float: right;
  2832. width: auto;
  2833. height: 67rpx;
  2834. line-height: 67rpx;
  2835. color: #7f7f7f;
  2836. font-size: 25rpx;
  2837. margin-right: 30rpx;
  2838. }
  2839. .comments .content {
  2840. width: 720rpx;
  2841. padding-right: 30rpx;
  2842. line-height: 45.8rpx;
  2843. font-size: 29rpx;
  2844. margin-bottom: 24rpx;
  2845. }
  2846. .comments .imgs {
  2847. width: 720rpx;
  2848. height: auto;
  2849. margin-bottom: 25rpx;
  2850. }
  2851. .comments .imgs .img {
  2852. height: 150rpx;
  2853. width: 150rpx;
  2854. margin-right: 28rpx;
  2855. }
  2856. .comments .spec {
  2857. width: 720rpx;
  2858. padding-right: 30rpx;
  2859. line-height: 30rpx;
  2860. font-size: 24rpx;
  2861. color: #999;
  2862. margin-bottom: 30rpx;
  2863. }
  2864. .comments .customer-service {
  2865. width: 690rpx;
  2866. height: auto;
  2867. overflow: hidden;
  2868. margin-top: 23rpx;
  2869. margin-bottom: 23rpx;
  2870. background: rgba(0, 0, 0, 0.03);
  2871. padding: 21rpx;
  2872. }
  2873. .comments .customer-service .u {
  2874. font-size: 24rpx;
  2875. color: #333;
  2876. line-height: 37.5rpx;
  2877. }
  2878. .comments .customer-service .c {
  2879. font-size: 24rpx;
  2880. color: #999;
  2881. line-height: 37.5rpx;
  2882. }
  2883. .goods-attr {
  2884. width: 750rpx;
  2885. height: auto;
  2886. overflow: hidden;
  2887. padding: 0 31.25rpx 25rpx 31.25rpx;
  2888. background: #fff;
  2889. }
  2890. .goods-attr .t {
  2891. width: 687.5rpx;
  2892. height: 104rpx;
  2893. line-height: 104rpx;
  2894. font-size: 38.5rpx;
  2895. }
  2896. .goods-attr .item {
  2897. width: 687.5rpx;
  2898. height: 68rpx;
  2899. padding: 11rpx 20rpx;
  2900. margin-bottom: 11rpx;
  2901. background: #f7f7f7;
  2902. font-size: 38.5rpx;
  2903. }
  2904. .goods-attr .left {
  2905. float: left;
  2906. font-size: 25rpx;
  2907. width: 134rpx;
  2908. height: 45rpx;
  2909. line-height: 45rpx;
  2910. overflow: hidden;
  2911. color: #999;
  2912. }
  2913. .goods-attr .right {
  2914. float: left;
  2915. font-size: 36.5rpx;
  2916. margin-left: 20rpx;
  2917. width: 480rpx;
  2918. height: 45rpx;
  2919. line-height: 45rpx;
  2920. overflow: hidden;
  2921. color: #333;
  2922. }
  2923. .detail {
  2924. width: 750rpx;
  2925. height: auto;
  2926. overflow: hidden;
  2927. /* padding-bottom: 160rpx; */
  2928. }
  2929. .detail image {
  2930. width: 750rpx;
  2931. /* display: block; */
  2932. }
  2933. .common-problem {
  2934. width: 750rpx;
  2935. height: auto;
  2936. overflow: hidden;
  2937. }
  2938. .common-problem .h {
  2939. position: relative;
  2940. height: 145.5rpx;
  2941. width: 750rpx;
  2942. padding: 56.25rpx 0;
  2943. background: #fff;
  2944. text-align: center;
  2945. }
  2946. .common-problem .h .line {
  2947. display: inline-block;
  2948. position: absolute;
  2949. top: 72rpx;
  2950. left: 0;
  2951. z-index: 2;
  2952. height: 1px;
  2953. margin-left: 225rpx;
  2954. width: 300rpx;
  2955. background: #ccc;
  2956. }
  2957. .common-problem .h .title {
  2958. display: inline-block;
  2959. position: absolute;
  2960. top: 56.125rpx;
  2961. left: 0;
  2962. z-index: 3;
  2963. height: 33rpx;
  2964. margin-left: 285rpx;
  2965. width: 180rpx;
  2966. background: #fff;
  2967. }
  2968. .common-problem .b {
  2969. width: 750rpx;
  2970. height: auto;
  2971. overflow: hidden;
  2972. padding: 0rpx 30rpx;
  2973. background: #fff;
  2974. }
  2975. .common-problem .item {
  2976. height: auto;
  2977. overflow: hidden;
  2978. padding-bottom: 25rpx;
  2979. }
  2980. .common-problem .question-box .spot {
  2981. float: left;
  2982. display: block;
  2983. height: 8rpx;
  2984. width: 8rpx;
  2985. background: #b4282d;
  2986. border-radius: 50%;
  2987. margin-top: 11rpx;
  2988. }
  2989. .common-problem .question-box .question {
  2990. float: left;
  2991. line-height: 30rpx;
  2992. padding-left: 8rpx;
  2993. display: block;
  2994. font-size: 26rpx;
  2995. padding-bottom: 15rpx;
  2996. color: #303030;
  2997. }
  2998. .common-problem .answer {
  2999. line-height: 36rpx;
  3000. padding-left: 16rpx;
  3001. font-size: 26rpx;
  3002. color: #787878;
  3003. }
  3004. .related-goods {
  3005. width: 750rpx;
  3006. height: auto;
  3007. overflow: hidden;
  3008. padding-bottom: 80rpx;
  3009. }
  3010. .related-goods .h {
  3011. position: relative;
  3012. height: 145.5rpx;
  3013. width: 750rpx;
  3014. padding: 56.25rpx 0;
  3015. background: #fff;
  3016. text-align: center;
  3017. border-bottom: 1px solid #f4f4f4;
  3018. }
  3019. .related-goods .h .line {
  3020. display: inline-block;
  3021. position: absolute;
  3022. top: 72rpx;
  3023. left: 0;
  3024. z-index: 2;
  3025. height: 1px;
  3026. margin-left: 225rpx;
  3027. width: 300rpx;
  3028. background: #ccc;
  3029. }
  3030. .related-goods .h .title {
  3031. display: inline-block;
  3032. position: absolute;
  3033. top: 56.125rpx;
  3034. left: 0;
  3035. z-index: 3;
  3036. height: 33rpx;
  3037. margin-left: 285rpx;
  3038. width: 180rpx;
  3039. background: #fff;
  3040. }
  3041. .related-goods .b {
  3042. width: 750rpx;
  3043. height: auto;
  3044. overflow: hidden;
  3045. }
  3046. .related-goods .b .item {
  3047. float: left;
  3048. background: #fff;
  3049. width: 375rpx;
  3050. height: auto;
  3051. overflow: hidden;
  3052. text-align: center;
  3053. padding: 15rpx 31.25rpx;
  3054. border-right: 1px solid #f4f4f4;
  3055. border-bottom: 1px solid #f4f4f4;
  3056. }
  3057. .related-goods .item .img {
  3058. width: 311.45rpx;
  3059. height: 311.45rpx;
  3060. }
  3061. .related-goods .item .name {
  3062. display: block;
  3063. width: 311.45rpx;
  3064. height: 35rpx;
  3065. margin: 11.5rpx 0 15rpx 0;
  3066. text-align: center;
  3067. overflow: hidden;
  3068. font-size: 30rpx;
  3069. color: #333;
  3070. }
  3071. .related-goods .item .price {
  3072. display: block;
  3073. width: 311.45rpx;
  3074. height: 30rpx;
  3075. text-align: center;
  3076. font-size: 30rpx;
  3077. color: #b4282d;
  3078. }
  3079. .bottom-btn .l {
  3080. /* flex: 2;
  3081. float: left;
  3082. height: 150rpx;
  3083. width: 162rpx; */
  3084. /* display: flex; */
  3085. }
  3086. .bottom-btn .l.l-collect {
  3087. border-right: none;
  3088. border-left: none;
  3089. text-align: center;
  3090. padding-left: 30rpx;
  3091. /* width: 100rpx; */
  3092. }
  3093. .bottom-btn .l.l-collect .icon {
  3094. font-size: 40rpx;
  3095. }
  3096. .bottom-btn .l.l-collect text {
  3097. /* position: absolute;
  3098. top: 80rpx;
  3099. left: 30rpx;
  3100. font-size: 22rpx; */
  3101. }
  3102. .bottom-btn .l.l-kefu {
  3103. border-right: none;
  3104. border-left: none;
  3105. text-align: center;
  3106. /* width:60rpx; */
  3107. /* position: relative; */
  3108. }
  3109. .contact-block {
  3110. position: relative;
  3111. }
  3112. .bottom-btn .l.l-kefu .icon {
  3113. position: absolute;
  3114. font-size: 44rpx;
  3115. top: 20rpx;
  3116. }
  3117. .bottom-btn .l.l-kefu text {
  3118. /* position: absolute;
  3119. top: 60rpx;
  3120. font-size: 22rpx; */
  3121. }
  3122. .bottom-btn .l.l-cart .box {
  3123. position: relative;
  3124. height: 80rpx;
  3125. width: 70rpx;
  3126. }
  3127. .bottom-btn .l.l-cart .box .txt {
  3128. position: absolute;
  3129. top: 50rpx;
  3130. font-size: 22rpx;
  3131. }
  3132. .bottom-btn .l.l-cart .cart-count {
  3133. height: 28rpx;
  3134. width: 28rpx;
  3135. z-index: 10;
  3136. position: absolute;
  3137. top: 0;
  3138. right: 0;
  3139. background: #b4282d;
  3140. text-align: center;
  3141. font-size: 18rpx;
  3142. color: #fff;
  3143. line-height: 28rpx;
  3144. border-radius: 50%;
  3145. }
  3146. .bottom-btn .l.l-cart .icon {
  3147. position: absolute;
  3148. top: 10rpx;
  3149. left: 0;
  3150. font-size: 44rpx;
  3151. }
  3152. .collect-wrapper,
  3153. .service-wrapper {
  3154. display: flex;
  3155. flex-direction: column;
  3156. justify-content: center;
  3157. flex: 1;
  3158. }
  3159. .collect-text {
  3160. margin: 10rpx 0 0;
  3161. }
  3162. .bottom-btn {
  3163. position: fixed;
  3164. left: 0rpx;
  3165. bottom: 0;
  3166. z-index: 10;
  3167. width: 750rpx;
  3168. min-height: 110rpx;
  3169. background: #fff;
  3170. padding: 12rpx 24rpx 18rpx;
  3171. z-index: 999;
  3172. display: flex;
  3173. /* align-items: center; */
  3174. padding-bottom: constant(safe-area-inset-bottom);
  3175. padding-bottom: env(safe-area-inset-bottom);
  3176. box-shadow: 4rpx -8rpx 16rpx 2rpx rgba(201, 205, 207, 0.25);
  3177. /* box-sizing: content-box; */
  3178. }
  3179. .bottom-btn .contact-block {
  3180. height: 80rpx;
  3181. width: 130rpx;
  3182. position: relative;
  3183. overflow: hidden;
  3184. margin-right: 10rpx;
  3185. }
  3186. .contact-btn {
  3187. height: 80rpx;
  3188. width: 130rpx;
  3189. position: absolute;
  3190. top: 0;
  3191. bottom: 0;
  3192. left: 0;
  3193. z-index: 99;
  3194. opacity: 0;
  3195. }
  3196. .contact-wrapper {
  3197. width: 130rpx;
  3198. height: 80rpx;
  3199. border: 2rpx solid #b3b4b6;
  3200. border-radius: 14rpx;
  3201. /* width: 120rpx; */
  3202. display: flex;
  3203. align-items: center;
  3204. justify-content: center;
  3205. position: absolute;
  3206. top: 0;
  3207. left: 0;
  3208. bottom: 0;
  3209. overflow: hidden;
  3210. padding: 4rpx 0;
  3211. }
  3212. .contact-img {
  3213. width: 24rpx;
  3214. height: 24rpx;
  3215. margin-right: 8rpx;
  3216. /* margin-bottom: 10rpx; */
  3217. }
  3218. .contact-wrapper .text {
  3219. font-size: 28rpx;
  3220. font-weight: bold;
  3221. color: #000;
  3222. height: 40rpx;
  3223. line-height: 40rpx;
  3224. }
  3225. .bottom-btn .share {
  3226. width: 280rpx;
  3227. background: #fff;
  3228. height: 82rpx;
  3229. font-size: 30rpx;
  3230. font-weight: bold;
  3231. color: #09afff;
  3232. text-align: center;
  3233. line-height: 82rpx;
  3234. border: 2rpx solid #09afff;
  3235. border-radius: 82rpx 0rpx 0 82rpx;
  3236. }
  3237. .bottom-btn .c {
  3238. width: 264rpx;
  3239. text-align: center;
  3240. height: 80rpx;
  3241. line-height: 80rpx;
  3242. background: #fe2b54;
  3243. border-radius: 15rpx;
  3244. color: #ffffff;
  3245. font-size: 30rpx;
  3246. }
  3247. .dis-order-wrapper {
  3248. width: 452rpx;
  3249. background: #09afff;
  3250. height: 82rpx;
  3251. font-size: 22rpx;
  3252. color: #fff;
  3253. border-radius: 82rpx;
  3254. text-align: center;
  3255. margin-right: 30rpx;
  3256. display: flex;
  3257. align-items: center;
  3258. overflow: hidden;
  3259. }
  3260. .dis-order-wrapper>view {
  3261. flex: 1;
  3262. text-align: center;
  3263. height: 82rpx;
  3264. }
  3265. .spread-order {
  3266. background: #fff;
  3267. border-radius: 0 82rpx 82rpx 0;
  3268. border: 1rpx solid #09afff;
  3269. border-left: none;
  3270. line-height: 24rpx;
  3271. }
  3272. .buy-type {
  3273. font-size: 30rpx;
  3274. font-weight: bold;
  3275. line-height: 30rpx;
  3276. margin: 10rpx 0 4rpx 0;
  3277. overflow: hidden;
  3278. }
  3279. .bottom-btn .r {
  3280. /*border: 1px solid #f48f18;*/
  3281. background: #09afff;
  3282. float: left;
  3283. height: 100rpx;
  3284. /* line-height: 66rpx; */
  3285. flex: 2;
  3286. text-align: center;
  3287. color: #fff;
  3288. margin-left: 15rpx;
  3289. margin-top: 15rpx;
  3290. margin-bottom: 15rpx;
  3291. border-top-left-radius: 50rpx;
  3292. border-bottom-left-radius: 50rpx;
  3293. }
  3294. .bottom-btn .r .title {
  3295. font-size: 46rpx;
  3296. height: 56rpx;
  3297. color: #fff;
  3298. }
  3299. .bottom-btn .r .subtitle {
  3300. font-size: 28rpx;
  3301. color: #fff;
  3302. font-weight: 100;
  3303. }
  3304. /* */
  3305. .attr-pop-box {
  3306. width: 100%;
  3307. height: 100%;
  3308. position: fixed;
  3309. background: rgba(0, 0, 0, 0.5);
  3310. z-index: 8;
  3311. bottom: 0;
  3312. /* display: none; */
  3313. }
  3314. .attr-pop {
  3315. width: 100%;
  3316. height: auto;
  3317. max-height: 780rpx;
  3318. padding: 31.25rpx;
  3319. background: #fff;
  3320. position: fixed;
  3321. z-index: 9;
  3322. bottom: 100rpx;
  3323. }
  3324. .attr-pop .close {
  3325. position: absolute;
  3326. width: 48rpx;
  3327. height: 48rpx;
  3328. right: 31.25rpx;
  3329. overflow: hidden;
  3330. top: 31.25rpx;
  3331. }
  3332. .attr-pop .close .icon {
  3333. width: 48rpx;
  3334. height: 48rpx;
  3335. }
  3336. .attr-pop .img-info {
  3337. width: 687.5rpx;
  3338. height: 177rpx;
  3339. overflow: hidden;
  3340. margin-bottom: 41.5rpx;
  3341. }
  3342. .attr-pop .img {
  3343. float: left;
  3344. height: 177rpx;
  3345. width: 177rpx;
  3346. background: #f4f4f4;
  3347. margin-right: 31.25rpx;
  3348. }
  3349. .attr-pop .info {
  3350. float: left;
  3351. height: 177rpx;
  3352. display: flex;
  3353. align-items: center;
  3354. }
  3355. .attr-pop .p {
  3356. font-size: 33rpx;
  3357. color: #333;
  3358. height: 33rpx;
  3359. line-height: 33rpx;
  3360. margin-bottom: 10rpx;
  3361. }
  3362. .attr-pop .a {
  3363. font-size: 29rpx;
  3364. color: #333;
  3365. height: 40rpx;
  3366. line-height: 40rpx;
  3367. }
  3368. .spec-con {
  3369. width: 100%;
  3370. height: auto;
  3371. overflow: hidden;
  3372. }
  3373. .spec-con .name {
  3374. margin-bottom: 6rpx;
  3375. font-size: 29rpx;
  3376. color: #333;
  3377. }
  3378. .spec-con .values {
  3379. height: auto;
  3380. margin-bottom: 10rpx;
  3381. font-size: 0;
  3382. }
  3383. .spec-con .value {
  3384. display: inline-block;
  3385. height: 62rpx;
  3386. padding: 0 35rpx;
  3387. line-height: 56rpx;
  3388. text-align: center;
  3389. margin-right: 25rpx;
  3390. margin-bottom: 16.5rpx;
  3391. border: 1px solid #333;
  3392. font-size: 25rpx;
  3393. color: #333;
  3394. }
  3395. .spec-con .value.disable {
  3396. border: 1px solid #ccc;
  3397. color: #ccc;
  3398. }
  3399. .spec-con .value.selected {
  3400. border: 1px solid #b4282d;
  3401. color: #b4282d;
  3402. }
  3403. .number-item .selnum {
  3404. width: 200rpx;
  3405. /* width: 322rpx; */
  3406. height: 71rpx;
  3407. border: 1px solid #ccc;
  3408. display: flex;
  3409. }
  3410. .number-item .cut {
  3411. width: 93.75rpx;
  3412. height: 100%;
  3413. text-align: center;
  3414. line-height: 65rpx;
  3415. }
  3416. .number-item .number {
  3417. flex: 1;
  3418. height: 100%;
  3419. text-align: center;
  3420. line-height: 68.75rpx;
  3421. border-left: 1px solid #ccc;
  3422. border-right: 1px solid #ccc;
  3423. float: left;
  3424. }
  3425. .number-item .add {
  3426. width: 93.75rpx;
  3427. height: 100%;
  3428. text-align: center;
  3429. line-height: 65rpx;
  3430. }
  3431. .contact {
  3432. height: 100rpx;
  3433. width: 100rpx;
  3434. border-radius: 100%;
  3435. position: fixed;
  3436. bottom: 96rpx;
  3437. right: 10rpx;
  3438. font-size: 20rpx;
  3439. box-sizing: border-box;
  3440. /* background: url('../../static/images/customer.png') no-repeat center 21rpx; */
  3441. background-size: 55rpx auto;
  3442. }
  3443. .share-pop-box {
  3444. width: 100%;
  3445. height: 100%;
  3446. position: fixed;
  3447. background: rgba(0, 0, 0, 0.5);
  3448. z-index: 8;
  3449. bottom: 0;
  3450. /* display: none; */
  3451. }
  3452. .share-pop {
  3453. width: 100%;
  3454. height: auto;
  3455. max-height: 780rpx;
  3456. padding: 31.25rpx;
  3457. background: #fff;
  3458. position: fixed;
  3459. z-index: 9;
  3460. bottom: 100rpx;
  3461. }
  3462. .share-pop .close {
  3463. position: absolute;
  3464. width: 48rpx;
  3465. height: 48rpx;
  3466. right: 31.25rpx;
  3467. top: 31.25rpx;
  3468. }
  3469. .share-pop .close .icon {
  3470. width: 48rpx;
  3471. height: 48rpx;
  3472. }
  3473. .share-pop .share-info {
  3474. width: 100%;
  3475. height: 225rpx;
  3476. overflow: hidden;
  3477. margin-bottom: 41.5rpx;
  3478. }
  3479. .sharebtn {
  3480. top: 75rpx;
  3481. background: none !important;
  3482. font-size: 32rpx;
  3483. color: #fff !important;
  3484. border-radius: 0%;
  3485. width: 175rpx;
  3486. height: 150rpx;
  3487. text-align: center;
  3488. display: flex;
  3489. justify-content: center;
  3490. align-items: center;
  3491. flex-wrap: wrap;
  3492. float: left;
  3493. background: #fff;
  3494. border-bottom: 0px solid #fafafa;
  3495. margin-left: 15%;
  3496. }
  3497. .sharebtn::after {
  3498. border: none;
  3499. border-radius: 0%;
  3500. }
  3501. .savesharebtn {
  3502. top: 75rpx;
  3503. background: none !important;
  3504. font-size: 32rpx;
  3505. color: #fff !important;
  3506. border-radius: 0%;
  3507. width: 175rpx;
  3508. height: 150rpx;
  3509. text-align: center;
  3510. display: flex;
  3511. justify-content: center;
  3512. align-items: center;
  3513. flex-wrap: wrap;
  3514. float: right;
  3515. background: #fff;
  3516. border-bottom: 0px solid #fafafa;
  3517. margin-right: 15%;
  3518. }
  3519. .savesharebtn::after {
  3520. border: none;
  3521. border-radius: 0%;
  3522. }
  3523. .sharebtn_image {
  3524. /* border: 1px solid #757575; */
  3525. width: 128rpx;
  3526. height: 128rpx;
  3527. margin-top: 0rpx;
  3528. }
  3529. .sharebtn_text {
  3530. /* border: 1px solid #757575; */
  3531. width: 150rpx;
  3532. margin-bottom: 2rpx;
  3533. height: 20rpx;
  3534. line-height: 20rpx;
  3535. font-size: 20rpx;
  3536. color: #555;
  3537. }
  3538. .separate {
  3539. background: #e0e3da;
  3540. width: 100%;
  3541. height: 6rpx;
  3542. }
  3543. /* 新客角标 */
  3544. .isNew {
  3545. position: absolute;
  3546. width: 80rpx;
  3547. height: 120rpx;
  3548. right: 30rpx;
  3549. z-index: 999;
  3550. }
  3551. /* 自购/推广弹框 */
  3552. .overlay-wrapper {
  3553. display: flex;
  3554. align-items: center;
  3555. justify-content: center;
  3556. height: 100%;
  3557. }
  3558. .tips-wrapper {
  3559. width: 588rpx;
  3560. height: 462rpx;
  3561. border-radius: 10rpx;
  3562. background: #fff;
  3563. font-size: 26rpx;
  3564. display: flex;
  3565. flex-direction: column;
  3566. justify-content: space-between;
  3567. }
  3568. .tips-top {
  3569. display: flex;
  3570. flex-direction: column;
  3571. align-items: center;
  3572. padding: 0 40rpx;
  3573. }
  3574. .tips-title {
  3575. font-size: 34rpx;
  3576. font-weight: bold;
  3577. margin: 66rpx 0 24rpx;
  3578. }
  3579. .tips-bottom {
  3580. height: 132rpx;
  3581. border-top: 2rpx solid #e4e4e4;
  3582. display: flex;
  3583. justify-content: space-around;
  3584. align-items: center;
  3585. }
  3586. .tips-bottom .btn-devide {
  3587. width: 2rpx;
  3588. height: 130rpx;
  3589. background: #e4e4e4;
  3590. }
  3591. .cancel-btn {
  3592. width: 202rpx;
  3593. height: 72rpx;
  3594. line-height: 72rpx;
  3595. border: 2rpx solid #85868a;
  3596. color: #282728;
  3597. border-radius: 72rpx;
  3598. text-align: center;
  3599. overflow: hidden;
  3600. }
  3601. .repay-btn {
  3602. width: 202rpx;
  3603. height: 72rpx;
  3604. line-height: 72rpx;
  3605. background: #09afff;
  3606. color: #fff;
  3607. border-radius: 72rpx;
  3608. text-align: center;
  3609. }
  3610. .notip-again {
  3611. padding-left: 40rpx;
  3612. display: flex;
  3613. align-items: center;
  3614. }
  3615. .user-agree {
  3616. /* color:#85868A; */
  3617. font-size: 26rpx;
  3618. margin-left: 8rpx;
  3619. }
  3620. /* 海报的样式 */
  3621. .poster {
  3622. position: absolute;
  3623. top: 20rpx;
  3624. z-index: 99;
  3625. text-align: center;
  3626. left: 0;
  3627. bottom: 0;
  3628. right: 0;
  3629. }
  3630. .title {
  3631. color: #fff;
  3632. margin: 20rpx 0;
  3633. font-size: 30rpx;
  3634. display: flex;
  3635. justify-content: center;
  3636. text-align: left;
  3637. }
  3638. .title text {
  3639. width: 480rpx;
  3640. }
  3641. .ads {
  3642. color: #fff;
  3643. text-align: left;
  3644. margin: 20rpx auto;
  3645. display: flex;
  3646. justify-content: center;
  3647. }
  3648. .tool {
  3649. display: flex;
  3650. text-align: center;
  3651. justify-content: baseline;
  3652. width: 100%;
  3653. margin-top: 20rpx;
  3654. }
  3655. .tool view {
  3656. flex: 1;
  3657. }
  3658. .img {
  3659. width: 107rpx;
  3660. height: 128rpx;
  3661. }
  3662. .closeImg {
  3663. width: 57rpx;
  3664. height: 57rpx;
  3665. }
  3666. .share-btn {
  3667. background-color: transparent;
  3668. flex: 1;
  3669. }
  3670. .share-btn::after {
  3671. border: none;
  3672. }
  3673. /* 商品价格 销量 */
  3674. .goods-info-new {
  3675. margin-top: -8rpx;
  3676. border-radius: 20rpx 20rpx 0 0;
  3677. background: #f3f3f3;
  3678. width: 750rpx;
  3679. /* height:138rpx; */
  3680. padding: 30rpx 24rpx 26rpx;
  3681. position: relative;
  3682. z-index: 99;
  3683. box-sizing: border-box;
  3684. }
  3685. .price-line {
  3686. height: 38rpx;
  3687. display: flex;
  3688. align-items: flex-end;
  3689. }
  3690. .price-line .real-price {
  3691. color: #fe2b54;
  3692. font-size: 24rpx;
  3693. }
  3694. .price-line .real-price text.bold-price {
  3695. font-size: 40rpx;
  3696. font-weight: bold;
  3697. height: 30rpx;
  3698. line-height: 30rpx;
  3699. }
  3700. .price-line .sale-price {
  3701. color: #999999;
  3702. font-size: 24rpx;
  3703. flex: 1;
  3704. margin-left: 8rpx;
  3705. text-decoration: line-through;
  3706. }
  3707. .price-line .sale-num {
  3708. color: #acadb1;
  3709. font-size: 24rpx;
  3710. }
  3711. .goods-coupon {
  3712. display: flex;
  3713. flex-wrap: wrap;
  3714. margin-top: 20rpx;
  3715. }
  3716. .goods-coupon .goupon-tag {
  3717. height: 30rpx;
  3718. line-height: 30rpx;
  3719. background: rgba(254, 43, 84, 0.1);
  3720. /* opacity: 0.9; */
  3721. border-radius: 5px;
  3722. padding: 0 10rpx;
  3723. margin-right: 10rpx;
  3724. color: #fe2b54;
  3725. font-size: 20rpx;
  3726. }
  3727. /* 服务 须知 门店 */
  3728. .other-info {
  3729. padding: 30rpx 24rpx 16rpx;
  3730. background: #fff;
  3731. border-radius: 24rpx;
  3732. width: 702rpx;
  3733. margin: 0 24rpx;
  3734. }
  3735. .other-info .name {
  3736. color: #000000;
  3737. font-size: 36rpx;
  3738. line-height: 36rpx;
  3739. font-weight: bold;
  3740. padding-bottom: 12rpx;
  3741. }
  3742. .other-info .common-info {
  3743. line-height: 36rpx;
  3744. display: flex;
  3745. /* min-height: 52rpx; */
  3746. /* align-items: center; */
  3747. margin-top: 14rpx;
  3748. }
  3749. .common-info .info-title {
  3750. font-size: 24rpx;
  3751. color: #666;
  3752. margin-right: 26rpx;
  3753. }
  3754. .common-info .info-content {
  3755. font-size: 24rpx;
  3756. color: #000;
  3757. flex: 1;
  3758. }
  3759. .common-info image {
  3760. width: 10rpx;
  3761. height: 20rpx;
  3762. }
  3763. /* 加购数量 */
  3764. .num-module {
  3765. width: 702rpx;
  3766. /* height: 174rpx; */
  3767. background: #ffffff;
  3768. border-radius: 24rpx;
  3769. margin: 14rpx 24rpx 28rpx;
  3770. padding: 32rpx 24rpx;
  3771. }
  3772. .plus-buy {
  3773. height: 30rpx;
  3774. margin: 0 0 28rpx;
  3775. display: flex;
  3776. align-items: center;
  3777. }
  3778. .num-module .title {
  3779. color: #666;
  3780. font-size: 30rpx;
  3781. /* margin-right:20rpx; */
  3782. width: 80rpx;
  3783. }
  3784. .plus-buy .plus-name {
  3785. font-size: 30rpx;
  3786. color: #010101;
  3787. }
  3788. .plus-buy .plus-name text {
  3789. color: #fe2b54;
  3790. font-weight: bold;
  3791. }
  3792. .plus-num {
  3793. display: flex;
  3794. justify-content: space-between;
  3795. height: 72rpx;
  3796. align-items: center;
  3797. }
  3798. .calc-counter {
  3799. height: 72rpx;
  3800. border-radius: 72rpx;
  3801. display: flex;
  3802. align-items: center;
  3803. border: 2rpx solid #d2d2d2;
  3804. box-sizing: border-box;
  3805. overflow: hidden;
  3806. line-height: 72rpx;
  3807. }
  3808. .calc-counter .minus-btn.disable,
  3809. .calc-counter .plus-btn.disable {
  3810. color: #d2d2d2;
  3811. }
  3812. .calc-counter .plus-btn,
  3813. .calc-counter .minus-btn {
  3814. width: 82rpx;
  3815. text-align: center;
  3816. color: #666;
  3817. line-height: 72rpx;
  3818. font-weight: bold;
  3819. padding-bottom: 4rpx;
  3820. font-size: 36rpx;
  3821. }
  3822. .calc-counter .num-input {
  3823. color: #010101;
  3824. font-size: 30rpx;
  3825. border-left: 2rpx solid #d2d2d2;
  3826. border-right: 2rpx solid #d2d2d2;
  3827. width: 72rpx;
  3828. text-align: center;
  3829. height: 72rpx;
  3830. }
  3831. /* 选择规格 */
  3832. .sku-wrapper {
  3833. width: 702rpx;
  3834. background: #ffffff;
  3835. border-radius: 24rpx;
  3836. margin: 16rpx 24rpx 0;
  3837. padding-bottom: 30rpx;
  3838. overflow: hidden;
  3839. }
  3840. .sku-info {
  3841. height: 90rpx;
  3842. position: relative;
  3843. }
  3844. .sku-left {
  3845. width: 700rpx;
  3846. overflow: hidden;
  3847. line-height: 90rpx;
  3848. padding-left: 24rpx;
  3849. display: flex;
  3850. align-items: center;
  3851. height: 90rpx;
  3852. }
  3853. .sku-left view {
  3854. color: #666;
  3855. font-size: 30rpx;
  3856. }
  3857. .sku-left view.current-sku {
  3858. color: #010101;
  3859. margin-left: 18rpx;
  3860. }
  3861. .sku-right {
  3862. position: absolute;
  3863. right: 0;
  3864. top: 0;
  3865. bottom: 0;
  3866. height: 90rpx;
  3867. display: flex;
  3868. align-items: center;
  3869. padding-right: 24rpx;
  3870. width: 120rpx;
  3871. background: linear-gradient(to right, rgba(255, 255, 255, 0.3), #fff 60%);
  3872. /* background:url("https://jzmall.lifejingzhi.com/file/jzmall/weixin/sku-bg.png") no-repeat center;
  3873. background-size: 100% 100%; */
  3874. z-index: 99;
  3875. justify-content: flex-end;
  3876. }
  3877. .sku-right image {
  3878. width: 10rpx;
  3879. height: 20rpx;
  3880. }
  3881. .all-sku {
  3882. display: flex;
  3883. flex-wrap: wrap;
  3884. padding: 0 30rpx 0 98rpx;
  3885. }
  3886. .all-sku .sku-thumb {
  3887. width: 70rpx;
  3888. height: 70rpx;
  3889. border-radius: 10rpx;
  3890. margin-right: 14rpx;
  3891. }
  3892. .all-sku view {
  3893. font-size: 24rpx;
  3894. color: #666;
  3895. line-height: 70rpx;
  3896. margin-left: 24rpx;
  3897. }
  3898. /* 团购评价 */
  3899. .group-evaluation {
  3900. width: 702rpx;
  3901. background: #ffffff;
  3902. border: 1rpx solid #f5f5f5;
  3903. border-radius: 25rpx;
  3904. padding: 30rpx 24rpx 0;
  3905. margin: 16rpx 24rpx;
  3906. }
  3907. .group-evaluation .title {
  3908. height: 40rpx;
  3909. line-height: 40rpx;
  3910. display: flex;
  3911. justify-content: space-between;
  3912. align-items: center;
  3913. }
  3914. .group-evaluation .title .left {
  3915. font-size: 32rpx;
  3916. line-height: 40rpx;
  3917. color: #000;
  3918. font-weight: bold;
  3919. flex: 1;
  3920. }
  3921. .group-evaluation .title .right {
  3922. color: #666;
  3923. font-size: 28rpx;
  3924. display: flex;
  3925. align-items: center;
  3926. justify-content: space-between;
  3927. }
  3928. .group-evaluation .arrow-img {
  3929. width: 12rpx;
  3930. height: 20rpx;
  3931. margin-left: 6rpx;
  3932. }
  3933. .evaluation-item {
  3934. padding: 30rpx 8rpx 30rpx 0;
  3935. padding-right: 8rpx;
  3936. border-bottom: 1rpx solid #f3f3f3;
  3937. display: flex;
  3938. align-items: center;
  3939. justify-content: space-between;
  3940. }
  3941. .evaluation-item:last-child {
  3942. border: none;
  3943. }
  3944. .evaluation-item .item-left {
  3945. width: 510rpx;
  3946. }
  3947. .eval-top {
  3948. display: flex;
  3949. height: 44rpx;
  3950. align-items: center;
  3951. }
  3952. .eval-top .avatar {
  3953. width: 44rpx;
  3954. height: 44rpx;
  3955. border-radius: 44rpx;
  3956. }
  3957. .eval-top .name {
  3958. margin: 0 10rpx;
  3959. font-size: 28rpx;
  3960. color: #000;
  3961. }
  3962. .eval-top .tag {
  3963. height: 38rpx;
  3964. line-height: 38rpx;
  3965. background: rgba(1, 187, 243, 0.1);
  3966. border-radius: 10rpx;
  3967. color: #01bbf3;
  3968. font-size: 24rpx;
  3969. padding: 0 12rpx;
  3970. margin-right: 10rpx;
  3971. }
  3972. .eval-top .hp {
  3973. height: 38rpx;
  3974. line-height: 38rpx;
  3975. background: rgba(255, 71, 71, 0.1);
  3976. border-radius: 10rpx;
  3977. color: #ff5252;
  3978. font-size: 24rpx;
  3979. padding: 0 12rpx;
  3980. }
  3981. .eval-content {
  3982. display: -webkit-box;
  3983. -webkit-box-orient: vertical;
  3984. -webkit-line-clamp: 2;
  3985. text-overflow: ellipsis;
  3986. overflow: hidden;
  3987. line-height: 36rpx;
  3988. margin-top: 8rpx;
  3989. font-size: 26rpx;
  3990. color: #333;
  3991. }
  3992. .evaluation-item .item-right {
  3993. width: 100rpx;
  3994. height: 100rpx;
  3995. }
  3996. .evaluation-item .item-right image {
  3997. width: 100rpx;
  3998. height: 100rpx;
  3999. border-radius: 10rpx;
  4000. }
  4001. /* 产品推荐 */
  4002. .recommend-title {
  4003. height: 103rpx;
  4004. line-height: 102rpx;
  4005. text-align: center;
  4006. color: #000000;
  4007. font-size: 33rpx;
  4008. /* margin-top:-20rpx; */
  4009. }
  4010. .recommend-list {
  4011. display: flex;
  4012. justify-content: space-between;
  4013. flex-wrap: wrap;
  4014. width: 702rpx;
  4015. margin: 0 24rpx;
  4016. }
  4017. .recommend-item {
  4018. width: 334rpx;
  4019. height: 510rpx;
  4020. background: #ffffff;
  4021. border-radius: 20rpx;
  4022. display: flex;
  4023. flex-direction: column;
  4024. margin: 0 0 20rpx;
  4025. }
  4026. .recommend-item image {
  4027. width: 334rpx;
  4028. height: 334rpx;
  4029. margin-bottom: 20rpx;
  4030. border-radius: 20rpx;
  4031. }
  4032. .recommend-goods-name {
  4033. font-size: 26rpx;
  4034. line-height: 40rpx;
  4035. height: 80rpx;
  4036. width: 294rpx;
  4037. display: -webkit-box;
  4038. -webkit-box-orient: vertical;
  4039. -webkit-line-clamp: 2;
  4040. text-overflow: ellipsis;
  4041. overflow: hidden;
  4042. margin: 0 20rpx;
  4043. /* text-indent: -12rpx; */
  4044. color: #333;
  4045. }
  4046. .recommend-goods-price {
  4047. color: #fe2957;
  4048. font-size: 28rpx;
  4049. margin: 10rpx 20rpx 0;
  4050. height: 56rpx;
  4051. }
  4052. .recommend-goods-price text {
  4053. font-size: 36rpx;
  4054. }
  4055. /* 购买提醒 */
  4056. .buy-toast {
  4057. height: 44rpx;
  4058. min-width: 284rpx;
  4059. position: absolute;
  4060. top: 410rpx;
  4061. left: 24rpx;
  4062. background: rgba(0, 0, 0, 0.5);
  4063. border-radius: 45rpx;
  4064. }
  4065. .toast-swiper {
  4066. height: 44rpx;
  4067. width: 320rpx;
  4068. }
  4069. .toast-item {
  4070. align-items: center;
  4071. display: flex;
  4072. height: 44rpx;
  4073. padding: 0 14rpx 0 10rpx;
  4074. }
  4075. .toast-item image {
  4076. width: 28rpx;
  4077. height: 28rpx;
  4078. border-radius: 28rpx;
  4079. margin-right: 8rpx;
  4080. }
  4081. .toast-item view {
  4082. font-size: 24rpx;
  4083. color: #fff;
  4084. white-space: nowrap;
  4085. }
  4086. /* 规格弹框 */
  4087. .appoint-overlay-wrapper {
  4088. position: fixed;
  4089. top: 0;
  4090. left: 0;
  4091. width: 100%;
  4092. height: 100%;
  4093. background-color: rgba(0, 0, 0, 0.7);
  4094. z-index: 9999;
  4095. display: flex;
  4096. align-items: flex-end;
  4097. }
  4098. .spu-popup {
  4099. /* height: 784rpx; */
  4100. width: 690rpx;
  4101. background: #fff;
  4102. padding: 40rpx 20rpx;
  4103. border-radius: 20rpx 20rpx 0 0;
  4104. margin: 0 30rpx;
  4105. }
  4106. .popup-good {
  4107. height: 130rpx;
  4108. display: flex;
  4109. padding: 0 0 30rpx 0;
  4110. border-bottom: 1rpx solid #eee;
  4111. justify-content: space-between;
  4112. }
  4113. .popup-good .left {
  4114. display: flex;
  4115. align-items: flex-end;
  4116. }
  4117. .popup-good .left image {
  4118. width: 100rpx;
  4119. height: 100rpx;
  4120. border-radius: 10rpx;
  4121. }
  4122. .popup-good .spu-price {
  4123. color: #ff1643;
  4124. font-size: 34rpx;
  4125. font-weight: bold;
  4126. margin: 0 14rpx 0 20rpx;
  4127. line-height: 30rpx;
  4128. }
  4129. .popup-good .spu-price text {
  4130. font-size: 48rpx;
  4131. }
  4132. .popup-good .spu-price-old {
  4133. text-decoration: line-through;
  4134. color: #999999;
  4135. font-size: 24rpx;
  4136. }
  4137. .sku-close {
  4138. width: 48rpx;
  4139. height: 48rpx;
  4140. }
  4141. .sku-list-block {
  4142. min-height: 420rpx;
  4143. padding-bottom: 40rpx;
  4144. }
  4145. .sku-list-block .spu-title {
  4146. height: 86rpx;
  4147. line-height: 86rpx;
  4148. font-weight: bold;
  4149. font-size: 28rpx;
  4150. }
  4151. .sku-list-block .sku-item {
  4152. margin-bottom: 12rpx;
  4153. display: flex;
  4154. background: rgb(250, 250, 250);
  4155. border-radius: 8rpx;
  4156. align-items: center;
  4157. justify-content: space-between;
  4158. height: 140rpx;
  4159. padding: 0 40rpx;
  4160. }
  4161. .sku-list-block .sku-item view {
  4162. font-size: 30rpx;
  4163. color: #333;
  4164. }
  4165. .sku-list-block .sku-item view.sku-price {
  4166. color: rgb(233, 86, 81);
  4167. font-weight: bold;
  4168. font-size: 32rpx;
  4169. }
  4170. .sku-list-block .sku-item.active-sku {
  4171. color: #00c0ff;
  4172. background: rgb(255, 249, 247);
  4173. border: 1rpx solid #fe2b54;
  4174. }
  4175. .sku-list-block .sku-item.active-sku view {
  4176. color: #fe2b54;
  4177. }
  4178. .sku-btn {
  4179. width: 638rpx;
  4180. height: 90rpx;
  4181. border-radius: 12rpx;
  4182. line-height: 90rpx;
  4183. text-align: center;
  4184. color: #ffff;
  4185. /* background: #00B9FF; */
  4186. background: rgb(231, 71, 93);
  4187. font-size: 32rpx;
  4188. margin: 20rpx 6rpx 0;
  4189. /* font-weight: bold; */
  4190. }
  4191. .final-price {
  4192. flex: 1;
  4193. display: flex;
  4194. align-items: center;
  4195. height: 80rpx;
  4196. margin-left: 12rpx;
  4197. }
  4198. .final-price .total-new {
  4199. color: #ff1643;
  4200. font-size: 32rpx;
  4201. }
  4202. .final-price .total-new text {
  4203. font-size: 46rpx;
  4204. font-weight: bold;
  4205. }
  4206. .final-price .total-old {
  4207. text-decoration: line-through;
  4208. font-size: 24rpx;
  4209. color: #999;
  4210. margin-left: 12rpx;
  4211. padding-top: 10rpx;
  4212. }
  4213. /* 关联工单 */
  4214. .service-list {
  4215. margin: 0 24rpx;
  4216. }
  4217. .service-item {
  4218. margin-top: 24rpx;
  4219. background: #ffffff;
  4220. border-radius: 24rpx;
  4221. width: 702rpx;
  4222. padding: 0 24rpx;
  4223. }
  4224. .order-title {
  4225. height: 100rpx;
  4226. line-height: 100rpx;
  4227. font-weight: bold;
  4228. color: #000;
  4229. font-size: 32rpx;
  4230. border-bottom: 2rpx solid #e0e0e0;
  4231. }
  4232. .service-item .service-title {
  4233. height: 80rpx;
  4234. display: flex;
  4235. align-items: center;
  4236. border-bottom: 2rpx solid #e0e0e0;
  4237. }
  4238. .service-title .sercive-name {
  4239. color: #191919;
  4240. font-size: 30rpx;
  4241. font-weight: bold;
  4242. }
  4243. .service-title .service-id {
  4244. color: #666666;
  4245. font-size: 24rpx;
  4246. margin: 0 12rpx 0 0;
  4247. flex: 1;
  4248. }
  4249. .service-title .service-status {
  4250. color: #008dff;
  4251. font-size: 26rpx;
  4252. }
  4253. .service-main {
  4254. padding: 12rpx 0 16rpx;
  4255. }
  4256. .customer-info {
  4257. display: flex;
  4258. align-items: center;
  4259. }
  4260. .customer-info image {
  4261. width: 48rpx;
  4262. height: 48rpx;
  4263. margin-right: 24rpx;
  4264. }
  4265. .customer-info .customer-main {
  4266. display: flex;
  4267. padding: 18rpx 0 4rpx;
  4268. flex-direction: column;
  4269. flex: 1;
  4270. }
  4271. .main-line {
  4272. display: flex;
  4273. height: 44rpx;
  4274. margin-bottom: 4rpx;
  4275. align-items: center;
  4276. }
  4277. .main-line view {
  4278. color: #333333;
  4279. font-size: 32rpx;
  4280. }
  4281. .main-line view.phone {
  4282. color: #999999;
  4283. font-size: 24rpx;
  4284. margin-left: 14rpx;
  4285. }
  4286. .customer-info .customer-address {
  4287. color: #666666;
  4288. line-height: 40rpx;
  4289. }
  4290. .service-main .row {
  4291. /* height: 56rpx;
  4292. line-height: 56rpx; */
  4293. display: flex;
  4294. color: rgba(0, 0, 0, 0.9);
  4295. font-size: 26rpx;
  4296. font-weight: bold;
  4297. align-items: center;
  4298. margin: 10rpx 0;
  4299. }
  4300. .service-main .row text {
  4301. color: #666666;
  4302. font-weight: normal;
  4303. /* white-space: nowrap; */
  4304. }
  4305. .service-remark-wrapper {
  4306. padding: 24rpx 0;
  4307. border-top: 2rpx solid #e0e0e0;
  4308. }
  4309. .service-store {
  4310. height: 36rpx;
  4311. display: flex;
  4312. align-items: center;
  4313. justify-content: space-between;
  4314. }
  4315. .service-store>view {
  4316. display: flex;
  4317. height: 36rpx;
  4318. align-items: center;
  4319. }
  4320. .store-left image {
  4321. width: 36rpx;
  4322. height: 36rpx;
  4323. margin-right: 16rpx;
  4324. }
  4325. .store-left view {
  4326. color: rgba(0, 0, 0, 0.9);
  4327. font-size: 26rpx;
  4328. font-weight: bold;
  4329. }
  4330. .store-right view {
  4331. color: #666666;
  4332. font-size: 24rpx;
  4333. }
  4334. .store-right image {
  4335. width: 24rpx;
  4336. height: 24rpx;
  4337. margin-left: 16rpx;
  4338. }
  4339. .service-remark-wrapper .service-remark {
  4340. width: 652rpx;
  4341. /* height: 56rpx; */
  4342. line-height: 44rpx;
  4343. background: #ebebeb;
  4344. border-radius: 16rpx;
  4345. color: #000000;
  4346. padding: 8rpx 16rpx;
  4347. /* white-space: nowrap;
  4348. text-overflow: ellipsis;*/
  4349. display: -webkit-box;
  4350. -webkit-box-orient: vertical;
  4351. -webkit-line-clamp: 2;
  4352. text-overflow: ellipsis;
  4353. overflow: hidden;
  4354. margin-top: 20rpx;
  4355. }
  4356. .service-remark text {
  4357. color: #fe2b54;
  4358. font-weight: bold;
  4359. }
  4360. .service-operate {
  4361. padding: 24rpx 0;
  4362. border-top: 2rpx solid #e0e0e0;
  4363. display: flex;
  4364. justify-content: flex-end;
  4365. }
  4366. .service-operate view {
  4367. width: 160rpx;
  4368. height: 56rpx;
  4369. line-height: 56rpx;
  4370. border-radius: 28rpx;
  4371. text-align: center;
  4372. color: #f9f4f5;
  4373. font-size: 24rpx;
  4374. background: linear-gradient(90deg, #00baff 0%, #008dff 100%);
  4375. margin-left: 28rpx;
  4376. }
  4377. .sku-popup-title {
  4378. font-weight: bold;
  4379. font-size: 32rpx;
  4380. color: #333;
  4381. padding-left: 20rpx;
  4382. }
  4383. .sku-popup-tips {
  4384. color: #888;
  4385. font-size: 24rpx;
  4386. padding: 10rpx 0 32rpx 20rpx;
  4387. border-bottom: 1rpx solid #eee;
  4388. margin-bottom: 32rpx;
  4389. }
  4390. .xinke{
  4391. position: absolute;
  4392. background-color: #DB1A1A;
  4393. margin-left: 505rpx;
  4394. margin-top: -102rpx;
  4395. width: 110rpx;
  4396. height: 38rpx;
  4397. float: right;
  4398. line-height: 40rpx;
  4399. text-align: center;
  4400. color: white;
  4401. border-bottom-left-radius: 20rpx;
  4402. font-size:22rpx;
  4403. border-top-right-radius: 14rpx;
  4404. }
  4405. </style>