goods.vue 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875
  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. };
  1551. uni.showLoading({
  1552. title: '加载中'
  1553. });
  1554. console.info(callbackData);
  1555. uni.createOrder({
  1556. tenantId: res.data.tenantId,
  1557. skuList: res.data.skuList,
  1558. payment: res.data.payment,
  1559. callbackData: callbackData,
  1560. callbackUrl: res.data.callbackUrl,
  1561. success: (res) => {
  1562. util.addLog(1, 3, 15, {
  1563. goodsId: that.goods.id,
  1564. productId: that.checkedSku.id
  1565. });
  1566. uni.hideLoading();
  1567. console.log('预下单成功11');
  1568. console.log(res);
  1569. const {
  1570. orderId,
  1571. outOrderNo
  1572. } = res;
  1573. console.log('success res', res, 'orderId', orderId, 'outOrderNo',
  1574. outOrderNo);
  1575. //如果是静默状态未登录 开始授权登录
  1576. if (!app.globalData.hasLogin) {
  1577. user.getLoginInfo(outOrderNo).then((resUser) => {
  1578. if (resUser.errno == 0) {
  1579. app.globalData.hasLogin = true;
  1580. app.globalData.userInfo = resUser.data.userInfo;
  1581. uni.setStorageSync('userInfo', resUser.data
  1582. .userInfo);
  1583. uni.setStorageSync('token', resUser.data.token);
  1584. }
  1585. });
  1586. }
  1587. if (goNewPage) {
  1588. uni.redirectTo({
  1589. url: '/pages/checkout/payResult/payResultNew?status=1&outOrderNo=' +
  1590. outOrderNo + '&actualPrice=' + that.actualPrice +
  1591. '&goodsId=' + that.id + '&productId=' + that
  1592. .checkedSku.id
  1593. });
  1594. } else {
  1595. uni.redirectTo({
  1596. url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' +
  1597. outOrderNo + '&actualPrice=' + that.actualPrice +
  1598. '&goodsId=' + that.id
  1599. });
  1600. }
  1601. },
  1602. fail: (res) => {
  1603. util.addLog(1, 3, 14, {
  1604. goodsId: that.goods.id,
  1605. productId: that.checkedSku.id
  1606. });
  1607. uni.hideLoading();
  1608. console.log('预下单失败11');
  1609. console.log(res);
  1610. const {
  1611. orderId,
  1612. outOrderNo,
  1613. errNo,
  1614. errMsg,
  1615. errLogId
  1616. } = res;
  1617. if (errLogId) {
  1618. console.log('预下单失败', errNo, errMsg, errLogId);
  1619. let tomsg = errMsg;
  1620. if (tomsg.indexOf('createOrder') != -1) {
  1621. tomsg = tomsg.replace('createOrder:fail 开发者限购:', '');
  1622. tomsg = tomsg.replace('createOrder:fail 开发者拒绝交易:', '');
  1623. tomsg = tomsg.replace('createOrder:fail', '');
  1624. }
  1625. uni.showModal({
  1626. title: '提示',
  1627. content: tomsg,
  1628. showCancel: false
  1629. });
  1630. }
  1631. if (orderId || outOrderNo) {
  1632. uni.navigateTo({
  1633. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' +
  1634. outOrderNo
  1635. });
  1636. console.log('支付失败', errNo, errMsg, orderId, outOrderNo);
  1637. // that.setData({
  1638. // payFailShow: true
  1639. // });
  1640. }
  1641. console.log(errNo, errMsg);
  1642. }
  1643. });
  1644. } else {
  1645. uni.showModal({
  1646. title: '提醒',
  1647. showCancel: false,
  1648. content: res.errmsg
  1649. });
  1650. }
  1651. })
  1652. .catch((res) => {
  1653. uni.hideLoading();
  1654. util.showErrorToast(res.errmsg);
  1655. });
  1656. },
  1657. checkoutInfo() {
  1658. let that = this;
  1659. util.request(api.CartCheckout, {
  1660. cartId: 0,
  1661. addressId: 0,
  1662. couponId: that.couponId,
  1663. userCouponId: that.userCouponId,
  1664. goodsId: that.goods.id,
  1665. openId: that.openId,
  1666. productId: this.checkedSku.id,
  1667. unitIncreaseNumber: this.plusNum,
  1668. qid: that.qid
  1669. }).then(function(res) {
  1670. if (res.errno === 0) {
  1671. console.info(res);
  1672. that.setData({
  1673. checkedAddress: res.data.checkedAddress,
  1674. actualPrice: res.data.actualPrice,
  1675. couponPrice: res.data.couponPrice,
  1676. addressId: res.data.addressId,
  1677. couponId: res.data.couponId,
  1678. userCouponId: res.data.userCouponId,
  1679. mobile: res.data.mobile
  1680. });
  1681. //提交订单
  1682. that.submitOrder();
  1683. that.setData({
  1684. isCommiting: false
  1685. });
  1686. } else {
  1687. uni.showModal({
  1688. title: '提示',
  1689. content: res.errmsg,
  1690. showCancel: false
  1691. });
  1692. }
  1693. });
  1694. },
  1695. submitOrder() {
  1696. util.addLog(1, 3, 13, {
  1697. goodsId: this.goods.id,
  1698. productId: this.checkedSku.id
  1699. });
  1700. // #ifdef MP-TOUTIAO
  1701. this.orderPrepay();
  1702. // #endif
  1703. // #ifdef MP-ALIPAY
  1704. this.aliSubmit();
  1705. // #endif
  1706. },
  1707. continueToPay(outOrderNo, goNewPage) {
  1708. //已有订单重复提交
  1709. let that = this;
  1710. uni.continueToPay({
  1711. outOrderNo: outOrderNo,
  1712. // 外部订单号 2个订单号必填一个
  1713. success: (res) => {
  1714. console.log(res);
  1715. const {
  1716. orderId,
  1717. outOrderNo
  1718. } = res;
  1719. console.log('success res', res);
  1720. console.log('orderId', orderId, 'outOrderNo', outOrderNo);
  1721. if (goNewPage) {
  1722. uni.redirectTo({
  1723. url: '/pages/checkout/payResult/payResultNew?status=1&outOrderNo=' +
  1724. outOrderNo + '&actualPrice=' + that.actualPrice + '&goodsId=' +
  1725. that.id + '&productId=' + that.checkedSku.id
  1726. });
  1727. } else {
  1728. uni.redirectTo({
  1729. url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' +
  1730. outOrderNo + '&actualPrice=' + that.actualPrice + '&goodsId=' +
  1731. that.id
  1732. });
  1733. }
  1734. // uni.redirectTo({
  1735. // url: '/pages/checkout/payResult/payResult?status=1&outOrderNo=' + outOrderNo + '&actualPrice=' + that.actualPrice
  1736. // });
  1737. },
  1738. fail: (res) => {
  1739. console.log(res);
  1740. const {
  1741. orderId,
  1742. outOrderNo,
  1743. errNo,
  1744. errMsg,
  1745. errLogId
  1746. } = res;
  1747. if (errLogId) {
  1748. console.log('查询订单信息失败', errNo, errMsg, errLogId);
  1749. }
  1750. if (orderId || outOrderNo) {
  1751. console.log('支付失败', errNo, errMsg, orderId, outOrderNo);
  1752. console.log('订单号' + outOrderNo);
  1753. uni.navigateTo({
  1754. url: '/pages/ucenter/orderDetail/orderDetailPay?id=' + outOrderNo
  1755. });
  1756. }
  1757. // util.showErrorToast('放弃支付');
  1758. }
  1759. });
  1760. },
  1761. async getUserOpenId() {
  1762. let that = this;
  1763. let res = await user.userOpenId();
  1764. console.log(res);
  1765. that.setData({
  1766. openId: res.data
  1767. });
  1768. console.info(res);
  1769. uni.setStorageSync('openId', res.data);
  1770. // .then(res => {
  1771. // that.setData({
  1772. // openId: res.data
  1773. // })
  1774. // console.info(res)
  1775. // wx.setStorageSync('openId', res.data);
  1776. // });
  1777. },
  1778. gofastAddCart() {
  1779. var that = this;
  1780. //提示选择完整规格
  1781. // if (!this.isCheckedAllSpec()) {
  1782. // util.showErrorToast('请选择完整规格');
  1783. // return false;
  1784. // }
  1785. //根据选中的规格,判断是否有对应的sku信息
  1786. // let checkedProductArray = this.getCheckedProductItem(this.getCheckedSpecKey());
  1787. // if (!checkedProductArray || checkedProductArray.length <= 0) {
  1788. // //找不到对应的product信息,提示没有库存
  1789. // util.showErrorToast('没有库存');
  1790. // return false;
  1791. // }
  1792. // let checkedProduct = checkedProductArray[0];
  1793. // //验证库存
  1794. // if (checkedProduct.number <= 0) {
  1795. // util.showErrorToast('没有库存');
  1796. // return false;
  1797. // }
  1798. //立即购买
  1799. // util.request(api.CartFastAdd, {
  1800. // goodsId: this.data.goods.id,
  1801. // number: this.data.number,
  1802. // productId: checkedProduct.id,
  1803. // shareId: this.data.shareId
  1804. // }, "POST").then(res => {
  1805. // if (res.errno == 0) {
  1806. // 如果storage中设置了cartId,则是立即购买,否则是购物车购买
  1807. try {
  1808. // wx.setStorageSync('cartId', res.data);
  1809. // wx.setStorageSync('grouponRulesId', checkedGroupon.id);
  1810. // wx.setStorageSync('grouponLinkId', that.data.grouponLink.id);
  1811. // 支付结果页面展示图片用
  1812. app.globalData.infoGoods = {
  1813. name: this.goods.name,
  1814. brief: this.goods.brief,
  1815. picUrl: this.goods.picUrl,
  1816. type: that.checkedSku.type,
  1817. };
  1818. uni.setStorageSync('cartId', 0);
  1819. uni.setStorageSync('goodsId', this.goods.id);
  1820. console.info(that.shareId);
  1821. if (that.shareId > 0) {
  1822. uni.navigateTo({
  1823. url: '/pages/checkout/checkout?shareId=' + that.shareId
  1824. });
  1825. } else {
  1826. uni.navigateTo({
  1827. url: '/pages/checkout/checkout'
  1828. });
  1829. }
  1830. } catch (e) {
  1831. console.log('CatchClause', e);
  1832. console.log('CatchClause', e);
  1833. console.info(e);
  1834. }
  1835. // } else {
  1836. // util.showErrorToast(res.errmsg);
  1837. // }
  1838. // });
  1839. },
  1840. getdefalutUserAddress() {
  1841. //登陆拿用户默认地址,如果没有就拿系统默认地址
  1842. //如果有默认地址,但是不在门店服务区域里
  1843. util.request(api.OrderBookDefaultAddress, {}, 'get').then((res) => {
  1844. if (res.errno === 0) {
  1845. let address = res.data;
  1846. var city = address.city.indexOf('市辖') != -1 ? address.province : address.city;
  1847. //通过jz_shop的shop_no关联服务力分配的门店id,拿实际的jz_shop的门店id
  1848. var addresInfo = {
  1849. city: city,
  1850. lng: address.lng,
  1851. lat: address.lat,
  1852. shopId: address.shopId,
  1853. address: address.addressDetail,
  1854. shopName: address.shopName
  1855. };
  1856. uni.setStorageSync('addressInfo', addresInfo);
  1857. } else {
  1858. //无默认地址时 拿系统的
  1859. this.getdefaultCityShop();
  1860. }
  1861. });
  1862. },
  1863. getdefaultCityShop() {
  1864. let that = this;
  1865. util.request(api.getDefaultCityShop, {}, 'get').then((res) => {
  1866. if (res.errno === 0) {
  1867. uni.setStorageSync('addressInfo', res.data);
  1868. }
  1869. });
  1870. },
  1871. showMyModel(msg, that) {
  1872. uni.showModal({
  1873. title: '',
  1874. content: msg,
  1875. confirmText: '去处理',
  1876. cancelText: '取消',
  1877. success: function(res) {
  1878. //此商品有个未支付的订单,请到订单页去支付或取消重新下单。
  1879. //去处理:跳转订单页
  1880. if (res.confirm) {
  1881. try {
  1882. uni.setStorageSync('tab', 1);
  1883. } catch (e) {
  1884. console.log('CatchClause', e);
  1885. console.log('CatchClause', e);
  1886. }
  1887. uni.navigateTo({
  1888. url: '/pages/ucenter/order/order',
  1889. success: function(res) {},
  1890. fail: function(res) {},
  1891. complete: function(res) {}
  1892. });
  1893. } else {
  1894. that.gofastAddCart();
  1895. }
  1896. }
  1897. });
  1898. },
  1899. //添加到购物车
  1900. addToCart: function() {
  1901. var that = this;
  1902. if (this.openAttr == false) {
  1903. //打开规格选择窗口
  1904. this.setData({
  1905. openAttr: !this.openAttr
  1906. });
  1907. } else {
  1908. //提示选择完整规格
  1909. if (!this.isCheckedAllSpec()) {
  1910. util.showErrorToast('请选择完整规格');
  1911. return false;
  1912. }
  1913. //根据选中的规格,判断是否有对应的sku信息
  1914. let checkedProductArray = this.getCheckedProductItem(this.getCheckedSpecKey());
  1915. if (!checkedProductArray || checkedProductArray.length <= 0) {
  1916. //找不到对应的product信息,提示没有库存
  1917. util.showErrorToast('没有库存');
  1918. return false;
  1919. }
  1920. let checkedProduct = checkedProductArray[0];
  1921. //验证库存
  1922. if (checkedProduct.number <= 0) {
  1923. util.showErrorToast('没有库存');
  1924. return false;
  1925. }
  1926. //添加到购物车
  1927. util.request(
  1928. api.CartAdd, {
  1929. goodsId: this.goods.id,
  1930. number: this.number,
  1931. productId: checkedProduct.id
  1932. },
  1933. 'POST'
  1934. ).then(function(res) {
  1935. let _res = res;
  1936. if (_res.errno == 0) {
  1937. uni.showToast({
  1938. title: '添加成功'
  1939. });
  1940. that.setData({
  1941. openAttr: !that.openAttr,
  1942. cartGoodsCount: _res.data
  1943. });
  1944. //显示tab购物车缓存
  1945. //user.cartadd(that.data.number);
  1946. if (that.userHasCollect == 1) {
  1947. that.setData({
  1948. collect: true
  1949. });
  1950. } else {
  1951. that.setData({
  1952. collect: false
  1953. });
  1954. }
  1955. } else {
  1956. util.showErrorToast(_res.errmsg);
  1957. }
  1958. });
  1959. }
  1960. },
  1961. cutNumber: function() {
  1962. this.setData({
  1963. number: this.number - 1 > 1 ? this.number - 1 : 1
  1964. });
  1965. },
  1966. addNumber: function() {
  1967. // 如果是安心包只能购买一个
  1968. console.log(this.goods);
  1969. if (this.goods.goodsSn == '1036016') {
  1970. uni.showToast({
  1971. title: '此款商品只能购买一个',
  1972. icon: 'none',
  1973. duration: 2000
  1974. });
  1975. } else {
  1976. this.setData({
  1977. number: this.number + 1
  1978. });
  1979. }
  1980. },
  1981. switchAttrPop: function() {
  1982. if (this.openAttr == false) {
  1983. this.setData({
  1984. openAttr: !this.openAttr
  1985. });
  1986. }
  1987. },
  1988. closeAttr: function() {
  1989. this.setData({
  1990. openAttr: false
  1991. });
  1992. },
  1993. closeShare: function() {
  1994. this.setData({
  1995. openShare: false
  1996. });
  1997. },
  1998. openCartPage: function() {
  1999. uni.switchTab({
  2000. url: '/pages/tabBar/cart/cart'
  2001. });
  2002. },
  2003. qrtouchstart: function() {
  2004. this.setData({
  2005. myqr_blur: 100,
  2006. myqr_show: false
  2007. });
  2008. },
  2009. copyToHM() {
  2010. let copyLink = this.goods.copyLink;
  2011. console.log(copyLink);
  2012. if (copyLink != undefined && copyLink != '') {
  2013. uni.setClipboardData({
  2014. data: copyLink,
  2015. success(res) {
  2016. uni.getClipboardData({
  2017. success(res) {
  2018. console.log(res.data); // data
  2019. }
  2020. });
  2021. }
  2022. });
  2023. } else {
  2024. uni.showToast({
  2025. title: '该商品暂未配置盒马链接',
  2026. icon: 'none'
  2027. });
  2028. }
  2029. },
  2030. onSelfPayChange(e) {
  2031. console.log(e);
  2032. this.setData({
  2033. selfPayChecked: e.detail
  2034. });
  2035. },
  2036. onSpreadPayChange(e) {
  2037. console.log(e);
  2038. this.setData({
  2039. spreadPayChecked: e.detail
  2040. });
  2041. },
  2042. cancelSelfPay() {
  2043. let selfPayChecked = this.selfPayChecked;
  2044. if (selfPayChecked == true) {
  2045. uni.setStorageSync('selfPayChecked', true);
  2046. }
  2047. this.setData({
  2048. selfPayShow: false
  2049. });
  2050. },
  2051. cancelSpreadPay() {
  2052. let spreadPayChecked = this.spreadPayChecked;
  2053. if (spreadPayChecked == true) {
  2054. uni.setStorageSync('spreadPayChecked', true);
  2055. }
  2056. this.setData({
  2057. spreadPayShow: false
  2058. });
  2059. },
  2060. goSelfPay() {
  2061. let selfPayChecked = uni.getStorageSync('selfPayChecked');
  2062. if (selfPayChecked != true) {
  2063. this.setData({
  2064. selfPayShow: true
  2065. });
  2066. } else {
  2067. this.addFast();
  2068. }
  2069. },
  2070. goSpread() {
  2071. let spreadPayChecked = uni.getStorageSync('spreadPayChecked');
  2072. console.log(spreadPayChecked);
  2073. if (spreadPayChecked != true) {
  2074. this.setData({
  2075. spreadPayShow: true
  2076. });
  2077. } else {
  2078. // wx.navigateTo({
  2079. // url: '/pages/goods/goodsPoster/goodsPoster?goodsId='+this.data.goods.id,
  2080. // })
  2081. this.createPoster();
  2082. }
  2083. },
  2084. posterCopy() {
  2085. let that = this;
  2086. uni.setClipboardData({
  2087. data: that.myqr_ads,
  2088. success: function(res) {
  2089. uni.getClipboardData({
  2090. success: function(res) {
  2091. uni.showToast({
  2092. title: '文案复制成功',
  2093. icon: 'success',
  2094. duration: 2000
  2095. });
  2096. // that.hidePoster();
  2097. }
  2098. });
  2099. }
  2100. });
  2101. },
  2102. hidePoster() {
  2103. this.setData({
  2104. myqr_show: false,
  2105. myqr_blur: 100,
  2106. myqr_bottom_btn: 'fixed'
  2107. });
  2108. },
  2109. createPoster() {
  2110. uni.showLoading({
  2111. title: '生成中'
  2112. });
  2113. uni.pageScrollTo({
  2114. scrollTop: 0
  2115. });
  2116. if (this.myqr_url != null) {
  2117. uni.hideLoading();
  2118. this.setData({
  2119. myqr_show: true,
  2120. myqr_blur: 25,
  2121. myqr_bottom_btn: 'unset'
  2122. });
  2123. return;
  2124. }
  2125. util.request(
  2126. api.QrGoodsCodeCreate, {
  2127. goods_id: this.goods.id
  2128. },
  2129. 'POST'
  2130. ).then((res) => {
  2131. uni.hideLoading();
  2132. if (res.errno == 0) {
  2133. this.setData({
  2134. myqr_url: res.data.imgUrl,
  2135. myqr_ads: res.data.ads,
  2136. myqr_show: true,
  2137. myqr_blur: 25,
  2138. myqr_bottom_btn: 'unset'
  2139. });
  2140. } else {
  2141. util.showErrorToast('未设置分享图');
  2142. }
  2143. });
  2144. },
  2145. goSaveQrcode: function() {
  2146. //保存二维码图片
  2147. let that = this;
  2148. console.info(that.myqr_url);
  2149. uni.downloadFile({
  2150. url: that.myqr_url,
  2151. success: function(res) {
  2152. if (res.statusCode === 200) {
  2153. let img = res.tempFilePath;
  2154. uni.saveImageToPhotosAlbum({
  2155. filePath: img,
  2156. success(res) {
  2157. that.goCloseMyqr('个人专属二维码图片已保存到您的相册');
  2158. },
  2159. fail(res) {
  2160. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2161. }
  2162. });
  2163. } else {
  2164. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2165. }
  2166. },
  2167. fail(res) {
  2168. that.goCloseMyqr('网络或授权问题 图片保存失败 请重试');
  2169. }
  2170. });
  2171. },
  2172. goCloseMyqr: function(msg) {
  2173. //关闭分享图片的弹层
  2174. this.hidePoster();
  2175. if (msg) {
  2176. uni.showToast({
  2177. title: msg,
  2178. icon: 'none',
  2179. duration: 3000
  2180. });
  2181. }
  2182. },
  2183. reSelfPay() {
  2184. let selfPayChecked = this.selfPayChecked;
  2185. if (selfPayChecked == true) {
  2186. uni.setStorageSync('selfPayChecked', true);
  2187. }
  2188. this.setData({
  2189. selfPayShow: false
  2190. });
  2191. this.addFast();
  2192. },
  2193. reSpread() {
  2194. // let spreadPayChecked = this.data.spreadPayChecked;
  2195. // if (spreadPayChecked == true) {
  2196. // wx.setStorageSync('spreadPayChecked', true);
  2197. // }
  2198. this.setData({
  2199. spreadPayShow: false
  2200. });
  2201. this.createPoster();
  2202. // wx.navigateTo({
  2203. // url: '/pages/goods/goodsPoster/goodsPoster?goodsId='+this.data.goods.id,
  2204. // })
  2205. },
  2206. goMemberCenter() {
  2207. if (!app.globalData.hasLogin) {
  2208. uni.navigateTo({
  2209. url: '/pages/auth/login/login'
  2210. });
  2211. return;
  2212. } else {
  2213. uni.navigateTo({
  2214. url: '/pages/member/memberCenter/memberCenter'
  2215. });
  2216. }
  2217. },
  2218. bindGoodsNumInput(e) {
  2219. console.log(e.detail.value);
  2220. let max = this.productList[0].unitMaximum;
  2221. let plusNum = parseInt(e.detail.value == '' ? 0 : e.detail.value);
  2222. if (plusNum > max){
  2223. plusNum = max;
  2224. }
  2225. let addPurchaseAmount=this.checkedSku.unitPrice*plusNum;
  2226. this.setData({
  2227. plusNum: plusNum,
  2228. addPurchaseAmount:addPurchaseAmount,
  2229. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2230. });
  2231. // this.setData({
  2232. // totalPrice: Number(Number(this.finallyPrice) + Number(this.goods.unitPrice) * Number(this
  2233. // .plusNum)).toFixed(2)
  2234. // });
  2235. },
  2236. minusNum() {
  2237. if (this.plusNum == this.minNum) {
  2238. return false;
  2239. } else {
  2240. let result = Number(this.plusNum) - 1;
  2241. // this.setData({
  2242. // plusNum:(result==0?'0':result)
  2243. // });
  2244. // 加购类
  2245. // if (this.goods.productType == 3) {
  2246. // let currentAdd = this.productList.filter((item) => {
  2247. // return item.unitIncreaseNumber == result;
  2248. // });
  2249. // if (currentAdd.length >= 1) {
  2250. // let amount = currentAdd[0].price;
  2251. // this.setData({
  2252. // checkedSku: currentAdd[0],
  2253. // plusNum: result,
  2254. // addPurchaseAmount: amount,
  2255. // totalPrice: Number(Number(amount) - Number(this.couponPrice)).toFixed(2)
  2256. // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
  2257. // });
  2258. // } else {
  2259. // uni.showToast({
  2260. // title: '当前加购数量无效',
  2261. // icon: 'none'
  2262. // });
  2263. // }
  2264. // } else if (this.goods.type == 4) {
  2265. let addPurchaseAmount=this.checkedSku.unitPrice*result;
  2266. console.log(this.checkedSku.price * this.plusNum);
  2267. console.log(this.checkedSku.price * this.plusNum - this.couponPrice);
  2268. // 补差类
  2269. this.setData({
  2270. plusNum: result,
  2271. addPurchaseAmount:addPurchaseAmount,
  2272. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2273. });
  2274. // }
  2275. }
  2276. },
  2277. addNum() {
  2278. if (this.productList[0].unitMaximum && this.plusNum >= this.productList[0].unitMaximum) {
  2279. return false;
  2280. } else {
  2281. let result = Number(this.plusNum) + 1;
  2282. // 加购类
  2283. // if (this.goods.productType == 3) {
  2284. // let currentAdd = this.productList.filter((item) => {
  2285. // return item.unitIncreaseNumber == result;
  2286. // });
  2287. // if (currentAdd.length >= 1) {
  2288. // let amount = currentAdd[0].price;
  2289. // this.setData({
  2290. // checkedSku: currentAdd[0],
  2291. // plusNum: result,
  2292. // addPurchaseAmount: amount,
  2293. // totalPrice: Number(Number(amount) - Number(this.couponPrice)).toFixed(2)
  2294. // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
  2295. // });
  2296. // } else {
  2297. // uni.showToast({
  2298. // title: '此加购数量无效',
  2299. // icon: 'none'
  2300. // });
  2301. // }
  2302. // } else if (this.goods.type == 4) {
  2303. // 补差类
  2304. let addPurchaseAmount=this.checkedSku.unitPrice*result;
  2305. console.log(this.checkedSku.price * this.plusNum);
  2306. console.log(this.checkedSku.price * this.plusNum - this.couponPrice);
  2307. // 补差类
  2308. this.setData({
  2309. plusNum: result,
  2310. addPurchaseAmount:addPurchaseAmount,
  2311. totalPrice: Number(this.checkedSku.price +addPurchaseAmount - this.couponPrice).toFixed(2)
  2312. });
  2313. // }
  2314. }
  2315. },
  2316. goWholeEval() {
  2317. uni.navigateTo({
  2318. url: '/pages/goods/wholeEvaluation/wholeEvaluation?id=' + this.id
  2319. });
  2320. },
  2321. onSkuClose() {
  2322. this.setData({
  2323. chooseSkuVisible: false
  2324. });
  2325. },
  2326. showSkuPopup(type) {
  2327. this.setData({
  2328. showType: type,
  2329. chooseSkuVisible: true,
  2330. currentSku: this.checkedSku,
  2331. activeSku: this.checkedSku.id
  2332. });
  2333. },
  2334. selectSku(e) {
  2335. let id = e.currentTarget.dataset.id;
  2336. let index = e.currentTarget.dataset.index;
  2337. this.setData({
  2338. activeSku: id,
  2339. currentSku: this.productList[index],
  2340. // checkedSku: this.productList[index]
  2341. });
  2342. },
  2343. confSku() {
  2344. this.setData({
  2345. checkedSku: this.currentSku,
  2346. chooseSkuVisible: false
  2347. });
  2348. this.setData({
  2349. finallyPrice: Number(this.checkedSku.price - this.couponPrice).toFixed(2)
  2350. });
  2351. // if (this.goods.type == 4) {
  2352. // this.setData({
  2353. // totalPrice: Number(this.checkedSku.price * this.plusNum - this.couponPrice).toFixed(2)
  2354. // });
  2355. // } else {
  2356. this.setData({
  2357. totalPrice: Number(this.checkedSku.price - this.couponPrice).toFixed(2)
  2358. });
  2359. // }
  2360. util.addLog(1, 1, 11, {
  2361. goodsId: this.goods.id,
  2362. productId: this.checkedSku.id,
  2363. });
  2364. if (this.showType == 1) {
  2365. this.fastOrder();
  2366. }
  2367. },
  2368. stopClick() {}
  2369. }
  2370. };
  2371. </script>
  2372. <style>
  2373. .myqr {
  2374. position: absolute;
  2375. z-index: 999;
  2376. width: 100%;
  2377. text-align: center;
  2378. height: auto;
  2379. margin-top: 50rpx;
  2380. }
  2381. .myqr .cancel {
  2382. width: 60rpx;
  2383. height: 60rpx;
  2384. margin-top: 30rpx;
  2385. margin-left: 480rpx;
  2386. }
  2387. .myqr .img {
  2388. width: 480rpx;
  2389. }
  2390. .myqr .btn {
  2391. width: 120rpx;
  2392. height: 120rpx;
  2393. line-height: 120rpx;
  2394. margin-top: 20rpx;
  2395. padding: 30rpx;
  2396. background: #ffffff;
  2397. border-radius: 60rpx;
  2398. }
  2399. page {
  2400. background: #f3f3f3;
  2401. }
  2402. .container {
  2403. padding-bottom: 180rpx;
  2404. position: relative;
  2405. /* margin-bottom: 100rpx; */
  2406. }
  2407. .user_column_item_image {
  2408. width: 50rpx;
  2409. height: 50rpx;
  2410. margin-right: 26rpx;
  2411. margin-top: 25rpx;
  2412. }
  2413. .flexb {
  2414. width: 750rpx;
  2415. height: 88rpx;
  2416. line-height: 103rpx;
  2417. padding-right: 31.25rpx;
  2418. border-bottom: 1px solid #f4f4f4;
  2419. font-size: 30rpx;
  2420. color: #333;
  2421. background: #fff;
  2422. display: flex;
  2423. flex-wrap: nowrap;
  2424. }
  2425. .flex {
  2426. flex-grow: 1;
  2427. text-align: center;
  2428. }
  2429. .show {
  2430. width: 750rpx;
  2431. height: 88rpx;
  2432. background: #fff;
  2433. border-bottom: 1px solid #f4f4f4;
  2434. }
  2435. .show .t {
  2436. float: left;
  2437. width: 600rpx;
  2438. height: 88rpx;
  2439. line-height: 88rpx;
  2440. font-size: 29rpx;
  2441. color: #333;
  2442. margin-left: 31.25rpx;
  2443. }
  2444. .show .t .s {
  2445. font-weight: 600;
  2446. }
  2447. .show .i {
  2448. float: right;
  2449. width: 52rpx;
  2450. height: 52rpx;
  2451. margin-right: 16rpx;
  2452. margin-top: 28rpx;
  2453. }
  2454. .mark-img {
  2455. width: 168rpx;
  2456. height: 68rpx;
  2457. right: 5rpx;
  2458. position: absolute;
  2459. top: 5rpx;
  2460. }
  2461. .goodsimgs {
  2462. width: 750rpx;
  2463. /* height: 492rpx; */
  2464. height: 490rpx;
  2465. }
  2466. .goodsimgs image {
  2467. width: 750rpx;
  2468. /* height: 326rpx; */
  2469. height: 490rpx;
  2470. }
  2471. .commodity_screen {
  2472. width: 100%;
  2473. height: 100%;
  2474. position: fixed;
  2475. top: 0;
  2476. left: 0;
  2477. background: #000;
  2478. opacity: 0.2;
  2479. overflow: hidden;
  2480. z-index: 1000;
  2481. color: #fff;
  2482. }
  2483. .commodity_attr_box {
  2484. width: 100%;
  2485. overflow: hidden;
  2486. position: fixed;
  2487. bottom: 0;
  2488. left: 0;
  2489. z-index: 2000;
  2490. background: #fff;
  2491. padding-top: 20rpx;
  2492. }
  2493. /* 活动样式 */
  2494. .activity {
  2495. width: 750rpx;
  2496. height: 145rpx;
  2497. background: linear-gradient(67deg, #4f43dd, #689cf2, #ba64e2);
  2498. display: flex;
  2499. flex-direction: column;
  2500. padding: 20rpx 30rpx;
  2501. }
  2502. .activity .img {
  2503. background-image: url('https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/activity.png');
  2504. width: 139rpx;
  2505. height: 32rpx;
  2506. background-size: 100% 100%;
  2507. color: #5244dd;
  2508. font-size: 23rpx;
  2509. text-align: center;
  2510. }
  2511. .activityDay {
  2512. line-height: 42rpx;
  2513. margin-right: 30rpx;
  2514. display: flex;
  2515. height: 42rpx;
  2516. }
  2517. .activityDay image {
  2518. width: 42rpx;
  2519. height: 42rpx;
  2520. margin-right: 10rpx;
  2521. }
  2522. .activityDay text {
  2523. font-size: 24rpx;
  2524. color: #f4f4f4;
  2525. }
  2526. .activityPrice {
  2527. color: #ffffff;
  2528. }
  2529. .activityPrice text {
  2530. font-size: 49rpx;
  2531. font-weight: bold;
  2532. }
  2533. .activityCounterPrice {
  2534. color: #c7c7c7;
  2535. text-decoration: line-through;
  2536. font-size: 24rpx;
  2537. margin-top: 20rpx;
  2538. margin-left: 10rpx;
  2539. }
  2540. .activityTime {
  2541. display: flex;
  2542. flex-direction: row;
  2543. margin-right: 50rpx;
  2544. }
  2545. .activityTime text {
  2546. color: #ffffff;
  2547. line-height: 45rpx;
  2548. }
  2549. .activityTime view {
  2550. width: 45rpx;
  2551. height: 45rpx;
  2552. background: #ffffff;
  2553. border-radius: 5rpx;
  2554. margin: 5rpx;
  2555. line-height: 45rpx;
  2556. text-align: center;
  2557. font-size: 25rpx;
  2558. font-weight: bold;
  2559. color: #b563e1;
  2560. }
  2561. .activityTime .mark {}
  2562. .goods-info {
  2563. width: 750rpx;
  2564. /*height: 306rpx;*/
  2565. overflow: hidden;
  2566. background: #fff;
  2567. border-bottom: 1px solid #f4f4f4;
  2568. }
  2569. .goods-info .c {
  2570. display: block;
  2571. width: 718.75rpx;
  2572. height: 182rpx;
  2573. margin-left: 31.25rpx;
  2574. padding: 3rpx 31.25rpx 20rpx 0;
  2575. }
  2576. .goods-info .c text {
  2577. /* display: block;
  2578. width: 687.5rpx;
  2579. text-align: left; */
  2580. }
  2581. .goods_name {
  2582. white-space: nowrap;
  2583. text-overflow: ellipsis;
  2584. overflow: hidden;
  2585. margin-top: 10rpx;
  2586. display: flex;
  2587. align-items: center;
  2588. }
  2589. .goods_name_left {
  2590. font-weight: 550;
  2591. margin-left: 0rpx;
  2592. font-size: 36rpx;
  2593. letter-spacing: 1rpx;
  2594. color: #2a2a2a;
  2595. font-weight: bold;
  2596. width: 688rpx;
  2597. white-space: pre-wrap;
  2598. }
  2599. .goods_name_right {
  2600. font-weight: 550;
  2601. /* top: 375px; */
  2602. width: 80rpx;
  2603. height: 80rpx;
  2604. line-height: 82rpx;
  2605. /* padding: 0;
  2606. margin: 0;
  2607. right: 10rpx; */
  2608. margin-right: 0rpx;
  2609. text-align: center;
  2610. font-size: 25rpx;
  2611. background-color: #09afff;
  2612. border-radius: 40rpx;
  2613. letter-spacing: 3rpx;
  2614. /* position: absolute; */
  2615. }
  2616. .goods_name_right .img {
  2617. width: 50rpx;
  2618. height: 50rpx;
  2619. margin-top: 15rpx;
  2620. }
  2621. .goods_name_right .txt {
  2622. margin-top: 5rpx;
  2623. font-size: 18rpx;
  2624. color: #000000;
  2625. border: 1rpx solid;
  2626. }
  2627. .goods-info .desc {
  2628. margin: 12rpx 0;
  2629. font-size: 24rpx;
  2630. line-height: 36rpx;
  2631. width: 640rpx;
  2632. white-space: nowrap;
  2633. text-overflow: ellipsis;
  2634. overflow: hidden;
  2635. display: block;
  2636. }
  2637. .goods-info .price {
  2638. height: 60rpx;
  2639. display: flex;
  2640. /* margin-top: 20rpx; */
  2641. align-items: flex-end;
  2642. }
  2643. .goods-info .counterPrice {
  2644. padding-left: 5rpx;
  2645. text-decoration: line-through;
  2646. font-size: 24rpx;
  2647. margin-top: 15rpx;
  2648. margin-left: 10rpx;
  2649. color: #85868a;
  2650. }
  2651. .goods-info .retailPrice {
  2652. height: 49rpx;
  2653. line-height: 44rpx;
  2654. /* color: #5DB5E7; */
  2655. color: #ff2958;
  2656. }
  2657. .goods-info .memberPrice {
  2658. font-size: 26rpx;
  2659. color: #dd483e;
  2660. margin: 0 10rpx 0 20rpx;
  2661. }
  2662. .member-price-tag {
  2663. width: 88rpx;
  2664. height: 26rpx;
  2665. line-height: 26rpx;
  2666. background: url('https://mall.zhaijieshi.cc/file/jzmall/weixin/member/member-price-bg.png') no-repeat center center;
  2667. background-size: 100% 100%;
  2668. color: #5e3a11;
  2669. font-size: 16rpx;
  2670. padding: 0 8rpx 0 0;
  2671. text-align: right;
  2672. margin: 0 0 6rpx 0;
  2673. }
  2674. .member-price-tag.spread-tag {
  2675. margin-left: 20rpx;
  2676. background-image: url('https://mall.zhaijieshi.cc/file/jzmall/weixin/member/spread-price-bg.png');
  2677. width: 122rpx;
  2678. }
  2679. .goods-info .retailPrice text.checked-price {
  2680. font-size: 48rpx;
  2681. font-weight: bold;
  2682. margin-left: 3rpx;
  2683. color: #ff2958;
  2684. }
  2685. .goods-info .brand {
  2686. margin-top: 5rpx;
  2687. min-height: 34rpx;
  2688. text-align: left;
  2689. }
  2690. .goods-info .brand text {
  2691. display: inline-block;
  2692. width: auto;
  2693. padding: 2px 0rpx 2px 0.5rpx;
  2694. line-height: 32.5rpx;
  2695. /*border: 1px solid #f48f18;color: #f48f18;*/
  2696. font-size: 22rpx;
  2697. color: #a98f76;
  2698. /*border-radius: 4rpx;*/
  2699. background-size: 10.75rpx 18.75rpx;
  2700. }
  2701. .section-nav {
  2702. width: 750rpx;
  2703. height: 108rpx;
  2704. background: #fff;
  2705. margin-bottom: 20rpx;
  2706. }
  2707. .section-nav .t {
  2708. float: left;
  2709. width: 600rpx;
  2710. height: 108rpx;
  2711. line-height: 108rpx;
  2712. font-size: 29rpx;
  2713. color: #333;
  2714. margin-left: 31.25rpx;
  2715. }
  2716. .section-nav .i {
  2717. float: right;
  2718. width: 52rpx;
  2719. height: 52rpx;
  2720. margin-right: 16rpx;
  2721. margin-top: 28rpx;
  2722. }
  2723. .section-act .t {
  2724. float: left;
  2725. display: flex;
  2726. align-items: center;
  2727. width: 600rpx;
  2728. height: 108rpx;
  2729. overflow: hidden;
  2730. line-height: 108rpx;
  2731. font-size: 29rpx;
  2732. color: #999;
  2733. margin-left: 31.25rpx;
  2734. }
  2735. .section-act .label {
  2736. color: #999;
  2737. }
  2738. .section-act .tag {
  2739. display: flex;
  2740. align-items: center;
  2741. padding: 0 10rpx;
  2742. border-radius: 3px;
  2743. height: 37rpx;
  2744. width: auto;
  2745. color: #f48f18;
  2746. overflow: hidden;
  2747. border: 1px solid #f48f18;
  2748. font-size: 25rpx;
  2749. margin: 0 10rpx;
  2750. }
  2751. .section-act .text {
  2752. display: flex;
  2753. align-items: center;
  2754. height: 37rpx;
  2755. width: auto;
  2756. overflow: hidden;
  2757. color: #f48f18;
  2758. font-size: 29rpx;
  2759. }
  2760. .comments {
  2761. width: 100%;
  2762. height: auto;
  2763. padding-left: 30rpx;
  2764. background: #fff;
  2765. margin: 20rpx 0;
  2766. }
  2767. .comments .h {
  2768. height: 102.5rpx;
  2769. line-height: 100.5rpx;
  2770. width: 718.75rpx;
  2771. padding-right: 16rpx;
  2772. }
  2773. .comments .h .t {
  2774. display: block;
  2775. float: left;
  2776. width: 50%;
  2777. font-size: 30rpx;
  2778. color: #333;
  2779. }
  2780. .comments .h .i {
  2781. display: block;
  2782. float: right;
  2783. width: 164rpx;
  2784. height: 100.5rpx;
  2785. line-height: 100.5rpx;
  2786. background-size: 52rpx;
  2787. }
  2788. .comments .b {
  2789. height: auto;
  2790. width: 720rpx;
  2791. }
  2792. .comments .item {
  2793. height: auto;
  2794. width: 720rpx;
  2795. overflow: hidden;
  2796. border-top: 1px solid #d9d9d9;
  2797. }
  2798. .comments .info {
  2799. height: 127rpx;
  2800. width: 100%;
  2801. padding: 33rpx 0 27rpx 0;
  2802. }
  2803. .comments .user {
  2804. float: left;
  2805. width: auto;
  2806. height: 67rpx;
  2807. line-height: 67rpx;
  2808. font-size: 0;
  2809. }
  2810. .comments .user image {
  2811. float: left;
  2812. width: 67rpx;
  2813. height: 67rpx;
  2814. margin-right: 17rpx;
  2815. border-radius: 50%;
  2816. }
  2817. .comments .user text {
  2818. display: inline-block;
  2819. width: auto;
  2820. height: 66rpx;
  2821. overflow: hidden;
  2822. font-size: 29rpx;
  2823. line-height: 66rpx;
  2824. }
  2825. .comments .time {
  2826. display: block;
  2827. float: right;
  2828. width: auto;
  2829. height: 67rpx;
  2830. line-height: 67rpx;
  2831. color: #7f7f7f;
  2832. font-size: 25rpx;
  2833. margin-right: 30rpx;
  2834. }
  2835. .comments .content {
  2836. width: 720rpx;
  2837. padding-right: 30rpx;
  2838. line-height: 45.8rpx;
  2839. font-size: 29rpx;
  2840. margin-bottom: 24rpx;
  2841. }
  2842. .comments .imgs {
  2843. width: 720rpx;
  2844. height: auto;
  2845. margin-bottom: 25rpx;
  2846. }
  2847. .comments .imgs .img {
  2848. height: 150rpx;
  2849. width: 150rpx;
  2850. margin-right: 28rpx;
  2851. }
  2852. .comments .spec {
  2853. width: 720rpx;
  2854. padding-right: 30rpx;
  2855. line-height: 30rpx;
  2856. font-size: 24rpx;
  2857. color: #999;
  2858. margin-bottom: 30rpx;
  2859. }
  2860. .comments .customer-service {
  2861. width: 690rpx;
  2862. height: auto;
  2863. overflow: hidden;
  2864. margin-top: 23rpx;
  2865. margin-bottom: 23rpx;
  2866. background: rgba(0, 0, 0, 0.03);
  2867. padding: 21rpx;
  2868. }
  2869. .comments .customer-service .u {
  2870. font-size: 24rpx;
  2871. color: #333;
  2872. line-height: 37.5rpx;
  2873. }
  2874. .comments .customer-service .c {
  2875. font-size: 24rpx;
  2876. color: #999;
  2877. line-height: 37.5rpx;
  2878. }
  2879. .goods-attr {
  2880. width: 750rpx;
  2881. height: auto;
  2882. overflow: hidden;
  2883. padding: 0 31.25rpx 25rpx 31.25rpx;
  2884. background: #fff;
  2885. }
  2886. .goods-attr .t {
  2887. width: 687.5rpx;
  2888. height: 104rpx;
  2889. line-height: 104rpx;
  2890. font-size: 38.5rpx;
  2891. }
  2892. .goods-attr .item {
  2893. width: 687.5rpx;
  2894. height: 68rpx;
  2895. padding: 11rpx 20rpx;
  2896. margin-bottom: 11rpx;
  2897. background: #f7f7f7;
  2898. font-size: 38.5rpx;
  2899. }
  2900. .goods-attr .left {
  2901. float: left;
  2902. font-size: 25rpx;
  2903. width: 134rpx;
  2904. height: 45rpx;
  2905. line-height: 45rpx;
  2906. overflow: hidden;
  2907. color: #999;
  2908. }
  2909. .goods-attr .right {
  2910. float: left;
  2911. font-size: 36.5rpx;
  2912. margin-left: 20rpx;
  2913. width: 480rpx;
  2914. height: 45rpx;
  2915. line-height: 45rpx;
  2916. overflow: hidden;
  2917. color: #333;
  2918. }
  2919. .detail {
  2920. width: 750rpx;
  2921. height: auto;
  2922. overflow: hidden;
  2923. /* padding-bottom: 160rpx; */
  2924. }
  2925. .detail image {
  2926. width: 750rpx;
  2927. /* display: block; */
  2928. }
  2929. .common-problem {
  2930. width: 750rpx;
  2931. height: auto;
  2932. overflow: hidden;
  2933. }
  2934. .common-problem .h {
  2935. position: relative;
  2936. height: 145.5rpx;
  2937. width: 750rpx;
  2938. padding: 56.25rpx 0;
  2939. background: #fff;
  2940. text-align: center;
  2941. }
  2942. .common-problem .h .line {
  2943. display: inline-block;
  2944. position: absolute;
  2945. top: 72rpx;
  2946. left: 0;
  2947. z-index: 2;
  2948. height: 1px;
  2949. margin-left: 225rpx;
  2950. width: 300rpx;
  2951. background: #ccc;
  2952. }
  2953. .common-problem .h .title {
  2954. display: inline-block;
  2955. position: absolute;
  2956. top: 56.125rpx;
  2957. left: 0;
  2958. z-index: 3;
  2959. height: 33rpx;
  2960. margin-left: 285rpx;
  2961. width: 180rpx;
  2962. background: #fff;
  2963. }
  2964. .common-problem .b {
  2965. width: 750rpx;
  2966. height: auto;
  2967. overflow: hidden;
  2968. padding: 0rpx 30rpx;
  2969. background: #fff;
  2970. }
  2971. .common-problem .item {
  2972. height: auto;
  2973. overflow: hidden;
  2974. padding-bottom: 25rpx;
  2975. }
  2976. .common-problem .question-box .spot {
  2977. float: left;
  2978. display: block;
  2979. height: 8rpx;
  2980. width: 8rpx;
  2981. background: #b4282d;
  2982. border-radius: 50%;
  2983. margin-top: 11rpx;
  2984. }
  2985. .common-problem .question-box .question {
  2986. float: left;
  2987. line-height: 30rpx;
  2988. padding-left: 8rpx;
  2989. display: block;
  2990. font-size: 26rpx;
  2991. padding-bottom: 15rpx;
  2992. color: #303030;
  2993. }
  2994. .common-problem .answer {
  2995. line-height: 36rpx;
  2996. padding-left: 16rpx;
  2997. font-size: 26rpx;
  2998. color: #787878;
  2999. }
  3000. .related-goods {
  3001. width: 750rpx;
  3002. height: auto;
  3003. overflow: hidden;
  3004. padding-bottom: 80rpx;
  3005. }
  3006. .related-goods .h {
  3007. position: relative;
  3008. height: 145.5rpx;
  3009. width: 750rpx;
  3010. padding: 56.25rpx 0;
  3011. background: #fff;
  3012. text-align: center;
  3013. border-bottom: 1px solid #f4f4f4;
  3014. }
  3015. .related-goods .h .line {
  3016. display: inline-block;
  3017. position: absolute;
  3018. top: 72rpx;
  3019. left: 0;
  3020. z-index: 2;
  3021. height: 1px;
  3022. margin-left: 225rpx;
  3023. width: 300rpx;
  3024. background: #ccc;
  3025. }
  3026. .related-goods .h .title {
  3027. display: inline-block;
  3028. position: absolute;
  3029. top: 56.125rpx;
  3030. left: 0;
  3031. z-index: 3;
  3032. height: 33rpx;
  3033. margin-left: 285rpx;
  3034. width: 180rpx;
  3035. background: #fff;
  3036. }
  3037. .related-goods .b {
  3038. width: 750rpx;
  3039. height: auto;
  3040. overflow: hidden;
  3041. }
  3042. .related-goods .b .item {
  3043. float: left;
  3044. background: #fff;
  3045. width: 375rpx;
  3046. height: auto;
  3047. overflow: hidden;
  3048. text-align: center;
  3049. padding: 15rpx 31.25rpx;
  3050. border-right: 1px solid #f4f4f4;
  3051. border-bottom: 1px solid #f4f4f4;
  3052. }
  3053. .related-goods .item .img {
  3054. width: 311.45rpx;
  3055. height: 311.45rpx;
  3056. }
  3057. .related-goods .item .name {
  3058. display: block;
  3059. width: 311.45rpx;
  3060. height: 35rpx;
  3061. margin: 11.5rpx 0 15rpx 0;
  3062. text-align: center;
  3063. overflow: hidden;
  3064. font-size: 30rpx;
  3065. color: #333;
  3066. }
  3067. .related-goods .item .price {
  3068. display: block;
  3069. width: 311.45rpx;
  3070. height: 30rpx;
  3071. text-align: center;
  3072. font-size: 30rpx;
  3073. color: #b4282d;
  3074. }
  3075. .bottom-btn .l {
  3076. /* flex: 2;
  3077. float: left;
  3078. height: 150rpx;
  3079. width: 162rpx; */
  3080. /* display: flex; */
  3081. }
  3082. .bottom-btn .l.l-collect {
  3083. border-right: none;
  3084. border-left: none;
  3085. text-align: center;
  3086. padding-left: 30rpx;
  3087. /* width: 100rpx; */
  3088. }
  3089. .bottom-btn .l.l-collect .icon {
  3090. font-size: 40rpx;
  3091. }
  3092. .bottom-btn .l.l-collect text {
  3093. /* position: absolute;
  3094. top: 80rpx;
  3095. left: 30rpx;
  3096. font-size: 22rpx; */
  3097. }
  3098. .bottom-btn .l.l-kefu {
  3099. border-right: none;
  3100. border-left: none;
  3101. text-align: center;
  3102. /* width:60rpx; */
  3103. /* position: relative; */
  3104. }
  3105. .contact-block {
  3106. position: relative;
  3107. }
  3108. .bottom-btn .l.l-kefu .icon {
  3109. position: absolute;
  3110. font-size: 44rpx;
  3111. top: 20rpx;
  3112. }
  3113. .bottom-btn .l.l-kefu text {
  3114. /* position: absolute;
  3115. top: 60rpx;
  3116. font-size: 22rpx; */
  3117. }
  3118. .bottom-btn .l.l-cart .box {
  3119. position: relative;
  3120. height: 80rpx;
  3121. width: 70rpx;
  3122. }
  3123. .bottom-btn .l.l-cart .box .txt {
  3124. position: absolute;
  3125. top: 50rpx;
  3126. font-size: 22rpx;
  3127. }
  3128. .bottom-btn .l.l-cart .cart-count {
  3129. height: 28rpx;
  3130. width: 28rpx;
  3131. z-index: 10;
  3132. position: absolute;
  3133. top: 0;
  3134. right: 0;
  3135. background: #b4282d;
  3136. text-align: center;
  3137. font-size: 18rpx;
  3138. color: #fff;
  3139. line-height: 28rpx;
  3140. border-radius: 50%;
  3141. }
  3142. .bottom-btn .l.l-cart .icon {
  3143. position: absolute;
  3144. top: 10rpx;
  3145. left: 0;
  3146. font-size: 44rpx;
  3147. }
  3148. .collect-wrapper,
  3149. .service-wrapper {
  3150. display: flex;
  3151. flex-direction: column;
  3152. justify-content: center;
  3153. flex: 1;
  3154. }
  3155. .collect-text {
  3156. margin: 10rpx 0 0;
  3157. }
  3158. .bottom-btn {
  3159. position: fixed;
  3160. left: 0rpx;
  3161. bottom: 0;
  3162. z-index: 10;
  3163. width: 750rpx;
  3164. min-height: 110rpx;
  3165. background: #fff;
  3166. padding: 12rpx 24rpx 18rpx;
  3167. z-index: 999;
  3168. display: flex;
  3169. /* align-items: center; */
  3170. padding-bottom: constant(safe-area-inset-bottom);
  3171. padding-bottom: env(safe-area-inset-bottom);
  3172. box-shadow: 4rpx -8rpx 16rpx 2rpx rgba(201, 205, 207, 0.25);
  3173. /* box-sizing: content-box; */
  3174. }
  3175. .bottom-btn .contact-block {
  3176. height: 80rpx;
  3177. width: 130rpx;
  3178. position: relative;
  3179. overflow: hidden;
  3180. margin-right: 10rpx;
  3181. }
  3182. .contact-btn {
  3183. height: 80rpx;
  3184. width: 130rpx;
  3185. position: absolute;
  3186. top: 0;
  3187. bottom: 0;
  3188. left: 0;
  3189. z-index: 99;
  3190. opacity: 0;
  3191. }
  3192. .contact-wrapper {
  3193. width: 130rpx;
  3194. height: 80rpx;
  3195. border: 2rpx solid #b3b4b6;
  3196. border-radius: 14rpx;
  3197. /* width: 120rpx; */
  3198. display: flex;
  3199. align-items: center;
  3200. justify-content: center;
  3201. position: absolute;
  3202. top: 0;
  3203. left: 0;
  3204. bottom: 0;
  3205. overflow: hidden;
  3206. padding: 4rpx 0;
  3207. }
  3208. .contact-img {
  3209. width: 24rpx;
  3210. height: 24rpx;
  3211. margin-right: 8rpx;
  3212. /* margin-bottom: 10rpx; */
  3213. }
  3214. .contact-wrapper .text {
  3215. font-size: 28rpx;
  3216. font-weight: bold;
  3217. color: #000;
  3218. height: 40rpx;
  3219. line-height: 40rpx;
  3220. }
  3221. .bottom-btn .share {
  3222. width: 280rpx;
  3223. background: #fff;
  3224. height: 82rpx;
  3225. font-size: 30rpx;
  3226. font-weight: bold;
  3227. color: #09afff;
  3228. text-align: center;
  3229. line-height: 82rpx;
  3230. border: 2rpx solid #09afff;
  3231. border-radius: 82rpx 0rpx 0 82rpx;
  3232. }
  3233. .bottom-btn .c {
  3234. width: 264rpx;
  3235. text-align: center;
  3236. height: 80rpx;
  3237. line-height: 80rpx;
  3238. background: #fe2b54;
  3239. border-radius: 15rpx;
  3240. color: #ffffff;
  3241. font-size: 30rpx;
  3242. }
  3243. .dis-order-wrapper {
  3244. width: 452rpx;
  3245. background: #09afff;
  3246. height: 82rpx;
  3247. font-size: 22rpx;
  3248. color: #fff;
  3249. border-radius: 82rpx;
  3250. text-align: center;
  3251. margin-right: 30rpx;
  3252. display: flex;
  3253. align-items: center;
  3254. overflow: hidden;
  3255. }
  3256. .dis-order-wrapper>view {
  3257. flex: 1;
  3258. text-align: center;
  3259. height: 82rpx;
  3260. }
  3261. .spread-order {
  3262. background: #fff;
  3263. border-radius: 0 82rpx 82rpx 0;
  3264. border: 1rpx solid #09afff;
  3265. border-left: none;
  3266. line-height: 24rpx;
  3267. }
  3268. .buy-type {
  3269. font-size: 30rpx;
  3270. font-weight: bold;
  3271. line-height: 30rpx;
  3272. margin: 10rpx 0 4rpx 0;
  3273. overflow: hidden;
  3274. }
  3275. .bottom-btn .r {
  3276. /*border: 1px solid #f48f18;*/
  3277. background: #09afff;
  3278. float: left;
  3279. height: 100rpx;
  3280. /* line-height: 66rpx; */
  3281. flex: 2;
  3282. text-align: center;
  3283. color: #fff;
  3284. margin-left: 15rpx;
  3285. margin-top: 15rpx;
  3286. margin-bottom: 15rpx;
  3287. border-top-left-radius: 50rpx;
  3288. border-bottom-left-radius: 50rpx;
  3289. }
  3290. .bottom-btn .r .title {
  3291. font-size: 46rpx;
  3292. height: 56rpx;
  3293. color: #fff;
  3294. }
  3295. .bottom-btn .r .subtitle {
  3296. font-size: 28rpx;
  3297. color: #fff;
  3298. font-weight: 100;
  3299. }
  3300. /* */
  3301. .attr-pop-box {
  3302. width: 100%;
  3303. height: 100%;
  3304. position: fixed;
  3305. background: rgba(0, 0, 0, 0.5);
  3306. z-index: 8;
  3307. bottom: 0;
  3308. /* display: none; */
  3309. }
  3310. .attr-pop {
  3311. width: 100%;
  3312. height: auto;
  3313. max-height: 780rpx;
  3314. padding: 31.25rpx;
  3315. background: #fff;
  3316. position: fixed;
  3317. z-index: 9;
  3318. bottom: 100rpx;
  3319. }
  3320. .attr-pop .close {
  3321. position: absolute;
  3322. width: 48rpx;
  3323. height: 48rpx;
  3324. right: 31.25rpx;
  3325. overflow: hidden;
  3326. top: 31.25rpx;
  3327. }
  3328. .attr-pop .close .icon {
  3329. width: 48rpx;
  3330. height: 48rpx;
  3331. }
  3332. .attr-pop .img-info {
  3333. width: 687.5rpx;
  3334. height: 177rpx;
  3335. overflow: hidden;
  3336. margin-bottom: 41.5rpx;
  3337. }
  3338. .attr-pop .img {
  3339. float: left;
  3340. height: 177rpx;
  3341. width: 177rpx;
  3342. background: #f4f4f4;
  3343. margin-right: 31.25rpx;
  3344. }
  3345. .attr-pop .info {
  3346. float: left;
  3347. height: 177rpx;
  3348. display: flex;
  3349. align-items: center;
  3350. }
  3351. .attr-pop .p {
  3352. font-size: 33rpx;
  3353. color: #333;
  3354. height: 33rpx;
  3355. line-height: 33rpx;
  3356. margin-bottom: 10rpx;
  3357. }
  3358. .attr-pop .a {
  3359. font-size: 29rpx;
  3360. color: #333;
  3361. height: 40rpx;
  3362. line-height: 40rpx;
  3363. }
  3364. .spec-con {
  3365. width: 100%;
  3366. height: auto;
  3367. overflow: hidden;
  3368. }
  3369. .spec-con .name {
  3370. margin-bottom: 6rpx;
  3371. font-size: 29rpx;
  3372. color: #333;
  3373. }
  3374. .spec-con .values {
  3375. height: auto;
  3376. margin-bottom: 10rpx;
  3377. font-size: 0;
  3378. }
  3379. .spec-con .value {
  3380. display: inline-block;
  3381. height: 62rpx;
  3382. padding: 0 35rpx;
  3383. line-height: 56rpx;
  3384. text-align: center;
  3385. margin-right: 25rpx;
  3386. margin-bottom: 16.5rpx;
  3387. border: 1px solid #333;
  3388. font-size: 25rpx;
  3389. color: #333;
  3390. }
  3391. .spec-con .value.disable {
  3392. border: 1px solid #ccc;
  3393. color: #ccc;
  3394. }
  3395. .spec-con .value.selected {
  3396. border: 1px solid #b4282d;
  3397. color: #b4282d;
  3398. }
  3399. .number-item .selnum {
  3400. width: 200rpx;
  3401. /* width: 322rpx; */
  3402. height: 71rpx;
  3403. border: 1px solid #ccc;
  3404. display: flex;
  3405. }
  3406. .number-item .cut {
  3407. width: 93.75rpx;
  3408. height: 100%;
  3409. text-align: center;
  3410. line-height: 65rpx;
  3411. }
  3412. .number-item .number {
  3413. flex: 1;
  3414. height: 100%;
  3415. text-align: center;
  3416. line-height: 68.75rpx;
  3417. border-left: 1px solid #ccc;
  3418. border-right: 1px solid #ccc;
  3419. float: left;
  3420. }
  3421. .number-item .add {
  3422. width: 93.75rpx;
  3423. height: 100%;
  3424. text-align: center;
  3425. line-height: 65rpx;
  3426. }
  3427. .contact {
  3428. height: 100rpx;
  3429. width: 100rpx;
  3430. border-radius: 100%;
  3431. position: fixed;
  3432. bottom: 96rpx;
  3433. right: 10rpx;
  3434. font-size: 20rpx;
  3435. box-sizing: border-box;
  3436. /* background: url('../../static/images/customer.png') no-repeat center 21rpx; */
  3437. background-size: 55rpx auto;
  3438. }
  3439. .share-pop-box {
  3440. width: 100%;
  3441. height: 100%;
  3442. position: fixed;
  3443. background: rgba(0, 0, 0, 0.5);
  3444. z-index: 8;
  3445. bottom: 0;
  3446. /* display: none; */
  3447. }
  3448. .share-pop {
  3449. width: 100%;
  3450. height: auto;
  3451. max-height: 780rpx;
  3452. padding: 31.25rpx;
  3453. background: #fff;
  3454. position: fixed;
  3455. z-index: 9;
  3456. bottom: 100rpx;
  3457. }
  3458. .share-pop .close {
  3459. position: absolute;
  3460. width: 48rpx;
  3461. height: 48rpx;
  3462. right: 31.25rpx;
  3463. top: 31.25rpx;
  3464. }
  3465. .share-pop .close .icon {
  3466. width: 48rpx;
  3467. height: 48rpx;
  3468. }
  3469. .share-pop .share-info {
  3470. width: 100%;
  3471. height: 225rpx;
  3472. overflow: hidden;
  3473. margin-bottom: 41.5rpx;
  3474. }
  3475. .sharebtn {
  3476. top: 75rpx;
  3477. background: none !important;
  3478. font-size: 32rpx;
  3479. color: #fff !important;
  3480. border-radius: 0%;
  3481. width: 175rpx;
  3482. height: 150rpx;
  3483. text-align: center;
  3484. display: flex;
  3485. justify-content: center;
  3486. align-items: center;
  3487. flex-wrap: wrap;
  3488. float: left;
  3489. background: #fff;
  3490. border-bottom: 0px solid #fafafa;
  3491. margin-left: 15%;
  3492. }
  3493. .sharebtn::after {
  3494. border: none;
  3495. border-radius: 0%;
  3496. }
  3497. .savesharebtn {
  3498. top: 75rpx;
  3499. background: none !important;
  3500. font-size: 32rpx;
  3501. color: #fff !important;
  3502. border-radius: 0%;
  3503. width: 175rpx;
  3504. height: 150rpx;
  3505. text-align: center;
  3506. display: flex;
  3507. justify-content: center;
  3508. align-items: center;
  3509. flex-wrap: wrap;
  3510. float: right;
  3511. background: #fff;
  3512. border-bottom: 0px solid #fafafa;
  3513. margin-right: 15%;
  3514. }
  3515. .savesharebtn::after {
  3516. border: none;
  3517. border-radius: 0%;
  3518. }
  3519. .sharebtn_image {
  3520. /* border: 1px solid #757575; */
  3521. width: 128rpx;
  3522. height: 128rpx;
  3523. margin-top: 0rpx;
  3524. }
  3525. .sharebtn_text {
  3526. /* border: 1px solid #757575; */
  3527. width: 150rpx;
  3528. margin-bottom: 2rpx;
  3529. height: 20rpx;
  3530. line-height: 20rpx;
  3531. font-size: 20rpx;
  3532. color: #555;
  3533. }
  3534. .separate {
  3535. background: #e0e3da;
  3536. width: 100%;
  3537. height: 6rpx;
  3538. }
  3539. /* 新客角标 */
  3540. .isNew {
  3541. position: absolute;
  3542. width: 80rpx;
  3543. height: 120rpx;
  3544. right: 30rpx;
  3545. z-index: 999;
  3546. }
  3547. /* 自购/推广弹框 */
  3548. .overlay-wrapper {
  3549. display: flex;
  3550. align-items: center;
  3551. justify-content: center;
  3552. height: 100%;
  3553. }
  3554. .tips-wrapper {
  3555. width: 588rpx;
  3556. height: 462rpx;
  3557. border-radius: 10rpx;
  3558. background: #fff;
  3559. font-size: 26rpx;
  3560. display: flex;
  3561. flex-direction: column;
  3562. justify-content: space-between;
  3563. }
  3564. .tips-top {
  3565. display: flex;
  3566. flex-direction: column;
  3567. align-items: center;
  3568. padding: 0 40rpx;
  3569. }
  3570. .tips-title {
  3571. font-size: 34rpx;
  3572. font-weight: bold;
  3573. margin: 66rpx 0 24rpx;
  3574. }
  3575. .tips-bottom {
  3576. height: 132rpx;
  3577. border-top: 2rpx solid #e4e4e4;
  3578. display: flex;
  3579. justify-content: space-around;
  3580. align-items: center;
  3581. }
  3582. .tips-bottom .btn-devide {
  3583. width: 2rpx;
  3584. height: 130rpx;
  3585. background: #e4e4e4;
  3586. }
  3587. .cancel-btn {
  3588. width: 202rpx;
  3589. height: 72rpx;
  3590. line-height: 72rpx;
  3591. border: 2rpx solid #85868a;
  3592. color: #282728;
  3593. border-radius: 72rpx;
  3594. text-align: center;
  3595. overflow: hidden;
  3596. }
  3597. .repay-btn {
  3598. width: 202rpx;
  3599. height: 72rpx;
  3600. line-height: 72rpx;
  3601. background: #09afff;
  3602. color: #fff;
  3603. border-radius: 72rpx;
  3604. text-align: center;
  3605. }
  3606. .notip-again {
  3607. padding-left: 40rpx;
  3608. display: flex;
  3609. align-items: center;
  3610. }
  3611. .user-agree {
  3612. /* color:#85868A; */
  3613. font-size: 26rpx;
  3614. margin-left: 8rpx;
  3615. }
  3616. /* 海报的样式 */
  3617. .poster {
  3618. position: absolute;
  3619. top: 20rpx;
  3620. z-index: 99;
  3621. text-align: center;
  3622. left: 0;
  3623. bottom: 0;
  3624. right: 0;
  3625. }
  3626. .title {
  3627. color: #fff;
  3628. margin: 20rpx 0;
  3629. font-size: 30rpx;
  3630. display: flex;
  3631. justify-content: center;
  3632. text-align: left;
  3633. }
  3634. .title text {
  3635. width: 480rpx;
  3636. }
  3637. .ads {
  3638. color: #fff;
  3639. text-align: left;
  3640. margin: 20rpx auto;
  3641. display: flex;
  3642. justify-content: center;
  3643. }
  3644. .tool {
  3645. display: flex;
  3646. text-align: center;
  3647. justify-content: baseline;
  3648. width: 100%;
  3649. margin-top: 20rpx;
  3650. }
  3651. .tool view {
  3652. flex: 1;
  3653. }
  3654. .img {
  3655. width: 107rpx;
  3656. height: 128rpx;
  3657. }
  3658. .closeImg {
  3659. width: 57rpx;
  3660. height: 57rpx;
  3661. }
  3662. .share-btn {
  3663. background-color: transparent;
  3664. flex: 1;
  3665. }
  3666. .share-btn::after {
  3667. border: none;
  3668. }
  3669. /* 商品价格 销量 */
  3670. .goods-info-new {
  3671. margin-top: -8rpx;
  3672. border-radius: 20rpx 20rpx 0 0;
  3673. background: #f3f3f3;
  3674. width: 750rpx;
  3675. /* height:138rpx; */
  3676. padding: 30rpx 24rpx 26rpx;
  3677. position: relative;
  3678. z-index: 99;
  3679. box-sizing: border-box;
  3680. }
  3681. .price-line {
  3682. height: 38rpx;
  3683. display: flex;
  3684. align-items: flex-end;
  3685. }
  3686. .price-line .real-price {
  3687. color: #fe2b54;
  3688. font-size: 24rpx;
  3689. }
  3690. .price-line .real-price text.bold-price {
  3691. font-size: 40rpx;
  3692. font-weight: bold;
  3693. height: 30rpx;
  3694. line-height: 30rpx;
  3695. }
  3696. .price-line .sale-price {
  3697. color: #999999;
  3698. font-size: 24rpx;
  3699. flex: 1;
  3700. margin-left: 8rpx;
  3701. text-decoration: line-through;
  3702. }
  3703. .price-line .sale-num {
  3704. color: #acadb1;
  3705. font-size: 24rpx;
  3706. }
  3707. .goods-coupon {
  3708. display: flex;
  3709. flex-wrap: wrap;
  3710. margin-top: 20rpx;
  3711. }
  3712. .goods-coupon .goupon-tag {
  3713. height: 30rpx;
  3714. line-height: 30rpx;
  3715. background: rgba(254, 43, 84, 0.1);
  3716. /* opacity: 0.9; */
  3717. border-radius: 5px;
  3718. padding: 0 10rpx;
  3719. margin-right: 10rpx;
  3720. color: #fe2b54;
  3721. font-size: 20rpx;
  3722. }
  3723. /* 服务 须知 门店 */
  3724. .other-info {
  3725. padding: 30rpx 24rpx 16rpx;
  3726. background: #fff;
  3727. border-radius: 24rpx;
  3728. width: 702rpx;
  3729. margin: 0 24rpx;
  3730. }
  3731. .other-info .name {
  3732. color: #000000;
  3733. font-size: 36rpx;
  3734. line-height: 36rpx;
  3735. font-weight: bold;
  3736. padding-bottom: 12rpx;
  3737. }
  3738. .other-info .common-info {
  3739. line-height: 36rpx;
  3740. display: flex;
  3741. /* min-height: 52rpx; */
  3742. /* align-items: center; */
  3743. margin-top: 14rpx;
  3744. }
  3745. .common-info .info-title {
  3746. font-size: 24rpx;
  3747. color: #666;
  3748. margin-right: 26rpx;
  3749. }
  3750. .common-info .info-content {
  3751. font-size: 24rpx;
  3752. color: #000;
  3753. flex: 1;
  3754. }
  3755. .common-info image {
  3756. width: 10rpx;
  3757. height: 20rpx;
  3758. }
  3759. /* 加购数量 */
  3760. .num-module {
  3761. width: 702rpx;
  3762. /* height: 174rpx; */
  3763. background: #ffffff;
  3764. border-radius: 24rpx;
  3765. margin: 14rpx 24rpx 28rpx;
  3766. padding: 32rpx 24rpx;
  3767. }
  3768. .plus-buy {
  3769. height: 30rpx;
  3770. margin: 0 0 28rpx;
  3771. display: flex;
  3772. align-items: center;
  3773. }
  3774. .num-module .title {
  3775. color: #666;
  3776. font-size: 30rpx;
  3777. /* margin-right:20rpx; */
  3778. width: 80rpx;
  3779. }
  3780. .plus-buy .plus-name {
  3781. font-size: 30rpx;
  3782. color: #010101;
  3783. }
  3784. .plus-buy .plus-name text {
  3785. color: #fe2b54;
  3786. font-weight: bold;
  3787. }
  3788. .plus-num {
  3789. display: flex;
  3790. justify-content: space-between;
  3791. height: 72rpx;
  3792. align-items: center;
  3793. }
  3794. .calc-counter {
  3795. height: 72rpx;
  3796. border-radius: 72rpx;
  3797. display: flex;
  3798. align-items: center;
  3799. border: 2rpx solid #d2d2d2;
  3800. box-sizing: border-box;
  3801. overflow: hidden;
  3802. line-height: 72rpx;
  3803. }
  3804. .calc-counter .minus-btn.disable,
  3805. .calc-counter .plus-btn.disable {
  3806. color: #d2d2d2;
  3807. }
  3808. .calc-counter .plus-btn,
  3809. .calc-counter .minus-btn {
  3810. width: 82rpx;
  3811. text-align: center;
  3812. color: #666;
  3813. line-height: 72rpx;
  3814. font-weight: bold;
  3815. padding-bottom: 4rpx;
  3816. font-size: 36rpx;
  3817. }
  3818. .calc-counter .num-input {
  3819. color: #010101;
  3820. font-size: 30rpx;
  3821. border-left: 2rpx solid #d2d2d2;
  3822. border-right: 2rpx solid #d2d2d2;
  3823. width: 72rpx;
  3824. text-align: center;
  3825. height: 72rpx;
  3826. }
  3827. /* 选择规格 */
  3828. .sku-wrapper {
  3829. width: 702rpx;
  3830. background: #ffffff;
  3831. border-radius: 24rpx;
  3832. margin: 16rpx 24rpx 0;
  3833. padding-bottom: 30rpx;
  3834. overflow: hidden;
  3835. }
  3836. .sku-info {
  3837. height: 90rpx;
  3838. position: relative;
  3839. }
  3840. .sku-left {
  3841. width: 700rpx;
  3842. overflow: hidden;
  3843. line-height: 90rpx;
  3844. padding-left: 24rpx;
  3845. display: flex;
  3846. align-items: center;
  3847. height: 90rpx;
  3848. }
  3849. .sku-left view {
  3850. color: #666;
  3851. font-size: 30rpx;
  3852. }
  3853. .sku-left view.current-sku {
  3854. color: #010101;
  3855. margin-left: 18rpx;
  3856. }
  3857. .sku-right {
  3858. position: absolute;
  3859. right: 0;
  3860. top: 0;
  3861. bottom: 0;
  3862. height: 90rpx;
  3863. display: flex;
  3864. align-items: center;
  3865. padding-right: 24rpx;
  3866. width: 120rpx;
  3867. background: linear-gradient(to right, rgba(255, 255, 255, 0.3), #fff 60%);
  3868. /* background:url("https://jzmall.lifejingzhi.com/file/jzmall/weixin/sku-bg.png") no-repeat center;
  3869. background-size: 100% 100%; */
  3870. z-index: 99;
  3871. justify-content: flex-end;
  3872. }
  3873. .sku-right image {
  3874. width: 10rpx;
  3875. height: 20rpx;
  3876. }
  3877. .all-sku {
  3878. display: flex;
  3879. flex-wrap: wrap;
  3880. padding: 0 30rpx 0 98rpx;
  3881. }
  3882. .all-sku .sku-thumb {
  3883. width: 70rpx;
  3884. height: 70rpx;
  3885. border-radius: 10rpx;
  3886. margin-right: 14rpx;
  3887. }
  3888. .all-sku view {
  3889. font-size: 24rpx;
  3890. color: #666;
  3891. line-height: 70rpx;
  3892. margin-left: 24rpx;
  3893. }
  3894. /* 团购评价 */
  3895. .group-evaluation {
  3896. width: 702rpx;
  3897. background: #ffffff;
  3898. border: 1rpx solid #f5f5f5;
  3899. border-radius: 25rpx;
  3900. padding: 30rpx 24rpx 0;
  3901. margin: 16rpx 24rpx;
  3902. }
  3903. .group-evaluation .title {
  3904. height: 40rpx;
  3905. line-height: 40rpx;
  3906. display: flex;
  3907. justify-content: space-between;
  3908. align-items: center;
  3909. }
  3910. .group-evaluation .title .left {
  3911. font-size: 32rpx;
  3912. line-height: 40rpx;
  3913. color: #000;
  3914. font-weight: bold;
  3915. flex: 1;
  3916. }
  3917. .group-evaluation .title .right {
  3918. color: #666;
  3919. font-size: 28rpx;
  3920. display: flex;
  3921. align-items: center;
  3922. justify-content: space-between;
  3923. }
  3924. .group-evaluation .arrow-img {
  3925. width: 12rpx;
  3926. height: 20rpx;
  3927. margin-left: 6rpx;
  3928. }
  3929. .evaluation-item {
  3930. padding: 30rpx 8rpx 30rpx 0;
  3931. padding-right: 8rpx;
  3932. border-bottom: 1rpx solid #f3f3f3;
  3933. display: flex;
  3934. align-items: center;
  3935. justify-content: space-between;
  3936. }
  3937. .evaluation-item:last-child {
  3938. border: none;
  3939. }
  3940. .evaluation-item .item-left {
  3941. width: 510rpx;
  3942. }
  3943. .eval-top {
  3944. display: flex;
  3945. height: 44rpx;
  3946. align-items: center;
  3947. }
  3948. .eval-top .avatar {
  3949. width: 44rpx;
  3950. height: 44rpx;
  3951. border-radius: 44rpx;
  3952. }
  3953. .eval-top .name {
  3954. margin: 0 10rpx;
  3955. font-size: 28rpx;
  3956. color: #000;
  3957. }
  3958. .eval-top .tag {
  3959. height: 38rpx;
  3960. line-height: 38rpx;
  3961. background: rgba(1, 187, 243, 0.1);
  3962. border-radius: 10rpx;
  3963. color: #01bbf3;
  3964. font-size: 24rpx;
  3965. padding: 0 12rpx;
  3966. margin-right: 10rpx;
  3967. }
  3968. .eval-top .hp {
  3969. height: 38rpx;
  3970. line-height: 38rpx;
  3971. background: rgba(255, 71, 71, 0.1);
  3972. border-radius: 10rpx;
  3973. color: #ff5252;
  3974. font-size: 24rpx;
  3975. padding: 0 12rpx;
  3976. }
  3977. .eval-content {
  3978. display: -webkit-box;
  3979. -webkit-box-orient: vertical;
  3980. -webkit-line-clamp: 2;
  3981. text-overflow: ellipsis;
  3982. overflow: hidden;
  3983. line-height: 36rpx;
  3984. margin-top: 8rpx;
  3985. font-size: 26rpx;
  3986. color: #333;
  3987. }
  3988. .evaluation-item .item-right {
  3989. width: 100rpx;
  3990. height: 100rpx;
  3991. }
  3992. .evaluation-item .item-right image {
  3993. width: 100rpx;
  3994. height: 100rpx;
  3995. border-radius: 10rpx;
  3996. }
  3997. /* 产品推荐 */
  3998. .recommend-title {
  3999. height: 103rpx;
  4000. line-height: 102rpx;
  4001. text-align: center;
  4002. color: #000000;
  4003. font-size: 33rpx;
  4004. /* margin-top:-20rpx; */
  4005. }
  4006. .recommend-list {
  4007. display: flex;
  4008. justify-content: space-between;
  4009. flex-wrap: wrap;
  4010. width: 702rpx;
  4011. margin: 0 24rpx;
  4012. }
  4013. .recommend-item {
  4014. width: 334rpx;
  4015. height: 510rpx;
  4016. background: #ffffff;
  4017. border-radius: 20rpx;
  4018. display: flex;
  4019. flex-direction: column;
  4020. margin: 0 0 20rpx;
  4021. }
  4022. .recommend-item image {
  4023. width: 334rpx;
  4024. height: 334rpx;
  4025. margin-bottom: 20rpx;
  4026. border-radius: 20rpx;
  4027. }
  4028. .recommend-goods-name {
  4029. font-size: 26rpx;
  4030. line-height: 40rpx;
  4031. height: 80rpx;
  4032. width: 294rpx;
  4033. display: -webkit-box;
  4034. -webkit-box-orient: vertical;
  4035. -webkit-line-clamp: 2;
  4036. text-overflow: ellipsis;
  4037. overflow: hidden;
  4038. margin: 0 20rpx;
  4039. /* text-indent: -12rpx; */
  4040. color: #333;
  4041. }
  4042. .recommend-goods-price {
  4043. color: #fe2957;
  4044. font-size: 28rpx;
  4045. margin: 10rpx 20rpx 0;
  4046. height: 56rpx;
  4047. }
  4048. .recommend-goods-price text {
  4049. font-size: 36rpx;
  4050. }
  4051. /* 购买提醒 */
  4052. .buy-toast {
  4053. height: 44rpx;
  4054. min-width: 284rpx;
  4055. position: absolute;
  4056. top: 410rpx;
  4057. left: 24rpx;
  4058. background: rgba(0, 0, 0, 0.5);
  4059. border-radius: 45rpx;
  4060. }
  4061. .toast-swiper {
  4062. height: 44rpx;
  4063. width: 320rpx;
  4064. }
  4065. .toast-item {
  4066. align-items: center;
  4067. display: flex;
  4068. height: 44rpx;
  4069. padding: 0 14rpx 0 10rpx;
  4070. }
  4071. .toast-item image {
  4072. width: 28rpx;
  4073. height: 28rpx;
  4074. border-radius: 28rpx;
  4075. margin-right: 8rpx;
  4076. }
  4077. .toast-item view {
  4078. font-size: 24rpx;
  4079. color: #fff;
  4080. white-space: nowrap;
  4081. }
  4082. /* 规格弹框 */
  4083. .appoint-overlay-wrapper {
  4084. position: fixed;
  4085. top: 0;
  4086. left: 0;
  4087. width: 100%;
  4088. height: 100%;
  4089. background-color: rgba(0, 0, 0, 0.7);
  4090. z-index: 9999;
  4091. display: flex;
  4092. align-items: flex-end;
  4093. }
  4094. .spu-popup {
  4095. /* height: 784rpx; */
  4096. width: 690rpx;
  4097. background: #fff;
  4098. padding: 40rpx 20rpx;
  4099. border-radius: 20rpx 20rpx 0 0;
  4100. margin: 0 30rpx;
  4101. }
  4102. .popup-good {
  4103. height: 130rpx;
  4104. display: flex;
  4105. padding: 0 0 30rpx 0;
  4106. border-bottom: 1rpx solid #eee;
  4107. justify-content: space-between;
  4108. }
  4109. .popup-good .left {
  4110. display: flex;
  4111. align-items: flex-end;
  4112. }
  4113. .popup-good .left image {
  4114. width: 100rpx;
  4115. height: 100rpx;
  4116. border-radius: 10rpx;
  4117. }
  4118. .popup-good .spu-price {
  4119. color: #ff1643;
  4120. font-size: 34rpx;
  4121. font-weight: bold;
  4122. margin: 0 14rpx 0 20rpx;
  4123. line-height: 30rpx;
  4124. }
  4125. .popup-good .spu-price text {
  4126. font-size: 48rpx;
  4127. }
  4128. .popup-good .spu-price-old {
  4129. text-decoration: line-through;
  4130. color: #999999;
  4131. font-size: 24rpx;
  4132. }
  4133. .sku-close {
  4134. width: 48rpx;
  4135. height: 48rpx;
  4136. }
  4137. .sku-list-block {
  4138. min-height: 420rpx;
  4139. padding-bottom: 40rpx;
  4140. }
  4141. .sku-list-block .spu-title {
  4142. height: 86rpx;
  4143. line-height: 86rpx;
  4144. font-weight: bold;
  4145. font-size: 28rpx;
  4146. }
  4147. .sku-list-block .sku-item {
  4148. margin-bottom: 12rpx;
  4149. display: flex;
  4150. background: rgb(250, 250, 250);
  4151. border-radius: 8rpx;
  4152. align-items: center;
  4153. justify-content: space-between;
  4154. height: 140rpx;
  4155. padding: 0 40rpx;
  4156. }
  4157. .sku-list-block .sku-item view {
  4158. font-size: 30rpx;
  4159. color: #333;
  4160. }
  4161. .sku-list-block .sku-item view.sku-price {
  4162. color: rgb(233, 86, 81);
  4163. font-weight: bold;
  4164. font-size: 32rpx;
  4165. }
  4166. .sku-list-block .sku-item.active-sku {
  4167. color: #00c0ff;
  4168. background: rgb(255, 249, 247);
  4169. border: 1rpx solid #fe2b54;
  4170. }
  4171. .sku-list-block .sku-item.active-sku view {
  4172. color: #fe2b54;
  4173. }
  4174. .sku-btn {
  4175. width: 638rpx;
  4176. height: 90rpx;
  4177. border-radius: 12rpx;
  4178. line-height: 90rpx;
  4179. text-align: center;
  4180. color: #ffff;
  4181. /* background: #00B9FF; */
  4182. background: rgb(231, 71, 93);
  4183. font-size: 32rpx;
  4184. margin: 20rpx 6rpx 0;
  4185. /* font-weight: bold; */
  4186. }
  4187. .final-price {
  4188. flex: 1;
  4189. display: flex;
  4190. align-items: center;
  4191. height: 80rpx;
  4192. margin-left: 12rpx;
  4193. }
  4194. .final-price .total-new {
  4195. color: #ff1643;
  4196. font-size: 32rpx;
  4197. }
  4198. .final-price .total-new text {
  4199. font-size: 46rpx;
  4200. font-weight: bold;
  4201. }
  4202. .final-price .total-old {
  4203. text-decoration: line-through;
  4204. font-size: 24rpx;
  4205. color: #999;
  4206. margin-left: 12rpx;
  4207. padding-top: 10rpx;
  4208. }
  4209. /* 关联工单 */
  4210. .service-list {
  4211. margin: 0 24rpx;
  4212. }
  4213. .service-item {
  4214. margin-top: 24rpx;
  4215. background: #ffffff;
  4216. border-radius: 24rpx;
  4217. width: 702rpx;
  4218. padding: 0 24rpx;
  4219. }
  4220. .order-title {
  4221. height: 100rpx;
  4222. line-height: 100rpx;
  4223. font-weight: bold;
  4224. color: #000;
  4225. font-size: 32rpx;
  4226. border-bottom: 2rpx solid #e0e0e0;
  4227. }
  4228. .service-item .service-title {
  4229. height: 80rpx;
  4230. display: flex;
  4231. align-items: center;
  4232. border-bottom: 2rpx solid #e0e0e0;
  4233. }
  4234. .service-title .sercive-name {
  4235. color: #191919;
  4236. font-size: 30rpx;
  4237. font-weight: bold;
  4238. }
  4239. .service-title .service-id {
  4240. color: #666666;
  4241. font-size: 24rpx;
  4242. margin: 0 12rpx 0 0;
  4243. flex: 1;
  4244. }
  4245. .service-title .service-status {
  4246. color: #008dff;
  4247. font-size: 26rpx;
  4248. }
  4249. .service-main {
  4250. padding: 12rpx 0 16rpx;
  4251. }
  4252. .customer-info {
  4253. display: flex;
  4254. align-items: center;
  4255. }
  4256. .customer-info image {
  4257. width: 48rpx;
  4258. height: 48rpx;
  4259. margin-right: 24rpx;
  4260. }
  4261. .customer-info .customer-main {
  4262. display: flex;
  4263. padding: 18rpx 0 4rpx;
  4264. flex-direction: column;
  4265. flex: 1;
  4266. }
  4267. .main-line {
  4268. display: flex;
  4269. height: 44rpx;
  4270. margin-bottom: 4rpx;
  4271. align-items: center;
  4272. }
  4273. .main-line view {
  4274. color: #333333;
  4275. font-size: 32rpx;
  4276. }
  4277. .main-line view.phone {
  4278. color: #999999;
  4279. font-size: 24rpx;
  4280. margin-left: 14rpx;
  4281. }
  4282. .customer-info .customer-address {
  4283. color: #666666;
  4284. line-height: 40rpx;
  4285. }
  4286. .service-main .row {
  4287. /* height: 56rpx;
  4288. line-height: 56rpx; */
  4289. display: flex;
  4290. color: rgba(0, 0, 0, 0.9);
  4291. font-size: 26rpx;
  4292. font-weight: bold;
  4293. align-items: center;
  4294. margin: 10rpx 0;
  4295. }
  4296. .service-main .row text {
  4297. color: #666666;
  4298. font-weight: normal;
  4299. /* white-space: nowrap; */
  4300. }
  4301. .service-remark-wrapper {
  4302. padding: 24rpx 0;
  4303. border-top: 2rpx solid #e0e0e0;
  4304. }
  4305. .service-store {
  4306. height: 36rpx;
  4307. display: flex;
  4308. align-items: center;
  4309. justify-content: space-between;
  4310. }
  4311. .service-store>view {
  4312. display: flex;
  4313. height: 36rpx;
  4314. align-items: center;
  4315. }
  4316. .store-left image {
  4317. width: 36rpx;
  4318. height: 36rpx;
  4319. margin-right: 16rpx;
  4320. }
  4321. .store-left view {
  4322. color: rgba(0, 0, 0, 0.9);
  4323. font-size: 26rpx;
  4324. font-weight: bold;
  4325. }
  4326. .store-right view {
  4327. color: #666666;
  4328. font-size: 24rpx;
  4329. }
  4330. .store-right image {
  4331. width: 24rpx;
  4332. height: 24rpx;
  4333. margin-left: 16rpx;
  4334. }
  4335. .service-remark-wrapper .service-remark {
  4336. width: 652rpx;
  4337. /* height: 56rpx; */
  4338. line-height: 44rpx;
  4339. background: #ebebeb;
  4340. border-radius: 16rpx;
  4341. color: #000000;
  4342. padding: 8rpx 16rpx;
  4343. /* white-space: nowrap;
  4344. text-overflow: ellipsis;*/
  4345. display: -webkit-box;
  4346. -webkit-box-orient: vertical;
  4347. -webkit-line-clamp: 2;
  4348. text-overflow: ellipsis;
  4349. overflow: hidden;
  4350. margin-top: 20rpx;
  4351. }
  4352. .service-remark text {
  4353. color: #fe2b54;
  4354. font-weight: bold;
  4355. }
  4356. .service-operate {
  4357. padding: 24rpx 0;
  4358. border-top: 2rpx solid #e0e0e0;
  4359. display: flex;
  4360. justify-content: flex-end;
  4361. }
  4362. .service-operate view {
  4363. width: 160rpx;
  4364. height: 56rpx;
  4365. line-height: 56rpx;
  4366. border-radius: 28rpx;
  4367. text-align: center;
  4368. color: #f9f4f5;
  4369. font-size: 24rpx;
  4370. background: linear-gradient(90deg, #00baff 0%, #008dff 100%);
  4371. margin-left: 28rpx;
  4372. }
  4373. .sku-popup-title {
  4374. font-weight: bold;
  4375. font-size: 32rpx;
  4376. color: #333;
  4377. padding-left: 20rpx;
  4378. }
  4379. .sku-popup-tips {
  4380. color: #888;
  4381. font-size: 24rpx;
  4382. padding: 10rpx 0 32rpx 20rpx;
  4383. border-bottom: 1rpx solid #eee;
  4384. margin-bottom: 32rpx;
  4385. }
  4386. .xinke{
  4387. position: absolute;
  4388. background-color: #DB1A1A;
  4389. margin-left: 505rpx;
  4390. margin-top: -102rpx;
  4391. width: 110rpx;
  4392. height: 38rpx;
  4393. float: right;
  4394. line-height: 40rpx;
  4395. text-align: center;
  4396. color: white;
  4397. border-bottom-left-radius: 20rpx;
  4398. font-size:22rpx;
  4399. border-top-right-radius: 14rpx;
  4400. }
  4401. </style>