product.vue 77 KB

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