product.vue 78 KB

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