product.vue 75 KB

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