product.vue 79 KB

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