product.vue 73 KB

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