product.vue 77 KB

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