product.vue 79 KB

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