product.vue 121 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129
  1. <template>
  2. <view class="product " :style="{
  3. paddingBottom: userIdentity == 1 && userIdentity == 3 ? '0rpx' : '188rpx',
  4. paddingTop: CustomBar + 'px'
  5. }">
  6. <custom-p v-if="isHeaderPoduct" :systeminfo="systeminfo" :navbar-data="nvabarData"
  7. :headerBtnPosi="headerBtnPosi" :headerColor="headerColor" :type="isShareType" :page="backPage" />
  8. <view class="product-topnav" id="topBar" v-show="isNavbarFiexd" :class="navbarFiexd"
  9. :style="{ top: CustomBar - 2 + 'px' }">
  10. <view class="search-input">
  11. <view class="gosearch-btn" :class="navbarFiexd" @click="this.$api.navigateTo(clickPath)">
  12. <view class="search-icon"><text class="iconfont icon-iconfonticonfontsousuo1"></text></view>
  13. <view class="search-text">搜索商品/项目仪器</view>
  14. </view>
  15. </view>
  16. <view class="navbar">
  17. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 0 }"
  18. @click="tabClick(0)">
  19. <text>详情</text> <text class="line"></text>
  20. </view>
  21. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 1 }"
  22. @click="tabClick(1)">
  23. <text>服务项目</text> <text class="line"></text>
  24. </view>
  25. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 2 }"
  26. @click="tabClick(2)" v-if="product.qualificationImg">
  27. <text>商品资质</text> <text class="line"></text>
  28. </view>
  29. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 3 }"
  30. @click="tabClick(3)">
  31. <text>推荐</text> <text class="line"></text>
  32. </view>
  33. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 4 }"
  34. @click="tabClick(4)" v-if="product.archiveId !== 0 && userInfo.userIdentity !== 3">
  35. <text>相关资料</text> <text class="line"></text>
  36. </view>
  37. </view>
  38. </view>
  39. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading="true"
  40. :loadingType="5" />
  41. <template v-else>
  42. <view class="cart-content empty" v-if="isInvalid">
  43. <view class="empty-container">
  44. <image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
  45. <text class="error-text">商品已失效,去商城逛逛别的吧~</text>
  46. <view class="login-btn" @click="goIndex">去商城</view>
  47. </view>
  48. </view>
  49. <view class="container-product tui-skeleton" v-else>
  50. <view class="container-product-main">
  51. <view class="product-top">
  52. <view class="banner-section">
  53. <view class="cm-product-type" v-if="product.productType == 2">医疗器械</view>
  54. <view class="cm-product-cover" v-if="product.appletsActType === 1"></view>
  55. <uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode">
  56. <swiper class="banner tui-banner tui-skeleton-rect" @change="swiperChange"
  57. :duration="800" :autoplay="false" :circular="true">
  58. <swiper-item v-for="(item, index) in productImage" :key="index" class="banner-item">
  59. <image :src="item" @click="previewImg(index)" class="product-img" />
  60. </swiper-item>
  61. </swiper>
  62. <view class="swiper__dots-box">
  63. <tui-tag padding="12rpx 24rpx" type="translucent" shape="circleLeft" size="32rpx"
  64. :scaleMultiple="0.82" originRight>
  65. {{ current + 1 }}/{{ productImage && productImage.length }}
  66. </tui-tag>
  67. </view>
  68. </uni-swiper-dot>
  69. </view>
  70. <view class="product-wrap clearfix">
  71. <view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
  72. <view class="wrap-top-price">
  73. <cm-price v-if="isRequest" :product="product" :userIdentity="userIdentity"
  74. :shopID="shopID" :promotions="product.promotions"
  75. :ladderPriceList="ladderPriceList" />
  76. </view>
  77. <view class="p-title tui-skeleton-fillet">
  78. <view class="mclap-tag" v-if="product.beautyActFlag == '1'">美博会</view>
  79. <view class="p-title-name" :class="product.beautyActFlag == '1' ? 'indent' : ''">
  80. {{ product.name == undefined ? '' : product.name }}
  81. </view>
  82. <button open-type="share" class="p-title-share tui-share-position"
  83. v-if="userInfo.userIdentity !== 1">
  84. <text class="iconfont icon-weixin"></text>
  85. </button>
  86. <button class="p-title-share tui-share-position" @click="handleShare" v-else>
  87. <text class="iconfont icon-weixin"></text>
  88. </button>
  89. </view>
  90. <view class="wrap-label" v-if="product.tagsList && product.tagsList.length > 0">
  91. <view class="label-a tui-skeleton-fillet" v-for="(label, index) in product.tagsList"
  92. :key="index">
  93. {{ label }}
  94. </view>
  95. </view>
  96. <view class="product-seve" v-if="hasLogin">
  97. <text class="label">采美承诺:</text>
  98. <text class="iconfont icon-dui tui-skeleton-rect">
  99. <text class="text">无忧退货</text>
  100. </text>
  101. <text class="iconfont icon-dui tui-skeleton-rect">
  102. <text class="text">快速退款</text>
  103. </text>
  104. <text class="iconfont icon-dui tui-skeleton-rect">
  105. <text class="text">正品保证</text>
  106. </text>
  107. </view>
  108. <view class="productRemarks"
  109. v-if="product.productRemarks != '' && product.productRemarks != null">
  110. 备注:{{ product.productRemarks }}
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="product-item-none" v-if="goodsData.isNoneDisabled">
  116. <image class="none-image" :src="productNoneImage" mode=""></image>
  117. <view class="none-text">此商品已{{ goodsData.disabledText }},请浏览以下推荐商品~</view>
  118. <view class="none-text">咨询类似商品,请联系客服!</view>
  119. </view>
  120. <!-- 优惠券 -->
  121. <view class="product-parameter coupon" v-if="isShowButton && productCoupon.length > 0"
  122. @click="showPopup(2)">
  123. <text class="title">优惠券:</text>
  124. <view class="coupon">
  125. <text class="tags" v-for="(coupon, index) in productCoupon.slice(0, 1)" :key="index">
  126. <template v-if="coupon.couponTextFlag === 1">
  127. 满{{ coupon.touchPrice }}减{{ coupon.couponAmount }}
  128. </template>
  129. <template v-else>
  130. {{ coupon.couponText }}
  131. </template>
  132. </text>
  133. </view>
  134. <text class="iconfont icon-xiayibu"></text>
  135. </view>
  136. <!-- 选择规格 -->
  137. <view class="product-parameter" v-if="isShowButton || userIdentity === 1" @click="showPopup(3)">
  138. <text class="title">选择:</text> <text class="name">共{{ skusCount }}种规格可选</text>
  139. <text class="iconfont icon-xiayibu"></text>
  140. </view>
  141. <!-- 参数 -->
  142. <view class="product-parameter" @click="showPopup(0)" v-if="!goodsData.isNoneDisabled">
  143. <text class="title">参数:</text> <text class="name">品牌 分类...</text>
  144. <text class="iconfont icon-xiayibu"></text>
  145. </view>
  146. <!-- 特殊商品退货须知 -->
  147. <view class="return-instructions" v-if="returnGoodsStutas">
  148. <cm-return-instructions :content="helpContent"></cm-return-instructions>
  149. </view>
  150. <!-- 配套商品 -->
  151. <view class="product-supporting"
  152. v-if="!goodsData.isNoneDisabled && isShowSupportingList && supportingList.length > 0"
  153. @click.stop="handleSupporting">
  154. <view class="product-supporting-title">配套商品({{ supportingNum }})</view>
  155. <view class="product-supporting-list">
  156. <view class="list" v-for="(supporting, index) in supportingList" :key="index"
  157. v-if="index < 4">
  158. <image class="list-image" :src="supporting.image" mode=""></image>
  159. </view>
  160. <text class="iconfont icon-xiayibu"></text>
  161. </view>
  162. </view>
  163. <!-- 仪器培训方案 -->
  164. <view class="product-parameter" @click="showPopup(1)"
  165. v-if="product.commodityType == 2 && product.trainingMethod">
  166. <text class="title">培训方案:</text>
  167. <text class="name">{{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}</text>
  168. <text class="iconfont icon-xiayibu"></text>
  169. </view>
  170. <!-- 供应商 -->
  171. <view class="product-supplier" @click="goSupplier">
  172. <view class="logo">
  173. <img :src="
  174. shop.logo
  175. ? shop.logo
  176. : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'
  177. " alt="" />
  178. </view>
  179. <view class="main">
  180. <view class="name">{{ shop.name }}</view>
  181. <view class="massgs">
  182. <view class="label">满意度:</view>
  183. <view class="p-stars">
  184. <uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36"
  185. :widthInfo="176"></uni-stars>
  186. </view>
  187. <view class="acount">
  188. <text>{{ shop.normalNum }}</text> 件商品
  189. </view>
  190. </view>
  191. </view>
  192. <view class="right" v-if="!isShowCaimeiShop"><text class="iconfont icon-xiayibu"></text></view>
  193. </view>
  194. </view>
  195. <!-- 商品详情 -->
  196. <view v-show="tabCurrentIndex !== 4">
  197. <view class="product-details product-details0">
  198. <view class="title">
  199. <view class="title-tab">商品详情</view>
  200. </view>
  201. <view class="content tui-banner product-rich-text tui-skeleton-rect">
  202. <template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
  203. <mp-html :content="html" :tag-style="tagStyle" />
  204. </template>
  205. <view class="product-rich-text-none" v-else>暂无商品信息</view>
  206. </view>
  207. </view>
  208. <!-- 服务项目 -->
  209. <view class="product-details service product-details1">
  210. <view class="title">
  211. <view class="title-tab">服务项目</view>
  212. </view>
  213. <view class="content service"
  214. v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo">
  215. <cm-service :product="product.productDetail" v-if="isRequest" />
  216. </view>
  217. <view class="content-none" v-else><text>暂无服务项目</text></view>
  218. </view>
  219. <!-- 商品资质 -->
  220. <view class="product-details qualifications product-details2" v-if="product.qualificationImg">
  221. <view class="title">
  222. <view class="title-tab">商品资质</view>
  223. </view>
  224. <view class="product-details-image">
  225. <view class="product-details-table clearfix" v-if="product.qualificationNo">
  226. <view class="ladder-tr">
  227. <view class="ladder-item-td th">证书编号</view>
  228. <view class="ladder-item-td th">产品名称</view>
  229. <view class="ladder-item-td th">详情</view>
  230. </view>
  231. <view class="ladder-tr">
  232. <view class="ladder-item-td">
  233. <view class="te-text">{{ product.qualificationNo }}</view>
  234. </view>
  235. <view class="ladder-item-td">
  236. <view class="te-text">{{ product.productName }}</view>
  237. </view>
  238. <view class="ladder-item-td">
  239. <view class="te-text last">{{ product.qualificationLink }}</view>
  240. <view class="te-copy">
  241. <text class="clipboard" @click.stop="clipboard(product.qualificationLink)">
  242. 复制
  243. </text>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. <image class="qualificationImg-image" :src="product.qualificationImg" mode="aspectFill"
  249. @click="previewImg1(product.qualificationImg)"></image>
  250. </view>
  251. </view>
  252. <!-- 相关推荐 -->
  253. <view class="product-details recommend product-details3">
  254. <view class="title">
  255. <view class="title-tab">相关推荐</view>
  256. </view>
  257. <view class="content hot">
  258. <cm-recommend :query-productid="product.productId" :query-type="product.recommendType"
  259. v-if="isRequest" />
  260. </view>
  261. </view>
  262. </view>
  263. <!-- 相关资料 -->
  264. <view class="product-details recommend product-details4" v-if="tabCurrentIndex === 4">
  265. <cm-product-doc @previewImage="changePreViewImageStatus" :archiveId="product.archiveId"
  266. :userId="userId" />
  267. </view>
  268. <!-- 优惠券 -->
  269. <tui-bottom-popup :radius="true" :show="popupShow2" @close="hidePopup(2)">
  270. <view class="tui-popup-box clearfix">
  271. <view class="title">优惠券</view>
  272. <view class="tui-popup-close" @click="hidePopup(2)">
  273. <text class="iconfont icon-iconfontguanbi"></text>
  274. </view>
  275. <view class="tui-popup-tabs">
  276. <coupon-tabs :tabs="navbar" :currentTab="currentTab > 2 ? 0 : currentTab"
  277. @change="couponChange" :itemWidth="100 / navbar.length + '%'" selectedColor="#FF5B00"
  278. sliderBgColor="#FF5B00" />
  279. </view>
  280. <div class="tui-popup-main coupon">
  281. <scroll-view class="tui-popup-scroll" scroll-y="true">
  282. <view class="coupon-empty" v-if="isCouponEmpty">
  283. <image class="empty-container-image"
  284. :src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"></image>
  285. <text class="error-text">暂无可领的优惠券~</text>
  286. </view>
  287. <template v-else>
  288. <view v-for="(coupon, index) in productCouponList" :key="index"
  289. :id="coupon.couponId" class="coupon-list">
  290. <view class="list-cell-le">
  291. <template v-if="coupon.couponTextFlag === 1">
  292. <view class="coupon-maxMoney"> <text class="small">¥</text>
  293. {{ coupon.couponAmount }}
  294. </view>
  295. <view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>
  296. </template>
  297. <template v-else>
  298. <view class="coupon-maxMoney six"> <text class="small">¥</text>
  299. {{ coupon.couponText }}
  300. </view>
  301. </template>
  302. </view>
  303. <view class="list-cell-ri">
  304. <view class="list-cell-top">
  305. <view class="list-cell-type">
  306. <view class="list-cell-tags">
  307. <template v-if="coupon.moneyCouponFlag == 1">
  308. <text class="tags" v-if="coupon.moneyCouponType == 1">
  309. 意向{{ coupon.couponType | TypeFormat }}
  310. </text>
  311. <text class="tags" v-else>
  312. 定向{{ coupon.couponType | TypeFormat }}
  313. </text>
  314. </template>
  315. <template v-else>
  316. <text class="tags">
  317. {{ coupon.couponType | TypeFormat }}
  318. </text>
  319. </template>
  320. </view>
  321. <view class="list-cell-texts">
  322. <text v-if="coupon.couponType == 0">
  323. {{
  324. coupon.productType && coupon.productType == 1
  325. ? '全商城商品通用'
  326. : coupon.couponName
  327. }}
  328. </text>
  329. <text v-if="coupon.couponType == 1">
  330. {{
  331. coupon.categoryType == 1
  332. ? coupon.couponName
  333. : coupon.couponName
  334. }}
  335. </text>
  336. <text v-if="coupon.couponType == 3">
  337. 仅限购买店铺【{{ coupon.shopName }}】的商品
  338. </text>
  339. <text v-if="coupon.couponType == 4 || coupon.couponType == 2">
  340. 全商城商品通用
  341. </text>
  342. </view>
  343. </view>
  344. <view class="list-cell-btn">
  345. <view class="icon-used">
  346. <template v-if="coupon.couponBtnType == 0">
  347. <template v-if="coupon.couponPayWay == 2">
  348. <view class="icon-used-text">
  349. {{ coupon.moneyCouponPrice }}采美豆
  350. </view>
  351. <view class="icon-used-btn receive"
  352. @click="toDeductCoupon(coupon)">
  353. 抵扣
  354. </view>
  355. </template>
  356. <template v-else-if="coupon.couponPayWay == 1">
  357. <view class="icon-used-text">购买</view>
  358. <view class="icon-used-btn receive"
  359. @click="toPayCoupon(coupon)">
  360. ¥{{ coupon.moneyCouponPrice }}
  361. </view>
  362. </template>
  363. <template v-else>
  364. <view class="icon-used-btn receive"
  365. @click="receiveCoupon(coupon)">
  366. 领取
  367. </view>
  368. </template>
  369. </template>
  370. <view class="icon-used-btn make"
  371. v-if="coupon.couponBtnType == 1">
  372. 已领取
  373. </view>
  374. </view>
  375. </view>
  376. </view>
  377. <view class="list-cell-time">
  378. {{ coupon.startDate }} - {{ coupon.endDate }}
  379. </view>
  380. </view>
  381. </view>
  382. </template>
  383. </scroll-view>
  384. </div>
  385. </view>
  386. </tui-bottom-popup>
  387. <!-- 培训方案 -->
  388. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  389. <view class="tui-popup-box clearfix">
  390. <view class="title">培训方案</view>
  391. <div class="tui-popup-main">
  392. <scroll-view class="tui-popup-scroll train" scroll-y="true">
  393. <view class="content-tr">
  394. <view class="content-td">培训方式:</view>
  395. <view class="content-th">
  396. {{ product.trainingMethod == 1 ? '线上培训' : '线下培训' }}
  397. </view>
  398. </view>
  399. <view class="content-tr">
  400. <view class="content-td">培训费用:</view>
  401. <view class="content-th">
  402. {{ product.trainingType == 1 ? '¥' + product.trainingFee : '售价已包含' }}
  403. </view>
  404. </view>
  405. </scroll-view>
  406. </div>
  407. <view class="tui-right-flex tui-popup-btn"
  408. :style="{ paddingBottom: isIphoneX ? '68rpx' : '.34rpx' }">
  409. <view class="tui-flex-1">
  410. <view class="tui-button" @click="hidePopup(1)">收起</view>
  411. </view>
  412. </view>
  413. </view>
  414. </tui-bottom-popup>
  415. <!-- 底部按钮 -->
  416. <view class="menu" v-if="isShowButton">
  417. <view class="bottom-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  418. <view class="bottom-le">
  419. <view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
  420. <image src="../../static/icon-home-active@3x.png"></image> <text>首页</text>
  421. </view>
  422. <view class="item-bt" @click="handleCollection">
  423. <image :src="
  424. collectionType
  425. ? StaticUrl + 'icon/icon-collection@2x.png'
  426. : StaticUrl + 'icon/icon-collection-none@2x.png'
  427. "></image>
  428. <text>{{ collectionType ? '已收藏' : '收藏' }}</text>
  429. </view>
  430. <view class="item-bt" @click="buyProductCart()">
  431. <image src="https://static.caimei365.com/app/img/icon/icon-cart-active@3x.png"></image>
  432. <text>购物车</text>
  433. <text v-if="hasLogin && bottomCartNumber > 0"
  434. class="uni-badge uni-badge-error uni-small uni-badge--small icon-num"
  435. :class="[bottomCartNumber < 10 ? 'goleft' : '']">
  436. {{ bottomCartNumber >= 100 ? '99+' : bottomCartNumber }}
  437. </text>
  438. <view class="animation-num" :class="isAnimation ? 'animation' : 'restion'">+1</view>
  439. </view>
  440. </view>
  441. <view class="bottom-ri">
  442. <button :disabled="goodsData.disabled" class="btn btn-cart"
  443. :class="[goodsData.disabled ? 'disabled' : '']" @tap.stop="btnGetConfirm('add')">
  444. 加入购物车
  445. </button>
  446. <button :disabled="goodsData.disabled" class="btn btn-bay"
  447. :class="[goodsData.disabled ? 'disabled' : '']" @tap.stop="btnGetConfirm('buy')">
  448. 立即购买
  449. </button>
  450. </view>
  451. </view>
  452. </view>
  453. </view>
  454. </template>
  455. <!-- 商品参数 -->
  456. <cm-prams-popup :popupShow="popupShow0" :product="product" />
  457. <!-- 选择规格弹窗 -->
  458. <cm-unit-popup :popupShow="popupShow3" :skuProduct="skuProduct" :productCoupon="productCoupon"
  459. :type="unitPopupType" :btnType="btnType" :goodsData="goodsData" @buyConfirm="handleBuyConfirm"
  460. @skuClick="handleSkuClick" />
  461. <!-- 弹窗提示 -->
  462. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :content="contentModalText"
  463. :button="modalButton" color="#333" :size="32" shape="circle" :maskClosable="false" />
  464. <!-- 商品详情可见度弹窗提醒 -->
  465. <cm-product-modal v-if="showModal" :showModal="showModal" :commodityDetailsFlag="product.commodityDetailsFlag"
  466. :isShareType="isShareType" :userIdentity="userIdentity" :firstClubType="firstClubType" />
  467. <!-- 供应商收集用户信息弹窗 -->
  468. <cmRossPopup :popupShow="showRossHtml" :advertisInfo="advertisement" />
  469. <!-- 分享弹窗 -->
  470. <cm-share-popup ref="sharePopup" :data="posterData" type="product" />
  471. <!-- 协销名片 -->
  472. <cm-seller-modal :suid="suid" />
  473. <!-- 侧边 -->
  474. <scroll-top :isScrollTop="isScrollTop" :bottom="240" :isShowKefu="true" v-show="tabCurrentIndex !== 3" />
  475. </view>
  476. </template>
  477. <script>
  478. import { mapState, mapMutations } from 'vuex'
  479. import customP from './components/cm-header.vue' //自定义导航
  480. import cmPrice from './components/cm-price.vue' //价格显示
  481. import cmRecommend from './components/recommend' //相关推荐
  482. import cmService from './components/cm-service' //服务项目
  483. import cmProductDoc from './components/cm-product-doc.vue'
  484. import cmProductModal from './components/cm-product-modal.vue'
  485. import cmPramsPopup from './components/cm-prams-popup.vue'
  486. import cmUnitPopup from './components/cm-unit-popup.vue'
  487. import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
  488. import cmRossPopup from '@/components/cm-module/cm-ross/cm-ross-popup'
  489. import cmReturnInstructions from './components/cm-return-instructions.vue'
  490. import authorize from '@/common/config/authorize.js'
  491. import wxLogin from '@/common/config/wxLogin.js'
  492. import { debounce } from '@/common/config/common.js'
  493. import payMixins from '@/mixins/payMixins.js'
  494. import proMixins from './mixins/proMixins.js'
  495. import cmSrsMixins from '@/utils/cmSrsMixins.js'
  496. import thorui from '@/components/clipboard/clipboard.thorui.js'
  497. import cmSharePopup from '@/components/cm-share-popup/cm-share-popup.vue'
  498. import cmSellerModal from '@/components/cm-share-popup/cm-seller-modal.vue'
  499. import { queryParse } from './mixins/share.helper.js'
  500. var isPreviewImg
  501. export default {
  502. mixins: [payMixins, proMixins, cmSrsMixins],
  503. components: {
  504. customP,
  505. cmRecommend,
  506. cmPrice,
  507. cmService,
  508. couponTabs,
  509. cmProductDoc,
  510. cmPramsPopup,
  511. cmUnitPopup,
  512. cmProductModal,
  513. cmRossPopup,
  514. cmReturnInstructions,
  515. cmSharePopup,
  516. cmSellerModal
  517. },
  518. data() {
  519. return {
  520. StaticUrl: this.$Static, //静态图片路径
  521. clickPath: '/pages/search/search',
  522. html: '',
  523. productNoneImage: 'https://static.caimei365.com/app/img/icon/icon-pnone.png',
  524. mode: 'round',
  525. iconClass: 'icon-aixin',
  526. iconColor: '#ff9100',
  527. specClass: '', // 规格弹窗css类,控制开关动画
  528. isBtnType: '',
  529. isRequest: false,
  530. isScrollTop: false,
  531. current: 0,
  532. isShareType: '',
  533. isHeaderPoduct: false,
  534. isNavbarFiexd: false,
  535. navbarFiexd: 'none',
  536. ladderPriceFlag: '',
  537. ladderPriceList: '',
  538. isInvalid: false,
  539. isEvaluate: false,
  540. isAnimation: false,
  541. skeletonShow: true,
  542. isStock: false,
  543. disabled: false,
  544. isNoneDisabled: false,
  545. tabCurrentIndex: 0,
  546. userId: 0,
  547. shopId: 0,
  548. shopID: 0,
  549. typeId: 0,
  550. vipFlag: 0,
  551. firstClubType: 0,
  552. productId: 0,
  553. skusCount: 0, // 规格种类
  554. userIdentity: 0, // 用户类型
  555. goodsData: {}, // 自定义数据
  556. shop: {}, //供应商信息
  557. product: {}, //采美
  558. productImage: [],
  559. retailPrice: 0,
  560. stock: 0,
  561. number: 0,
  562. minBuyNumber: 0,
  563. productsList: [],
  564. goodListData: [],
  565. productCoupon: [], // 优惠券
  566. productCouponList: [], // 优惠券弹窗列表
  567. headerBtnPosi: this.setHeaderBtnPosi(), // 获取设备顶部胶囊高度
  568. systeminfo: this.setSysteminfo(), // 获取设备信息
  569. windowHeight: '',
  570. headerColor: false,
  571. backPage: 1,
  572. nvabarData: {
  573. // 顶部自定义导航
  574. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  575. title: '' // 导航栏 中间的标题
  576. },
  577. linkPath: '',
  578. CustomBar: this.CustomBar, // 顶部导航栏高度
  579. popupShow0: false, // 参数弹窗
  580. popupShow1: false, // 培训方案
  581. popupShow2: false, // 优惠券
  582. popupShow3: false, // 购买弹窗
  583. tabSelectFlag: false,
  584. sectionPropsArr: [],
  585. scrollTopArray: [],
  586. winHeight: '',
  587. isShowButton: true,
  588. isCouponEmpty: false,
  589. currentTab: 0,
  590. couponParam: {
  591. // 获取弹窗优惠券领取参数
  592. userId: 0,
  593. productId: 0,
  594. status: 1,
  595. source: 2
  596. },
  597. bottomCartNumber: 0,
  598. navbar: [{ name: '未领取', num: 0 }, { name: '已领取', num: 0 }],
  599. isPreviewImage: false,
  600. opentype: '',
  601. collectionType: false,
  602. isShowSupportingList: false,
  603. supportingList: [],
  604. supportingNum: 0, // 组合商品总数
  605. contentModalText: '', //操作文字提示语句
  606. modal: false,
  607. modalButton: [{
  608. text: '取消',
  609. type: 'gray',
  610. plain: true //是否空心
  611. },
  612. {
  613. text: '去升级',
  614. customStyle: {
  615. color: '#fff',
  616. bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
  617. },
  618. plain: false
  619. }
  620. ],
  621. showModal: false,
  622. isShowCaimeiShop: false,
  623. unitPopupType: 0, // 选择类型 1 点击加入购物车 立即购买 2:点击规格选择
  624. returnGoodsStutas: false,
  625. helpContent: '',
  626. posterData: {}, // 商品详情
  627. suid: 0, // 协销id
  628. scene: {}, //获取二维码参数
  629. options: {}
  630. }
  631. },
  632. computed: {
  633. ...mapState(['hasLogin', 'clubType', 'identity', 'isIphoneX', 'userInfo'])
  634. },
  635. filters: {
  636. TypeFormat(value) {
  637. switch (value) {
  638. case 0:
  639. return '活动券'
  640. break
  641. case 1:
  642. return '品类券'
  643. break
  644. case 2:
  645. return '用户专享券'
  646. break
  647. case 3:
  648. return '店铺券'
  649. break
  650. case 4:
  651. return '新用户券'
  652. break
  653. }
  654. }
  655. },
  656. watch: {
  657. isNavbarFiexd(val) {
  658. if (!this.isRequest || !val) return
  659. let timer = null
  660. clearTimeout(timer)
  661. timer = setTimeout(() => {
  662. if (this.sectionPropsArr.length > 0) return
  663. this.getSectionProps()
  664. }, 200)
  665. }
  666. },
  667. onLoad(option) {
  668. if (option.scene) {
  669. // 识别小程序二维码
  670. this.scene = queryParse(decodeURIComponent(option.scene)) // 转码
  671. }
  672. this.productId = this.couponParam.productId = this.addParams.productId = this.handleProsId =
  673. option.id || this.scene.id //获取商品ID
  674. if (option.typeId) {
  675. this.typeId = option.typeId
  676. }
  677. this.opentype = option.open
  678. this.isShareType = option.type
  679. this.linkPath = option.path
  680. this.isHeaderPoduct = true
  681. if (option.page == 2) {
  682. this.backPage = option.page
  683. }
  684. this.options = option.scene ? this.scene : option
  685. this.getWinHeight()
  686. },
  687. onReady() {
  688. if (this.opentype == 'caimei') {
  689. // 跳转到资料详情
  690. uni.showLoading({
  691. title: '加载中'
  692. })
  693. setTimeout(() => {
  694. this.isNavbarFiexd = true
  695. this.tabClick(4)
  696. uni.hideLoading()
  697. }, 2000)
  698. }
  699. console.log('是iPhoneX', this.isIphoneX)
  700. },
  701. methods: {
  702. async initGetStotage() {
  703. // 初始化
  704. const userInfo = await this.$api.getStorage()
  705. this.userId = this.couponParam.userId = this.addParams.userId = userInfo.userId ? userInfo.userId :
  706. 0
  707. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  708. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  709. this.shopID = userInfo.shopId ? userInfo.shopId : 0
  710. this.firstClubType = this.clubType
  711. if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
  712. this.isShowButton = true
  713. } else {
  714. this.isShowButton = false
  715. }
  716. if (isPreviewImg) {
  717. isPreviewImg = false
  718. return
  719. } else {
  720. this.initData()
  721. }
  722. },
  723. initData() {
  724. // 初始化商品详情查询
  725. this.ProductService.QueryProductDetils({
  726. userId: this.userId,
  727. productId: this.productId,
  728. identity: this.identity,
  729. typeId: this.typeId
  730. })
  731. .then(response => {
  732. let productLabel = ''
  733. this.productImage = []
  734. this.shop = response.data.shop
  735. this.shopId = response.data.shopId
  736. const dataStr = JSON.stringify(response.data)
  737. this.product = JSON.parse(dataStr)
  738. this.skuProduct = JSON.parse(dataStr)
  739. this.skusCount = this.product.skus.length
  740. this.addParams.skuId = this.product.skuId
  741. if (this.product.tinyTypeName) {
  742. productLabel = this.product.tinyTypeName
  743. } else if (!this.product.tinyTypeName && this.product.smallTypeName) {
  744. productLabel = this.product.smallTypeName
  745. } else {
  746. productLabel = this.product.bigTypeName
  747. }
  748. //设置统计数据标签
  749. if (this.product.relatedLabels) {
  750. uni.setStorageSync('productLabel', this.product.relatedLabels)
  751. } else {
  752. uni.setStorageSync(
  753. 'productLabel',
  754. `${productLabel}-${this.product.brandName ? this.product.brandName : ''}`
  755. )
  756. }
  757. //校验是否为ross
  758. this.checkedIsRossSet()
  759. //判断是否可以跳转供应商主页
  760. if (this.product.shopType === 2) {
  761. this.isShowCaimeiShop = true
  762. }
  763. // 判断是否显示已收藏
  764. if (this.product.userLike && this.product.userLike == 1) {
  765. this.collectionType = true
  766. } else {
  767. this.collectionType = false
  768. }
  769. //已删除/已冻结
  770. if (this.product.validFlag === 0 || this.product.validFlag == 10) {
  771. this.isInvalid = true
  772. } else if (this.product.validFlag === 9) {
  773. if (this.userIdentity == 1) {
  774. this.isInvalid = false
  775. } else {
  776. this.isInvalid = true
  777. }
  778. }
  779. this.ladderPriceFlag = this.product.ladderPriceFlag
  780. this.html = this.adaptRichTextImg(this.product)
  781. this.stock = this.product.stock
  782. this.number = this.product.minBuyNumber
  783. this.minBuyNumber = this.product.minBuyNumber
  784. //处理商品图片列表
  785. this.product.imageList.forEach(item => {
  786. this.productImage.push(item.image)
  787. })
  788. //处理阶梯价格
  789. if (this.product.ladderPriceList != null) {
  790. this.ladderPriceList = this.product.ladderPriceList
  791. }
  792. //拆分金额并转千分位格式显示
  793. if (this.product.price != null) {
  794. this.retailPrice = this.product.price.toFixed(2)
  795. }
  796. //处理下架商品和售罄商品
  797. if (this.product.validFlag == 3 || this.product.saleOutFlag === 1) {
  798. this.isNoneDisabled = true
  799. this.disabled = true
  800. } else {
  801. this.disabled = false
  802. this.isNoneDisabled = false
  803. this.goodsData.disabledText = ''
  804. }
  805. if (this.product.priceFlag == 1) {
  806. this.disabled = true
  807. } else if (this.product.priceFlag == 2) {
  808. if (this.userIdentity == 4 && this.vipFlag != 1) {
  809. this.disabled = true
  810. } else {
  811. this.disabled = false
  812. }
  813. } else if (this.product.priceFlag == 3) {
  814. if (this.userIdentity == 4) {
  815. this.disabled = true
  816. } else if (this.userIdentity == 2 && this.firstClubType != 1) {
  817. this.disabled = true
  818. } else {
  819. this.disabled = false
  820. }
  821. } else {
  822. this.disabled = false
  823. }
  824. this.goodsData.disabled = this.disabled
  825. this.goodsData.isNoneDisabled = this.isNoneDisabled
  826. if (this.product.validFlag == 3) {
  827. this.goodsData.disabledText = '下架'
  828. }
  829. if (this.product.validFlag == 10) {
  830. this.goodsData.disabledText = '停售'
  831. }
  832. if (this.product.saleOutFlag === 1) {
  833. this.goodsData.disabledText = '售罄'
  834. }
  835. console.log(this.disabled)
  836. // setTimeout(() => {
  837. // this.getSectionProps()
  838. // }, 2000)
  839. this.handleShowProductType(this.product.commodityDetailsFlag)
  840. if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
  841. this.ProductCartNumber()
  842. }
  843. this.queryProductDetilsCoupons()
  844. this.getCommodityCombinationList()
  845. // 特殊商品退货须知
  846. this.returnGoodsStutas = response.data.returnGoodsStutas && response.data
  847. .returnGoodsStutas === 2 // 1:可以 2:不可以
  848. this.helpContent = response.data.helpContent
  849. setTimeout(() => {
  850. this.skeletonShow = false
  851. this.isRequest = true
  852. }, 1000)
  853. })
  854. .catch(error => {
  855. this.$util.msg(error.msg, 2000)
  856. })
  857. },
  858. handleShowProductType(flag = '') {
  859. // 根据商品详情可见度显示弹窗 flag 1.所有人可见 2.所有机构可见 3.仅会员机构可见 4.仅医美机构可见
  860. const flagMap = {
  861. '2': true,
  862. '3': true,
  863. '4': true
  864. }
  865. if (!this.hasLogin) {
  866. this.showModal = flagMap[flag]
  867. return
  868. }
  869. if (this.vipFlag === 1) {
  870. this.showModal = false
  871. return
  872. }
  873. if (flag === 3 && this.userIdentity === 4) {
  874. this.showModal = true
  875. return
  876. }
  877. if (flag === 4 && this.userIdentity === 4) {
  878. this.showModal = true
  879. return
  880. }
  881. if (flag === 4 && this.userIdentity === 2 && this.firstClubType !== 1) {
  882. this.showModal = true
  883. return
  884. }
  885. },
  886. hideMobel1() {
  887. this.modal1 = false
  888. this.$api.navigateBack(1)
  889. },
  890. adaptRichTextImg(product) {
  891. // 商品详情
  892. let defaulHtml = '<div style="text-align: center;color:#333333;">暂无内容</div>'
  893. let html = ''
  894. if (product.productDetailChose == 1) {
  895. // 同资质机构显示商品详情
  896. html = product.productDetail ? this.$api.adaptRichTextImg(product.productDetail.detailInfo) :
  897. defaulHtml
  898. } else {
  899. if (this.hasLogin && this.userIdentity != 4) {
  900. html = product.productDetail ?
  901. this.$api.adaptRichTextImg(product.productDetail.detailInfo) :
  902. defaulHtml
  903. } else {
  904. if (product.productDetail.commonDetailInfo) {
  905. html = product.productDetail ?
  906. this.$api.adaptRichTextImg(product.productDetail.commonDetailInfo) :
  907. defaulHtml
  908. } else {
  909. html = defaulHtml
  910. }
  911. }
  912. }
  913. return html
  914. },
  915. getCommodityCombinationList() {
  916. // 初始化商品详情配套商品
  917. this.ProductService.getCommodityCombinationList({
  918. userId: this.userId,
  919. productId: this.productId,
  920. source: 2,
  921. pageNum: 1,
  922. pageSize: 4
  923. })
  924. .then(response => {
  925. const data = response.data
  926. this.supportingList = data.results
  927. this.supportingNum = data.totalRecord
  928. if (this.supportingList.length > 0) {
  929. if (!this.hasLogin || this.userIdentity == 2 || this.userIdentity == 4) {
  930. this.isShowSupportingList = true
  931. }
  932. }
  933. })
  934. .catch(error => {
  935. console.log('获取组合商品列表失败')
  936. })
  937. },
  938. queryProductDetilsCoupons() {
  939. // 初始化商品详情优惠券信息
  940. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  941. .then(response => {
  942. this.productCoupon = response.data.list
  943. })
  944. .catch(error => {
  945. console.log('获取优惠券列表失败')
  946. })
  947. },
  948. queryPopupCoupons() {
  949. // 获取弹窗优惠券列表
  950. this.ProductService.QueryProductDetilsCoupons(this.couponParam)
  951. .then(response => {
  952. let data = response.data
  953. this.navbar[0].num = data.notCouponNum
  954. this.navbar[1].num = data.couponNum
  955. if (data.couponList && data.couponList.length > 0) {
  956. this.productCouponList = data.couponList
  957. this.isCouponEmpty = false
  958. } else {
  959. this.isCouponEmpty = true
  960. }
  961. })
  962. .catch(error => {
  963. console.log('获取优惠券列表失败')
  964. })
  965. },
  966. ProductCartNumber() {
  967. // 获取用户购物车储量
  968. this.ProductService.ProductCartNumber({ userId: this.userId })
  969. .then(response => {
  970. this.bottomCartNumber = response.data
  971. })
  972. .catch(error => {
  973. console.log('获取购物车数量失败')
  974. })
  975. },
  976. receiveCoupon(coupon) {
  977. // 点击优惠券领取按钮,友盟埋点收集领取优惠券
  978. if (process.env.NODE_ENV != 'development') {
  979. this.$uma.trackEvent('Um_Event_productCouponReceive', {
  980. Um_Key_PageName: '商品详情',
  981. Um_Key_EvenName: '领取优惠券',
  982. Um_Key_CouponId: `${coupon.couponId}`
  983. })
  984. }
  985. this.ProductService.ReceiveCoupon({
  986. userId: this.couponParam.userId,
  987. couponId: coupon.couponId,
  988. source: 1
  989. })
  990. .then(response => {
  991. this.$util.msg('领取成功', 1500, true, 'success')
  992. setTimeout(() => {
  993. this.currentTab = 1
  994. this.couponParam.status = 2
  995. this.queryPopupCoupons()
  996. }, 1500)
  997. })
  998. .catch(error => {
  999. this.$util.msg(error.msg, 2000)
  1000. })
  1001. },
  1002. toDeductCoupon(coupon) {
  1003. // 点击采美豆抵扣优惠券
  1004. if (process.env.NODE_ENV != 'development') {
  1005. this.$uma.trackEvent('Um_Event_userCouponCollectionBuy', {
  1006. Um_Key_PageName: '领券中心',
  1007. Um_Key_EvenName: '抵扣优惠券',
  1008. Um_Key_CouponId: `${coupon.couponId}`
  1009. })
  1010. }
  1011. if (this.hasLogin) {
  1012. if (this.userIdentity === 1 || this.userIdentity === 3) {
  1013. this.$util.msg('您的身份暂不支持领取优惠券', 2000)
  1014. return
  1015. }
  1016. this.WeChatPayCouponBeans(coupon)
  1017. } else {
  1018. this.$api.navigateTo('/pages/login/login')
  1019. }
  1020. },
  1021. WeChatPayCouponBeans(coupon) {
  1022. // 采美豆抵扣优惠券
  1023. this.PayService.WeChatPayCouponBeans({
  1024. source: 1, //领取渠道 1 小程序 2 网站
  1025. userId: this.couponParam.userId,
  1026. couponId: coupon.couponId
  1027. })
  1028. .then(response => {
  1029. this.$util.msg('抵扣成功', 1500)
  1030. setTimeout(() => {
  1031. this.currentTab = 1
  1032. this.couponParam.status = 2
  1033. this.queryPopupCoupons()
  1034. }, 1500)
  1035. })
  1036. .catch(error => {
  1037. this.$util.msg(error.msg, 2000)
  1038. })
  1039. },
  1040. toPayCoupon(coupon) {
  1041. // 点击购买优惠券,友盟埋点收集购买优惠券
  1042. if (process.env.NODE_ENV != 'development') {
  1043. this.$uma.trackEvent('Um_Event_productCouponBuy', {
  1044. Um_Key_PageName: '商品详情',
  1045. Um_Key_EvenName: '购买优惠券',
  1046. Um_Key_CouponId: `${coupon.couponId}`
  1047. })
  1048. }
  1049. this.$api.navigateTo(`/pages/user/pay/card-coupon-under?amount=${coupon.moneyCouponPrice}`)
  1050. // this.createCouponRecord(coupon)
  1051. },
  1052. createCouponRecord(coupon) {
  1053. // 生成购买优惠券记录Id
  1054. this.PayService.WeChatCouponRecord({
  1055. userId: this.userId,
  1056. couponId: coupon.couponId
  1057. })
  1058. .then(response => {
  1059. this.MiniWxPayFor(coupon, response.data.couponRecordId)
  1060. })
  1061. .catch(error => {
  1062. if (error.code == -1) {
  1063. //个人机构不能购买
  1064. this.contentModalText = '该优惠券仅限医美机构购买,请升级为医美机构后再次购买。'
  1065. this.modal = true
  1066. } else if (error.code == -2) {
  1067. //会员机构不是医美机构不能购买
  1068. this.$util.msg('该优惠券仅限医美机构购买', 2000)
  1069. }
  1070. })
  1071. },
  1072. async MiniWxPayFor(coupon, couponRecordId) {
  1073. const wechatcode = await authorize.getCode('weixin')
  1074. const params = {
  1075. userId: this.userId,
  1076. couponId: coupon.couponId,
  1077. couponRecordId: couponRecordId,
  1078. payType: 'XCX',
  1079. code: wechatcode,
  1080. source: 1 //支付来源 1 小程序 2 WWW
  1081. }
  1082. this.weChatMiniCouponWxPay(
  1083. params,
  1084. 'Um_Event_productCouponPay',
  1085. '商品详情',
  1086. '线上支付优惠券',
  1087. coupon.couponId,
  1088. this.userId
  1089. )
  1090. },
  1091. hideMobel() {
  1092. this.modal = false
  1093. },
  1094. handleClick(e) {
  1095. //个人机构跳转升级页面
  1096. if (e.index == 1) {
  1097. this.$api.navigateTo('/pages/login/apply')
  1098. }
  1099. this.modal = false
  1100. },
  1101. swiperChange(e) {
  1102. //顶部商品图片切换
  1103. const index = e.detail.current
  1104. this.current = index
  1105. },
  1106. previewImg1(url) {
  1107. let mentuzArray = []
  1108. mentuzArray.push(url)
  1109. uni.previewImage({
  1110. urls: mentuzArray,
  1111. current: 0
  1112. })
  1113. },
  1114. previewImg(index) {
  1115. //顶部商品图片预览
  1116. isPreviewImg = true
  1117. let previewUrls = this.productImage
  1118. uni.previewImage({
  1119. current: index, //图片索引
  1120. urls: previewUrls, //必须是http图片,本地图片无效
  1121. longPressActions: ''
  1122. })
  1123. },
  1124. //商品详情&&供应商信息tab切换
  1125. tabClick(index) {
  1126. // 重新标记
  1127. this.getSectionProps()
  1128. this.tabCurrentIndex = index
  1129. this.tabSelectFlag = true
  1130. let timer = null
  1131. clearTimeout(timer)
  1132. // 点击tab 300ms才执行跳转,避免出错(来回跳动)
  1133. timer = setTimeout(() => {
  1134. this.tabClickAction(index)
  1135. }, 500)
  1136. },
  1137. // 跳转执行
  1138. tabClickAction(index) {
  1139. const that = this
  1140. if (index === 4) {
  1141. return uni.pageScrollTo({
  1142. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  1143. scrollTop: this.sectionPropsArr[0].scrollTop
  1144. })
  1145. }
  1146. uni.pageScrollTo({
  1147. duration: 300, //过渡时间必须为0,uniapp bug,否则运行到手机会报错
  1148. scrollTop: this.sectionPropsArr[index].scrollTop,
  1149. success() {
  1150. setTimeout(() => {
  1151. that.tabSelectFlag = false
  1152. }, 300)
  1153. }
  1154. })
  1155. },
  1156. handleContact(e) {
  1157. //跳转小程序客服
  1158. console.log(e.detail.path)
  1159. console.log(e.detail.query)
  1160. },
  1161. buyProductCart() {
  1162. //底部购物车按钮点击
  1163. if (this.hasLogin) {
  1164. // 友盟埋点商品详情购物车入口点击事件
  1165. if (process.env.NODE_ENV != 'development') {
  1166. this.$uma.trackEvent('Um_Event_ProductShoppingCart', {
  1167. Um_Key_PageName: '去购物车',
  1168. Um_Key_SourcePage: '商品详情购物车入口'
  1169. })
  1170. }
  1171. this.$api.navigateTo('/pages/goods/cart')
  1172. } else {
  1173. this.$api.navigateTo('/pages/login/login?type=1')
  1174. }
  1175. },
  1176. btnGetConfirm(type) {
  1177. //加入购物车&&立即购买点击
  1178. if (this.hasLogin) {
  1179. this.btnType = type
  1180. this.popupShow3 = true
  1181. this.unitPopupType = 1
  1182. } else {
  1183. this.$api.navigateTo('/pages/login/login?type=1')
  1184. }
  1185. },
  1186. getAddProductCart() {
  1187. //增加购物车成功和toast弹窗提示成功
  1188. this.ProductService.shoppingAddCart({
  1189. productId: this.productId,
  1190. userId: this.userId,
  1191. productCount: this.number,
  1192. source: 2
  1193. })
  1194. .then(response => {
  1195. this.specClass = 'hide'
  1196. this.$util.msg('加入购物车成功', 1500, true, 'success')
  1197. this.isAnimation = true
  1198. setTimeout(() => {
  1199. this.specClass = 'none'
  1200. }, 200)
  1201. setTimeout(() => {
  1202. this.isAnimation = false
  1203. }, 2000)
  1204. this.bottomCartNumber = response.data
  1205. })
  1206. .catch(error => {
  1207. console.log('error', error.msg)
  1208. })
  1209. },
  1210. setHeaderBtnPosi() {
  1211. // 获得胶囊按钮位置信息
  1212. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  1213. return headerBtnPosi
  1214. },
  1215. setSysteminfo() {
  1216. let systeminfo
  1217. uni.getSystemInfo({
  1218. // 获取设备信息
  1219. success: res => {
  1220. systeminfo = res
  1221. }
  1222. })
  1223. return systeminfo
  1224. },
  1225. goIndex() {
  1226. //商城首页
  1227. uni.switchTab({
  1228. url: '/pages/tabBar/home/index'
  1229. })
  1230. },
  1231. goSupplier() {
  1232. //跳供应商资料页
  1233. if (!this.isShowCaimeiShop) {
  1234. this.$api.navigateTo('/pages/supplier/user/my-shop?shopId=' + this.shopId)
  1235. }
  1236. },
  1237. discard() {
  1238. //丢弃
  1239. },
  1240. // onShare(res) {
  1241. // //分享转发
  1242. // if (res.from === 'button') {
  1243. // // 来自页面内转发按钮
  1244. // }
  1245. // return {
  1246. // title: `${this.product.name}`,
  1247. // path: `pages/goods/product?type=share&id=${this.productId}`,
  1248. // imageUrl: `${this.productImage[0]}`
  1249. // }
  1250. // },
  1251. // 分享海报
  1252. handleShare() {
  1253. this.posterData = {
  1254. productName: this.product.name,
  1255. productImage: this.productImage[0],
  1256. suid: this.suid,
  1257. path: 'pages/goods/product',
  1258. id: this.productId
  1259. }
  1260. console.log('posterData=======>', this.posterData)
  1261. this.$refs.sharePopup.open()
  1262. },
  1263. handleCollection() {
  1264. // 收藏
  1265. if (this.hasLogin) {
  1266. this.ProductService.getProductUserLike({
  1267. userId: this.userId,
  1268. productId: this.product.productId
  1269. })
  1270. .then(response => {
  1271. this.collectionType = !this.collectionType
  1272. this.$util.msg(response.data, 1500, true, 'success')
  1273. })
  1274. .catch(error => {
  1275. this.$util.msg(error.msg, 2000)
  1276. })
  1277. } else {
  1278. this.$api.navigateTo('/pages/login/login')
  1279. }
  1280. },
  1281. showPopup(index) {
  1282. switch (index) {
  1283. case 0:
  1284. this.popupShow0 = true
  1285. break
  1286. case 1:
  1287. this.popupShow1 = true
  1288. break
  1289. case 2:
  1290. if (this.hasLogin) {
  1291. this.queryPopupCoupons()
  1292. this.popupShow2 = true
  1293. } else {
  1294. this.$api.navigateTo('/pages/login/login')
  1295. }
  1296. break
  1297. case 3:
  1298. this.popupShow3 = true
  1299. this.unitPopupType = 2
  1300. break
  1301. }
  1302. },
  1303. hidePopup(index) {
  1304. switch (index) {
  1305. case 0:
  1306. this.popupShow0 = false
  1307. break
  1308. case 1:
  1309. this.popupShow1 = false
  1310. break
  1311. case 2:
  1312. this.popupShow2 = false
  1313. break
  1314. case 3:
  1315. this.popupShow3 = false
  1316. break
  1317. }
  1318. },
  1319. couponChange(e) {
  1320. this.currentTab = e.index
  1321. switch (this.currentTab) {
  1322. case 0:
  1323. this.couponParam.status = 1
  1324. this.queryPopupCoupons()
  1325. break
  1326. case 1:
  1327. this.couponParam.status = 2
  1328. this.queryPopupCoupons()
  1329. break
  1330. }
  1331. },
  1332. handleSupporting() {
  1333. // 跳转组合商品页面
  1334. this.$api.navigateTo(`/pages/goods/goods-supporting?productId=${this.productId}`)
  1335. },
  1336. // 获取每个tab对应区域的区间
  1337. async getSectionProps() {
  1338. const sectionPropsArr = [],
  1339. scrollTopArray = [],
  1340. className = 'product-details'
  1341. // 获取相关节点元素信息
  1342. const productMain = await this.$util.boundingClientRect(this, '.container-product-main', false)
  1343. const productDetail = await this.$util.boundingClientRect(this, '.product-details', true)
  1344. const topBar = await this.$util.boundingClientRect(this, '#topBar', false)
  1345. /*
  1346. 说明:采用累加方式来计算每一个 prdocut-details 的 scrollTop 定位
  1347. scrollTop = 上一个的scrollTop + 上一个的高度
  1348. */
  1349. productDetail.forEach((item, index) => {
  1350. // 上一个 prdocut-details 的 scrollTop 值
  1351. const prev = sectionPropsArr[index - 1]
  1352. const prevScrollTop = prev ? prev.scrollTop : productMain.height
  1353. // 上一个 prdocut-details 的高度
  1354. const add = productDetail[index - 1]
  1355. // 第一个需要减去tabs的高度
  1356. const addHeight = index === 0 ? (add ? add.height : 0) - topBar.height : add ? add
  1357. .height : 0
  1358. sectionPropsArr.push({
  1359. className: `${className}${index}`,
  1360. scrollTop: prevScrollTop + addHeight
  1361. })
  1362. // - topBar.height
  1363. })
  1364. this.sectionPropsArr = sectionPropsArr
  1365. console.log('更新tab影响区域', this.sectionPropsArr)
  1366. },
  1367. //当滑动时也能同步激活tab
  1368. activeTab: debounce(
  1369. (top, _this) => {
  1370. const { sectionPropsArr } = _this
  1371. if (sectionPropsArr && sectionPropsArr.length > 0) {
  1372. sectionPropsArr.forEach((item, index) => {
  1373. // 当前位置为开始位置, 下个起始位置为结束位置
  1374. const openInterval = (index === 0 ? 0 : item.scrollTop) - 20 // 自定义偏移
  1375. const next = sectionPropsArr[index + 1]
  1376. const closedInterval = (next ? next.scrollTop : 10000000) - 20 // 自定义偏移
  1377. if (top >= openInterval && top < closedInterval) {
  1378. _this.tabCurrentIndex = index
  1379. }
  1380. })
  1381. }
  1382. },
  1383. 100,
  1384. true
  1385. ),
  1386. debounce(fn, delay) {
  1387. let timer = null //借助闭包
  1388. return function() {
  1389. if (timer) {
  1390. clearTimeout(timer)
  1391. }
  1392. timer = setTimeout(fn, delay) // 简化写法
  1393. }
  1394. },
  1395. clipboard(data) {
  1396. thorui.getClipboardData(data, res => {
  1397. if (res) {
  1398. this.$util.msg('复制成功', 2000, true, 'success')
  1399. } else {
  1400. this.$util.msg('复制失败', 2000, true, 'none')
  1401. }
  1402. })
  1403. },
  1404. getWinHeight() {
  1405. this.winHeight = wx.getSystemInfoSync().windowHeight
  1406. },
  1407. changePreViewImageStatus(falg) {
  1408. this.isPreviewImage = falg
  1409. }
  1410. },
  1411. onPageScroll(e) {
  1412. //实时获取到滚动的值
  1413. const { scrollTop } = e
  1414. this.debounce(this.getSectionProps(), 1000)
  1415. if (!this.tabSelectFlag) {
  1416. this.activeTab(scrollTop, this)
  1417. }
  1418. if (e.scrollTop > 60) {
  1419. this.headerColor = true
  1420. this.navbarFiexd = 'fixed'
  1421. this.isNavbarFiexd = true
  1422. this.nvabarData = {
  1423. showCapsule: 1,
  1424. title: '商品详情'
  1425. }
  1426. } else {
  1427. this.headerColor = false
  1428. this.isNavbarFiexd = false
  1429. this.navbarFiexd = 'none'
  1430. this.nvabarData = {
  1431. showCapsule: 1,
  1432. title: ''
  1433. }
  1434. }
  1435. if (e.scrollTop > 700) {
  1436. this.isScrollTop = true
  1437. } else {
  1438. this.isScrollTop = false
  1439. }
  1440. },
  1441. onShareAppMessage(res) {
  1442. //分享转发
  1443. if (res.from === 'button') {
  1444. // 来自页面内转发按钮
  1445. return {
  1446. title: `${this.product.name}`,
  1447. path: `pages/goods/product?type=4&id=${this.productId}&suid=${
  1448. this.userInfo.userIdentity === 1 ? this.userInfo.userId : 0}&spId=${this.userInfo.userIdentity === 1 ? this.userInfo.serviceProviderId : 0}`,
  1449. imageUrl: `${this.productImage[0]}`
  1450. }
  1451. }
  1452. },
  1453. onShow() {
  1454. wxLogin.wxLoginAuthorize()
  1455. // 是否开启图片预览 true 不刷新调用接口 false刷新调用接口
  1456. if (!this.isPreviewImage) {
  1457. this.initGetStotage()
  1458. }
  1459. this.isPreviewImage = false
  1460. const suid = this.options.suid ? this.options.suid : this.scene.suid ? this.scene.suid : uni.getStorageSync(
  1461. 'suid') * 1 ? uni.getStorageSync('suid') * 1 :
  1462. 0 // 协销userId
  1463. const spId = this.options.spId ?
  1464. this.options.spId :
  1465. this.scene.spId ?
  1466. this.scene.spId :
  1467. uni.getStorageSync('spId') * 1 ?
  1468. uni.getStorageSync('spId') * 1 :
  1469. 0 // 协销id
  1470. const isShare = this.options.type == 4 ? true : this.scene.type == 4 ? true : false //是否从分享页进入
  1471. if ((isShare || uni.getStorageSync('suid') * 1 > 0) && this.userInfo.userIdentity !== 1) {
  1472. // 分享进入 且 用户非协销 或不是从分享进入有缓存
  1473. if (
  1474. !uni.getStorageSync('spUserId') ||
  1475. uni.getStorageSync('spUserId') * 1 === uni.getStorageSync('suid') * 1
  1476. ) {
  1477. // 如果未分配或者分配相同
  1478. this.suid = suid
  1479. uni.setStorageSync('suid', suid)
  1480. uni.setStorageSync('spId', spId)
  1481. } else {
  1482. uni.setStorageSync('suid', 0)
  1483. this.suid = 0
  1484. uni.setStorageSync('spId', 0)
  1485. }
  1486. }
  1487. console.log(this.suid, 'uni.getStorageSync(\'spId\')', uni.getStorageSync('spId'))
  1488. }
  1489. }
  1490. </script>
  1491. <style lang="scss">
  1492. page {
  1493. background-color: #ffffff;
  1494. }
  1495. .banner-section {
  1496. width: 100%;
  1497. height: 750rpx;
  1498. position: relative;
  1499. .cm-product-tags {
  1500. position: absolute;
  1501. right: 30rpx;
  1502. top: 0;
  1503. z-index: 999;
  1504. }
  1505. .cm-product-type {
  1506. width: 64rpx;
  1507. height: 64rpx;
  1508. text-align: justify;
  1509. box-sizing: border-box;
  1510. padding: 10rpx;
  1511. border-radius: 0 0 8rpx 8rpx;
  1512. background-color: #33ccbf;
  1513. font-size: $font-size-22;
  1514. color: #ffffff;
  1515. line-height: 25rpx;
  1516. position: absolute;
  1517. left: 30rpx;
  1518. top: 0;
  1519. z-index: 999;
  1520. }
  1521. .cm-product-cover {
  1522. width: 120rpx;
  1523. height: 77rpx;
  1524. line-height: 57rpx;
  1525. font-size: 24rpx;
  1526. color: #fff;
  1527. text-align: center;
  1528. background: url(https://static.caimei365.com/app/img/icon2/cm_cover_bg_app.png) no-repeat center;
  1529. background-size: 120rpx;
  1530. float: left;
  1531. position: absolute;
  1532. right: 30rpx;
  1533. top: 0;
  1534. z-index: 999;
  1535. }
  1536. }
  1537. .banner {
  1538. width: 100%;
  1539. height: 750rpx;
  1540. .product-img {
  1541. width: 750rpx;
  1542. }
  1543. image {
  1544. width: 100%;
  1545. height: 100%;
  1546. }
  1547. .banner-item {
  1548. position: relative;
  1549. }
  1550. }
  1551. .swiper__dots-box {
  1552. position: absolute;
  1553. color: #fff;
  1554. bottom: 30rpx;
  1555. right: 0;
  1556. }
  1557. .product-wrap {
  1558. width: 100%;
  1559. height: auto;
  1560. padding: 24rpx 0 0 0;
  1561. background-color: #ffffff;
  1562. border-bottom: 16rpx solid #f7f7f7;
  1563. .productRemarks {
  1564. height: 48rpx;
  1565. width: 100%;
  1566. float: left;
  1567. line-height: 48rpx;
  1568. font-size: 24rpx;
  1569. color: #999999;
  1570. text-align: left;
  1571. }
  1572. .wrap-top {
  1573. width: 100%;
  1574. box-sizing: border-box;
  1575. padding: 0 24rpx 10rpx 24rpx;
  1576. height: auto;
  1577. float: left;
  1578. &.none {
  1579. .p-title {
  1580. color: #999999;
  1581. }
  1582. }
  1583. .p-title {
  1584. width: 100%;
  1585. height: auto;
  1586. float: left;
  1587. position: relative;
  1588. .p-title-name {
  1589. width: 100%;
  1590. height: auto;
  1591. float: left;
  1592. line-height: 38rpx;
  1593. font-size: $font-size-28;
  1594. color: $text-color;
  1595. font-weight: 600;
  1596. -o-text-overflow: ellipsis;
  1597. text-overflow: ellipsis;
  1598. display: -webkit-box;
  1599. word-break: break-all;
  1600. -webkit-box-orient: vertical;
  1601. -webkit-line-clamp: 2;
  1602. overflow: hidden;
  1603. &.indent {
  1604. text-indent: 95rpx;
  1605. }
  1606. }
  1607. .mclap-tag {
  1608. display: block;
  1609. width: 84rpx;
  1610. height: 32rpx;
  1611. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  1612. border-radius: 4rpx 48rpx 4px 4px;
  1613. line-height: 32rpx;
  1614. font-size: $font-size-22;
  1615. color: #ffffff;
  1616. text-align: center;
  1617. position: absolute;
  1618. left: 0;
  1619. top: 6rpx;
  1620. }
  1621. .p-title-share {
  1622. width: 80rpx;
  1623. height: 80rpx;
  1624. line-height: 80rpx;
  1625. position: fixed;
  1626. right: 20rpx;
  1627. bottom: 380rpx;
  1628. text-align: center;
  1629. box-sizing: border-box;
  1630. display: block;
  1631. background: rgba(255, 255, 255, 0.7);
  1632. margin: 0;
  1633. z-index: 20;
  1634. border: 1px solid #E1E1E1;
  1635. border-radius: 50%;
  1636. .icon-weixin {
  1637. font-size: 56rpx;
  1638. color: #07c160;
  1639. }
  1640. }
  1641. .tui-share-btn::after {
  1642. border: 0;
  1643. }
  1644. }
  1645. .wrap-main-text {
  1646. line-height: 56rpx;
  1647. color: #ff2a2a;
  1648. font-size: $font-size-26;
  1649. display: block;
  1650. float: left;
  1651. font-weight: normal;
  1652. }
  1653. .wrap-main-none {
  1654. display: block;
  1655. width: 256rpx;
  1656. height: 44rpx;
  1657. padding-left: 20rpx;
  1658. border-radius: 11rpx;
  1659. background: $btn-confirm;
  1660. float: right;
  1661. line-height: 44rpx;
  1662. color: #ffffff;
  1663. text-align: center;
  1664. font-size: $font-size-24;
  1665. }
  1666. .p-price-none {
  1667. height: 44rpx;
  1668. line-height: 44rpx;
  1669. float: left;
  1670. font-size: $font-size-24;
  1671. color: #666;
  1672. text-decoration: line-through;
  1673. margin-left: 8rpx;
  1674. }
  1675. .p-minBuy {
  1676. height: 44rpx;
  1677. line-height: 44rpx;
  1678. float: right;
  1679. padding: 0 18rpx;
  1680. border-radius: 22rpx;
  1681. background-color: #f7f7f7;
  1682. color: #7f7f7f;
  1683. font-size: 24rpx;
  1684. text-align: center;
  1685. .min-text {
  1686. margin: 0 6rpx;
  1687. }
  1688. }
  1689. .p-login {
  1690. height: 56rpx;
  1691. line-height: 56rpx;
  1692. color: $color-system;
  1693. font-size: $font-size-24;
  1694. &.grade {
  1695. .price-left {
  1696. float: left;
  1697. .none {
  1698. display: block;
  1699. font-size: $font-size-20;
  1700. line-height: 48rpx;
  1701. color: #4a4b54;
  1702. float: left;
  1703. font-weight: bold;
  1704. margin-left: 5rpx;
  1705. text {
  1706. letter-spacing: 4rpx;
  1707. font-size: $font-size-32;
  1708. }
  1709. }
  1710. }
  1711. }
  1712. .p-no {
  1713. float: left;
  1714. margin-right: 5rpx;
  1715. font-size: $font-size-28;
  1716. color: $text-color;
  1717. }
  1718. .p-login-btn {
  1719. display: block;
  1720. height: 44rpx;
  1721. padding: 0 10rpx 0 20rpx;
  1722. border-radius: 11rpx;
  1723. background: $btn-confirm;
  1724. float: right;
  1725. line-height: 44rpx;
  1726. color: #ffffff;
  1727. text-align: center;
  1728. font-size: $font-size-24;
  1729. }
  1730. }
  1731. }
  1732. .wrap-label {
  1733. float: left;
  1734. width: 85%;
  1735. box-sizing: border-box;
  1736. .label-a {
  1737. padding: 0 18rpx;
  1738. line-height: 32rpx;
  1739. font-size: $font-size-20;
  1740. color: $color-system;
  1741. text-align: center;
  1742. border-radius: 6rpx;
  1743. background: #ffe6dc;
  1744. margin: 0 20rpx 10rpx 0;
  1745. display: inline-block;
  1746. }
  1747. }
  1748. .wrap-top-price {
  1749. float: left;
  1750. width: 100%;
  1751. box-sizing: border-box;
  1752. .wrap-main-item {
  1753. width: 100%;
  1754. height: 56rpx;
  1755. .p-price {
  1756. height: 56rpx;
  1757. line-height: 56rpx;
  1758. float: left;
  1759. color: #ff2a2a;
  1760. font-weight: bold;
  1761. &.none {
  1762. text-decoration: line-through;
  1763. color: #999999;
  1764. font-weight: normal;
  1765. }
  1766. .txt {
  1767. margin: 0 2rpx;
  1768. }
  1769. .txt.sm {
  1770. font-size: $font-size-26;
  1771. }
  1772. .txt.big {
  1773. font-size: $font-size-34;
  1774. }
  1775. }
  1776. .p-right-price {
  1777. height: 56rpx;
  1778. line-height: 56rpx;
  1779. float: right;
  1780. color: #999999;
  1781. font-size: $font-size-30;
  1782. .none {
  1783. font-size: $font-size-26;
  1784. text-decoration: line-through;
  1785. }
  1786. }
  1787. }
  1788. .floor-item-act {
  1789. height: 56rpx;
  1790. text-align: center;
  1791. box-sizing: border-box;
  1792. float: left;
  1793. padding: 10rpx 0;
  1794. margin-left: 10rpx;
  1795. }
  1796. .floor-item-btn {
  1797. float: right;
  1798. height: 40rpx;
  1799. margin-top: 8rpx;
  1800. margin-left: 10rpx;
  1801. .btn {
  1802. line-height: 40rpx;
  1803. padding: 0 20rpx;
  1804. height: 40rpx;
  1805. background: $btn-confirm;
  1806. color: #ffffff;
  1807. font-size: $font-size-20;
  1808. border-radius: 20rpx;
  1809. }
  1810. }
  1811. }
  1812. .wrap-info {
  1813. float: left;
  1814. width: 702rpx;
  1815. padding: 24rpx 24rpx 0 24rpx;
  1816. border-bottom: 1px solid #f8f8f8;
  1817. .info-viewT {
  1818. width: 100%;
  1819. min-height: 40rpx;
  1820. font-size: $font-size-28;
  1821. color: $text-color;
  1822. line-height: 40rpx;
  1823. text-align: left;
  1824. &.none {
  1825. color: #999999;
  1826. }
  1827. .info-viewL {
  1828. min-width: 350rpx;
  1829. float: left;
  1830. margin-bottom: 24rpx;
  1831. }
  1832. .info-viewR {
  1833. min-width: 352rpx;
  1834. float: left;
  1835. margin-bottom: 24rpx;
  1836. }
  1837. }
  1838. .info-viewB {
  1839. width: 100%;
  1840. height: auto;
  1841. }
  1842. .info-f {
  1843. width: 50%;
  1844. float: left;
  1845. font-size: $font-size-28;
  1846. color: $text-color;
  1847. line-height: 40rpx;
  1848. margin-bottom: 24rpx;
  1849. text-align: left;
  1850. }
  1851. }
  1852. }
  1853. .product-seve {
  1854. width: 100%;
  1855. height: 70rpx;
  1856. background-color: #ffffff;
  1857. position: relative;
  1858. display: flex;
  1859. line-height: 70rpx;
  1860. .label {
  1861. font-size: $font-size-28;
  1862. color: #333333;
  1863. }
  1864. .iconfont {
  1865. color: #fea785;
  1866. margin-right: 20rpx;
  1867. font-size: $font-size-22;
  1868. }
  1869. .text {
  1870. font-size: $font-size-22;
  1871. color: #fea785;
  1872. margin-left: 10rpx;
  1873. }
  1874. }
  1875. .product-item-none {
  1876. min-height: 348rpx;
  1877. display: flex;
  1878. flex-direction: column;
  1879. align-items: center;
  1880. border-bottom: 16rpx solid #f7f7f7;
  1881. box-sizing: border-box;
  1882. padding: 40rpx 0;
  1883. .none-image {
  1884. width: 284rpx;
  1885. height: 225rpx;
  1886. }
  1887. .none-text {
  1888. text-align: center;
  1889. font-size: $font-size-28;
  1890. color: #fea785;
  1891. line-height: 40rpx;
  1892. }
  1893. }
  1894. .product-supporting {
  1895. width: 100%;
  1896. height: 262rpx;
  1897. box-sizing: border-box;
  1898. padding: 24rpx;
  1899. background-color: #ffffff;
  1900. border-bottom: 16rpx solid #f7f7f7;
  1901. .product-supporting-title {
  1902. width: 100%;
  1903. height: 40rpx;
  1904. text-align: left;
  1905. line-height: 40rpx;
  1906. font-size: $font-size-28;
  1907. color: #333333;
  1908. }
  1909. .product-supporting-list {
  1910. width: 100%;
  1911. height: 154rpx;
  1912. box-sizing: border-box;
  1913. padding: 13rpx 0;
  1914. position: relative;
  1915. .icon-xiayibu {
  1916. line-height: 154rpx;
  1917. display: inline-block;
  1918. position: absolute;
  1919. width: 80rpx;
  1920. top: 0;
  1921. right: 0;
  1922. color: #b2b2b2;
  1923. text-align: right;
  1924. }
  1925. .list {
  1926. width: 128rpx;
  1927. height: 128rpx;
  1928. margin-right: 24rpx;
  1929. float: left;
  1930. border: 1px solid #e1e1e1;
  1931. border-radius: 8rpx;
  1932. .list-image {
  1933. width: 100%;
  1934. height: 100%;
  1935. display: block;
  1936. border-radius: 8rpx;
  1937. }
  1938. }
  1939. }
  1940. }
  1941. .return-instructions {
  1942. padding: 0 24rpx;
  1943. border-bottom: 16rpx solid #f7f7f7;
  1944. }
  1945. .product-parameter {
  1946. width: 702rpx;
  1947. height: 90rpx;
  1948. padding: 0 24rpx;
  1949. background-color: #ffffff;
  1950. position: relative;
  1951. border-bottom: 16rpx solid #f7f7f7;
  1952. &.coupon {
  1953. .title {
  1954. color: #f94b4b;
  1955. }
  1956. .icon-xiayibu {
  1957. color: #f94b4b;
  1958. }
  1959. .coupon {
  1960. float: right;
  1961. box-sizing: border-box;
  1962. padding: 29rpx 0;
  1963. padding-right: 35rpx;
  1964. .tags {
  1965. height: 32rpx;
  1966. box-sizing: border-box;
  1967. border-radius: 8rpx;
  1968. background-color: #fff1eb;
  1969. line-height: 28rpx;
  1970. color: #f94b4b;
  1971. text-align: center;
  1972. display: inline-block;
  1973. padding: 0 10rpx;
  1974. font-size: $font-size-20;
  1975. border: 1px solid #f94b4b;
  1976. float: right;
  1977. margin: 0 6rpx;
  1978. }
  1979. }
  1980. }
  1981. .title {
  1982. line-height: 90rpx;
  1983. display: inline-block;
  1984. float: left;
  1985. font-size: $font-size-28;
  1986. color: #666666;
  1987. }
  1988. .name {
  1989. line-height: 90rpx;
  1990. display: inline-block;
  1991. float: left;
  1992. font-size: $font-size-28;
  1993. color: $text-color;
  1994. padding-right: 48rpx;
  1995. overflow: hidden;
  1996. text-overflow: ellipsis;
  1997. white-space: nowrap;
  1998. text-align: right;
  1999. }
  2000. .icon-xiayibu {
  2001. line-height: 90rpx;
  2002. display: inline-block;
  2003. position: absolute;
  2004. width: 48rpx;
  2005. top: 0;
  2006. right: 0;
  2007. color: #b2b2b2;
  2008. }
  2009. }
  2010. .product-supplier {
  2011. width: 100%;
  2012. height: 164rpx;
  2013. padding: 20rpx 24rpx;
  2014. box-sizing: border-box;
  2015. background-color: #ffffff;
  2016. position: relative;
  2017. box-sizing: border-box;
  2018. border-bottom: 16rpx solid #f7f7f7;
  2019. .logo {
  2020. width: 100rpx;
  2021. height: 100rpx;
  2022. float: left;
  2023. border: 1px solid #efefef;
  2024. border-radius: 50%;
  2025. image {
  2026. width: 100%;
  2027. height: 100%;
  2028. display: block;
  2029. border-radius: 50%;
  2030. }
  2031. }
  2032. .main {
  2033. width: 470rpx;
  2034. height: 92rpx;
  2035. float: left;
  2036. margin-left: 20rpx;
  2037. .name {
  2038. width: 100%;
  2039. line-height: 46rpx;
  2040. float: left;
  2041. font-size: $font-size-28;
  2042. color: $text-color;
  2043. float: right;
  2044. overflow: hidden;
  2045. text-overflow: ellipsis;
  2046. white-space: nowrap;
  2047. text-align: left;
  2048. }
  2049. .massgs {
  2050. width: 100%;
  2051. line-height: 46rpx;
  2052. float: left;
  2053. font-size: $font-size-24;
  2054. color: #999999;
  2055. .label {
  2056. float: left;
  2057. }
  2058. .p-stars {
  2059. float: left;
  2060. margin-left: 20rpx;
  2061. }
  2062. .acount {
  2063. float: right;
  2064. text {
  2065. color: $color-system;
  2066. }
  2067. }
  2068. }
  2069. }
  2070. .icon-xiayibu {
  2071. line-height: 154rpx;
  2072. display: inline-block;
  2073. position: absolute;
  2074. width: 48rpx;
  2075. top: 0;
  2076. right: 0;
  2077. color: #b2b2b2;
  2078. }
  2079. }
  2080. .product-details {
  2081. width: 100%;
  2082. background: #ffffff;
  2083. border-bottom: 16rpx solid #f7f7f7;
  2084. &.recommend {
  2085. background-color: #f7f7f7;
  2086. border-bottom: none;
  2087. .title {
  2088. .title-tab {
  2089. background-color: #f7f7f7;
  2090. color: $text-color;
  2091. }
  2092. }
  2093. }
  2094. .product-details-image {
  2095. width: 100%;
  2096. min-height: 856rpx;
  2097. box-sizing: border-box;
  2098. padding: 0 24rpx;
  2099. .product-details-table {
  2100. width: 100%;
  2101. min-height: 160rpx;
  2102. border: 1px solid #e1e1e1;
  2103. border-radius: 10rpx;
  2104. .ladder-tr {
  2105. display: flex;
  2106. width: 100%;
  2107. justify-content: center;
  2108. height: 80rpx;
  2109. align-items: center;
  2110. border-bottom: 1px solid #e1e1e1;
  2111. &:last-child {
  2112. border-bottom: none;
  2113. }
  2114. .ladder-item-td {
  2115. height: 80rpx;
  2116. justify-content: center;
  2117. text-align: center;
  2118. box-sizing: border-box;
  2119. padding: 10rpx;
  2120. float: left;
  2121. .te-text {
  2122. line-height: 28rpx;
  2123. font-size: $font-size-24;
  2124. text-overflow: ellipsis;
  2125. display: -webkit-box;
  2126. word-break: break-all;
  2127. -webkit-box-orient: vertical;
  2128. -webkit-line-clamp: 2;
  2129. overflow: hidden;
  2130. color: #999999;
  2131. &.last {
  2132. width: 60%;
  2133. float: left;
  2134. }
  2135. }
  2136. .te-copy {
  2137. width: 40%;
  2138. float: right;
  2139. font-size: $font-size-24;
  2140. padding-top: 10rpx;
  2141. .clipboard {
  2142. width: 84rpx;
  2143. height: 36rpx;
  2144. background: #4688fa;
  2145. text-align: center;
  2146. font-size: $font-size-24;
  2147. color: #ffffff;
  2148. border-radius: 18rpx;
  2149. line-height: 36rpx;
  2150. display: inline-block;
  2151. }
  2152. }
  2153. &.th {
  2154. display: flex;
  2155. height: 80rpx;
  2156. align-items: center;
  2157. line-height: 80rpx;
  2158. font-size: 26rpx;
  2159. color: #666;
  2160. }
  2161. &:nth-child(1) {
  2162. width: 25%;
  2163. border-right: 1px solid #e1e1e1;
  2164. }
  2165. &:nth-child(2) {
  2166. width: 35%;
  2167. border-right: 1px solid #e1e1e1;
  2168. }
  2169. &:nth-child(3) {
  2170. width: 40%;
  2171. }
  2172. }
  2173. }
  2174. }
  2175. .qualificationImg-image {
  2176. width: 100%;
  2177. height: 856rpx;
  2178. display: block;
  2179. }
  2180. }
  2181. .product-rich-text-none {
  2182. box-sizing: border-box;
  2183. padding: 0 24rpx;
  2184. text-align: left;
  2185. font-size: 24rpx;
  2186. color: #999999;
  2187. line-height: 60rpx;
  2188. &.bold {
  2189. font-weight: bold;
  2190. color: #333333;
  2191. }
  2192. }
  2193. .content-none {
  2194. width: 100%;
  2195. height: 80rpx;
  2196. line-height: 80rpx;
  2197. text-align: left;
  2198. font-size: $font-size-26;
  2199. color: #999999;
  2200. box-sizing: border-box;
  2201. padding: 0 24rpx;
  2202. }
  2203. .title {
  2204. width: 100%;
  2205. box-sizing: border-box;
  2206. padding: 0 24rpx;
  2207. .title-tab {
  2208. width: 100%;
  2209. height: 100rpx;
  2210. background: #fff;
  2211. z-index: 10;
  2212. font-size: $font-size-30;
  2213. text-align: left;
  2214. color: $text-color;
  2215. line-height: 100rpx;
  2216. font-weight: 600;
  2217. }
  2218. .title-msg {
  2219. width: 100%;
  2220. height: 236rpx;
  2221. padding: 18rpx;
  2222. background-color: rgba(225, 86, 22, 0.1);
  2223. color: $color-system;
  2224. box-sizing: border-box;
  2225. margin-bottom: 30rpx;
  2226. .tit {
  2227. line-height: 46rpx;
  2228. font-size: $font-size-24;
  2229. text-align: left;
  2230. }
  2231. .txt {
  2232. line-height: 38rpx;
  2233. font-size: $font-size-20;
  2234. text-align: justify;
  2235. }
  2236. }
  2237. }
  2238. .content {
  2239. width: 100%;
  2240. background-color: #ffffff;
  2241. }
  2242. }
  2243. .isLower {
  2244. width: 100%;
  2245. height: 116rpx;
  2246. line-height: 116rpx;
  2247. text-align: center;
  2248. color: #000000;
  2249. font-size: $font-size-32;
  2250. font-weight: bold;
  2251. }
  2252. .bottom-btn {
  2253. width: 100%;
  2254. height: 100rpx;
  2255. position: fixed;
  2256. bottom: 0;
  2257. left: 0;
  2258. background: #ffffff;
  2259. z-index: 99;
  2260. .bottom-le {
  2261. width: 300rpx;
  2262. height: 100rpx;
  2263. padding: 10rpx 20rpx 10rpx 0;
  2264. float: left;
  2265. box-sizing: border-box;
  2266. .item-bt {
  2267. width: 80rpx;
  2268. height: 100%;
  2269. margin-right: 15rpx;
  2270. display: flex;
  2271. float: left;
  2272. flex-direction: column;
  2273. align-items: center;
  2274. justify-content: center;
  2275. font-size: $font-size-22;
  2276. color: $text-color;
  2277. line-height: 34rpx;
  2278. position: relative;
  2279. .animation-num {
  2280. font-size: $font-size-32;
  2281. color: #ff2a2a;
  2282. position: absolute;
  2283. top: -12rpx;
  2284. right: 4rpx;
  2285. font-weight: bold;
  2286. }
  2287. .animation {
  2288. animation: showAmnation 2.2s ease-in-out both;
  2289. }
  2290. .restion {
  2291. animation: hideAmnation 1s ease-in-out both;
  2292. }
  2293. .icon-num {
  2294. position: absolute;
  2295. right: -12rpx;
  2296. top: -5rpx;
  2297. }
  2298. .icon-num.goleft {
  2299. right: 2rpx;
  2300. }
  2301. &:last-child {
  2302. margin-right: 0;
  2303. }
  2304. image {
  2305. width: 44rpx;
  2306. height: 44rpx;
  2307. }
  2308. button.contact-btn {
  2309. width: 100%;
  2310. height: 100%;
  2311. margin: 0;
  2312. padding: 0;
  2313. display: flex;
  2314. flex-direction: column;
  2315. align-items: center;
  2316. justify-content: center;
  2317. box-sizing: border-box;
  2318. font-size: $font-size-24;
  2319. text-align: center;
  2320. text-decoration: none;
  2321. line-height: 34rpx;
  2322. border-radius: 0;
  2323. -webkit-tap-highlight-color: transparent;
  2324. overflow: hidden;
  2325. color: $text-color;
  2326. background-color: #ffffff;
  2327. }
  2328. }
  2329. }
  2330. .bottom-ri {
  2331. width: 450rpx;
  2332. height: 100%;
  2333. float: right;
  2334. display: flex;
  2335. box-sizing: border-box;
  2336. padding: 13rpx 20rpx 13rpx 0;
  2337. .btn {
  2338. flex: 1;
  2339. width: 200rpx;
  2340. line-height: 80rpx;
  2341. text-align: center;
  2342. font-size: $font-size-24;
  2343. color: #ffffff;
  2344. }
  2345. .btn-cart {
  2346. background-color: #ffe6dc;
  2347. color: $color-system;
  2348. border-radius: 42rpx 0 0 42rpx;
  2349. }
  2350. .btn-cart.disabled {
  2351. background-color: #e1e1e1;
  2352. color: #ffffff;
  2353. }
  2354. .btn-bay {
  2355. background: linear-gradient(to right, #f28f31 0%, #ff5b00 100%);
  2356. border-radius: 0 42rpx 42rpx 0;
  2357. }
  2358. .btn-bay.disabled {
  2359. background: linear-gradient(135deg, rgba(242, 143, 49, 0.5) 0%, rgba(225, 86, 22, 0.5) 100%);
  2360. }
  2361. }
  2362. }
  2363. .uni-badge--small {
  2364. -webkit-transform: scale(0.8);
  2365. -ms-transform: scale(0.8);
  2366. transform: scale(0.8);
  2367. -webkit-transform-origin: center center;
  2368. -ms-transform-origin: center center;
  2369. transform-origin: center center;
  2370. }
  2371. .uni-badge {
  2372. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  2373. -webkit-box-sizing: border-box;
  2374. box-sizing: border-box;
  2375. font-size: 12px;
  2376. line-height: 1;
  2377. display: inline-block;
  2378. padding: 3px 6px;
  2379. color: #333;
  2380. border-radius: 100px;
  2381. background-color: #f1f1f1;
  2382. }
  2383. .uni-badge-error {
  2384. color: #fff;
  2385. background-color: #dd524d;
  2386. }
  2387. .product-topnav {
  2388. width: 100%;
  2389. height: 174rpx;
  2390. box-sizing: border-box;
  2391. background: #ffffff;
  2392. z-index: 990;
  2393. position: fixed;
  2394. opacity: 1;
  2395. left: 0;
  2396. &.fixed {
  2397. animation: showFixedColor 0.1s ease-in-out both;
  2398. }
  2399. &.none {
  2400. animation: hideFixedColor 0.1s ease-in-out both;
  2401. }
  2402. .navbar {
  2403. width: 100%;
  2404. height: 60rpx;
  2405. box-sizing: border-box;
  2406. padding: 0 24rpx;
  2407. display: flex;
  2408. .nav-item {
  2409. display: flex;
  2410. flex: 1;
  2411. justify-content: center;
  2412. align-items: center;
  2413. height: 60rpx;
  2414. font-size: $font-size-28;
  2415. color: $text-color;
  2416. position: relative;
  2417. float: left;
  2418. position: relative;
  2419. .line {
  2420. width: 60rpx;
  2421. height: 2px;
  2422. border-radius: 1px;
  2423. background: #ffffff;
  2424. position: absolute;
  2425. bottom: 0;
  2426. left: 50%;
  2427. margin-left: -30rpx;
  2428. }
  2429. &.current {
  2430. color: $color-system;
  2431. .line {
  2432. background: $color-system;
  2433. }
  2434. }
  2435. }
  2436. }
  2437. .search-input {
  2438. width: 100%;
  2439. height: 114rpx;
  2440. padding: 24rpx;
  2441. box-sizing: border-box;
  2442. .gosearch-btn {
  2443. width: 100%;
  2444. height: 100%;
  2445. border-radius: 40rpx;
  2446. margin: 0 auto;
  2447. font-size: 26rpx;
  2448. line-height: 66rpx;
  2449. color: #b2b2b2;
  2450. position: relative;
  2451. box-sizing: border-box;
  2452. padding-left: 66rpx;
  2453. &.fixed {
  2454. background: rgba(70, 70, 70, 0.1);
  2455. }
  2456. &.none {
  2457. background: rgba(70, 70, 70, 0.1);
  2458. }
  2459. .search-icon {
  2460. width: 66rpx;
  2461. height: 66rpx;
  2462. position: absolute;
  2463. left: 0;
  2464. top: 2rpx;
  2465. text-align: center;
  2466. line-height: 66rpx;
  2467. .icon-iconfonticonfontsousuo1 {
  2468. margin: 0 6rpx;
  2469. font-size: $font-size-34;
  2470. color: #b2b2b2;
  2471. z-index: 10;
  2472. }
  2473. }
  2474. .search-text {
  2475. font-size: $font-size-24;
  2476. line-height: 66rpx;
  2477. color: #b2b2b2;
  2478. }
  2479. }
  2480. }
  2481. }
  2482. @keyframes showFixedColor {
  2483. 0% {
  2484. background: rgba(255, 255, 255, 0);
  2485. }
  2486. 50% {
  2487. background: rgba(255, 255, 255, 0.5);
  2488. }
  2489. 100% {
  2490. background: rgba(255, 255, 255, 1);
  2491. }
  2492. }
  2493. @keyframes hideFixedColor {
  2494. 0% {
  2495. background: rgba(255, 255, 255, 1);
  2496. }
  2497. 50% {
  2498. background: rgba(255, 255, 255, 0.5);
  2499. }
  2500. 100% {
  2501. background: rgba(255, 255, 255, 0);
  2502. }
  2503. }
  2504. /* 加入购物模态层*/
  2505. @keyframes showPopup {
  2506. 0% {
  2507. opacity: 0;
  2508. }
  2509. 100% {
  2510. opacity: 1;
  2511. }
  2512. }
  2513. @keyframes hidePopup {
  2514. 0% {
  2515. opacity: 1;
  2516. }
  2517. 100% {
  2518. opacity: 0;
  2519. }
  2520. }
  2521. @keyframes showLayer {
  2522. 0% {
  2523. transform: translateY(0);
  2524. }
  2525. 100% {
  2526. transform: translateY(-100%);
  2527. }
  2528. }
  2529. @keyframes hideLayer {
  2530. 0% {
  2531. transform: translateY(-100%);
  2532. }
  2533. 100% {
  2534. transform: translateY(0);
  2535. }
  2536. }
  2537. @keyframes showAmnation {
  2538. 0% {
  2539. top: -12rpx;
  2540. opacity: 0;
  2541. }
  2542. 50% {
  2543. top: -60rpx;
  2544. opacity: 1;
  2545. }
  2546. 100% {
  2547. top: -100rpx;
  2548. opacity: 0;
  2549. }
  2550. }
  2551. @keyframes hideAmnation {
  2552. 0% {
  2553. top: -100rpx;
  2554. opacity: 0;
  2555. }
  2556. 100% {
  2557. top: -12rpx;
  2558. opacity: 0;
  2559. }
  2560. }
  2561. .tui-popup-box {
  2562. position: relative;
  2563. box-sizing: border-box;
  2564. min-height: 220rpx;
  2565. padding: 40rpx 24rpx 0 24rpx;
  2566. .tui-popup-close {
  2567. width: 90rpx;
  2568. height: 90rpx;
  2569. position: absolute;
  2570. right: 0;
  2571. top: 24rpx;
  2572. line-height: 90rpx;
  2573. text-align: center;
  2574. color: #b2b2b2;
  2575. .icon-iconfontguanbi {
  2576. font-size: $font-size-40;
  2577. }
  2578. }
  2579. .title {
  2580. font-size: $font-size-34;
  2581. color: $text-color;
  2582. line-height: 88rpx;
  2583. text-align: center;
  2584. float: left;
  2585. width: 100%;
  2586. height: 88rpx;
  2587. font-weight: bold;
  2588. }
  2589. .tui-popup-main {
  2590. width: 100%;
  2591. float: left;
  2592. &.coupon {
  2593. padding-bottom: 40rpx;
  2594. .coupon-empty {
  2595. width: 100%;
  2596. height: 600rpx;
  2597. display: flex;
  2598. align-items: center;
  2599. justify-content: center;
  2600. flex-direction: column;
  2601. position: fixed;
  2602. background: $bg-color;
  2603. .empty-container-image {
  2604. width: 150rpx;
  2605. height: 150rpx;
  2606. margin-bottom: 0;
  2607. margin-top: 0;
  2608. }
  2609. .error-text {
  2610. font-size: $font-size-28;
  2611. color: #999999;
  2612. line-height: 88rpx;
  2613. }
  2614. }
  2615. }
  2616. .tui-popup-scroll {
  2617. width: 100%;
  2618. height: 600rpx;
  2619. .coupon-list {
  2620. width: 100%;
  2621. height: 200rpx;
  2622. margin-top: 24rpx;
  2623. box-sizing: border-box;
  2624. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  2625. background-size: cover;
  2626. &:last-child {
  2627. margin-bottom: 24rpx;
  2628. }
  2629. .list-cell-le {
  2630. width: 224rpx;
  2631. height: 100%;
  2632. box-sizing: border-box;
  2633. padding: 37rpx 0;
  2634. float: left;
  2635. .coupon-maxMoney {
  2636. width: 100%;
  2637. height: 78rpx;
  2638. line-height: 78rpx;
  2639. font-size: 56rpx;
  2640. color: #ffffff;
  2641. text-align: center;
  2642. &.six {
  2643. margin-top: 20rpx;
  2644. }
  2645. .small {
  2646. font-size: $font-size-24;
  2647. }
  2648. }
  2649. .coupon-minMoney {
  2650. width: 100%;
  2651. height: 33rpx;
  2652. line-height: 33rpx;
  2653. font-size: $font-size-24;
  2654. color: #ffffff;
  2655. text-align: center;
  2656. }
  2657. }
  2658. .list-cell-ri {
  2659. width: 478rpx;
  2660. height: 100%;
  2661. box-sizing: border-box;
  2662. padding: 20rpx 24rpx 0 24rpx;
  2663. float: right;
  2664. .list-cell-top {
  2665. width: 100%;
  2666. height: 121rpx;
  2667. float: left;
  2668. border-bottom: 1px solid #e1e1e1;
  2669. .list-cell-type {
  2670. width: 286rpx;
  2671. height: 100%;
  2672. float: left;
  2673. .list-cell-tags {
  2674. width: 100%;
  2675. height: 32rpx;
  2676. margin-bottom: 7rpx;
  2677. .tags {
  2678. display: inline-block;
  2679. padding: 0 10rpx;
  2680. height: 32rpx;
  2681. line-height: 32rpx;
  2682. background-color: #ffdcce;
  2683. color: #f94b4b;
  2684. font-size: $font-size-20;
  2685. border-radius: 8rpx;
  2686. text-align: center;
  2687. float: left;
  2688. }
  2689. }
  2690. .list-cell-texts {
  2691. width: 100%;
  2692. height: auto;
  2693. line-height: 35rpx;
  2694. text-overflow: ellipsis;
  2695. display: -webkit-box;
  2696. word-break: break-all;
  2697. -webkit-box-orient: vertical;
  2698. -webkit-line-clamp: 2;
  2699. overflow: hidden;
  2700. font-size: 26rpx;
  2701. color: #333333;
  2702. }
  2703. }
  2704. .list-cell-btn {
  2705. width: 128rpx;
  2706. height: 100%;
  2707. float: right;
  2708. .icon-used {
  2709. width: 100%;
  2710. height: 100%;
  2711. box-sizing: border-box;
  2712. padding-top: 28rpx;
  2713. .icon-used-text {
  2714. width: 100%;
  2715. text-align: center;
  2716. line-height: 26rpx;
  2717. font-size: $font-size-20;
  2718. color: #f94b4b;
  2719. }
  2720. .icon-used-btn {
  2721. width: 128rpx;
  2722. height: 48rpx;
  2723. border-radius: 28rpx;
  2724. line-height: 48rpx;
  2725. font-size: $font-size-26;
  2726. text-align: center;
  2727. &.receive {
  2728. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);
  2729. color: #ffffff;
  2730. }
  2731. &.make {
  2732. border: solid 1px #f94b4b;
  2733. color: #f94b4b;
  2734. }
  2735. }
  2736. }
  2737. }
  2738. }
  2739. .list-cell-time {
  2740. width: 100%;
  2741. height: 58rpx;
  2742. line-height: 58rpx;
  2743. text-align: left;
  2744. font-size: $font-size-20;
  2745. color: #999999;
  2746. }
  2747. }
  2748. }
  2749. &.train {
  2750. height: 240rpx;
  2751. }
  2752. .content-tr {
  2753. width: 100%;
  2754. min-height: 58rpx;
  2755. line-height: 58rpx;
  2756. display: flex;
  2757. .content-td {
  2758. display: flex;
  2759. flex: 3;
  2760. font-size: $font-size-26;
  2761. color: #999999;
  2762. line-height: 58rpx;
  2763. text-align: left;
  2764. }
  2765. .content-th {
  2766. display: flex;
  2767. flex: 7;
  2768. font-size: $font-size-26;
  2769. color: #333333;
  2770. line-height: 58rpx;
  2771. text-align: left;
  2772. padding-left: 10rpx;
  2773. }
  2774. }
  2775. }
  2776. }
  2777. .tui-shopping-main {
  2778. width: 100%;
  2779. .layer-smimg {
  2780. width: 114rpx;
  2781. height: 114rpx;
  2782. float: left;
  2783. border-radius: 10rpx;
  2784. margin-right: 24rpx;
  2785. image {
  2786. width: 114rpx;
  2787. height: 114rpx;
  2788. border-radius: 10rpx;
  2789. }
  2790. }
  2791. .layer-nunbox {
  2792. justify-content: space-between;
  2793. align-items: center;
  2794. width: 536rpx;
  2795. height: auto;
  2796. float: left;
  2797. .layer-nunbox-t {
  2798. width: 100%;
  2799. height: 44rpx;
  2800. position: relative;
  2801. display: flex;
  2802. margin-bottom: 10rpx;
  2803. .text {
  2804. font-size: $font-size-24;
  2805. line-height: 48rpx;
  2806. color: #999999;
  2807. }
  2808. .layer-nunbox-text {
  2809. line-height: 44rpx;
  2810. font-size: $font-size-28;
  2811. }
  2812. .number-box {
  2813. display: flex;
  2814. justify-content: center;
  2815. align-items: center;
  2816. border: 2rpx solid #ffe6dc;
  2817. border-radius: 30rpx;
  2818. height: 48rpx;
  2819. margin-left: 20rpx;
  2820. .iconfont {
  2821. font-size: $font-size-24;
  2822. padding: 0 18rpx;
  2823. color: #999999;
  2824. text-align: center;
  2825. line-height: 48rpx;
  2826. font-weight: bold;
  2827. background: #fef6f3;
  2828. &.icon-jianhao {
  2829. border-radius: 30rpx 0 0 30rpx;
  2830. }
  2831. &.icon-jiahao {
  2832. border-radius: 0 30rpx 30rpx 0;
  2833. }
  2834. }
  2835. .btn-input {
  2836. width: 62rpx;
  2837. height: 48rpx;
  2838. line-height: 48rpx;
  2839. background: #ffffff;
  2840. border-radius: 4rpx;
  2841. text-align: center;
  2842. font-size: $font-size-28;
  2843. }
  2844. }
  2845. .product-step {
  2846. position: absolute;
  2847. left: 45rpx;
  2848. bottom: 0;
  2849. height: 44rpx;
  2850. background: #ffffff;
  2851. }
  2852. }
  2853. .layer-nunbox-b {
  2854. width: 100%;
  2855. height: 44rpx;
  2856. margin-top: 13rpx;
  2857. }
  2858. .text {
  2859. line-height: 44rpx;
  2860. font-size: $font-size-28;
  2861. .p {
  2862. color: #ff2a2a;
  2863. }
  2864. .p:first-child {
  2865. margin-left: 30rpx;
  2866. }
  2867. .p.sm {
  2868. font-size: $font-size-24;
  2869. }
  2870. }
  2871. }
  2872. }
  2873. }
  2874. .tui-popup-btn {
  2875. width: 100%;
  2876. height: auto;
  2877. float: left;
  2878. margin-top: 24rpx;
  2879. .tui-button {
  2880. width: 100%;
  2881. height: 88rpx;
  2882. background: $btn-confirm;
  2883. line-height: 88rpx;
  2884. text-align: center;
  2885. color: #ffffff;
  2886. font-size: $font-size-28;
  2887. border-radius: 44rpx;
  2888. }
  2889. }
  2890. /*富文本样式*/
  2891. rich-text.p {
  2892. width: 702rpx !important;
  2893. padding: 0 24rpx;
  2894. text-align: justify;
  2895. }
  2896. rich-text.img {
  2897. width: 100%;
  2898. height: auto;
  2899. }
  2900. </style>