product.vue 78 KB

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