product.vue 74 KB

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