product.vue 77 KB

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