product.vue 69 KB

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