product.vue 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978
  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: 2
  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. float: left;
  1690. }
  1691. .cm-product-cover {
  1692. width: 120rpx;
  1693. height: 77rpx;
  1694. // right: 30rpx;
  1695. // top: 30rpx;
  1696. // width: 147rpx;
  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. margin-left: 10rpx;
  1705. }
  1706. }
  1707. .banner {
  1708. width: 100%;
  1709. height: 750rpx;
  1710. .product-img {
  1711. width: 750rpx;
  1712. }
  1713. image {
  1714. width: 100%;
  1715. height: 100%;
  1716. }
  1717. .banner-item {
  1718. position: relative;
  1719. }
  1720. }
  1721. .swiper__dots-box {
  1722. position: absolute;
  1723. color: #fff;
  1724. bottom: 30rpx;
  1725. right: 0;
  1726. }
  1727. .product-wrap {
  1728. width: 100%;
  1729. height: auto;
  1730. padding: 24rpx 0 0 0;
  1731. background-color: #ffffff;
  1732. border-bottom: 20rpx solid #f7f7f7;
  1733. .productRemarks {
  1734. height: 48rpx;
  1735. width: 100%;
  1736. float: left;
  1737. line-height: 48rpx;
  1738. font-size: 24rpx;
  1739. color: #999999;
  1740. text-align: left;
  1741. }
  1742. .wrap-top {
  1743. width: 702rpx;
  1744. padding: 0 24rpx;
  1745. height: auto;
  1746. float: left;
  1747. padding-bottom: 20rpx;
  1748. border-bottom: 1px solid #f8f8f8;
  1749. &.none {
  1750. .p-title {
  1751. color: #999999;
  1752. }
  1753. }
  1754. .p-title {
  1755. width: 100%;
  1756. height: auto;
  1757. float: left;
  1758. position: relative;
  1759. .p-title-name {
  1760. width: 602rpx;
  1761. height: auto;
  1762. float: left;
  1763. line-height: 48rpx;
  1764. font-size: $font-size-28;
  1765. color: $text-color;
  1766. -o-text-overflow: ellipsis;
  1767. text-overflow: ellipsis;
  1768. display: -webkit-box;
  1769. word-break: break-all;
  1770. -webkit-box-orient: vertical;
  1771. -webkit-line-clamp: 2;
  1772. overflow: hidden;
  1773. &.indent {
  1774. text-indent: 95rpx;
  1775. }
  1776. }
  1777. .mclap-tag {
  1778. display: block;
  1779. width: 84rpx;
  1780. height: 32rpx;
  1781. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  1782. border-radius: 4rpx 48rpx 4px 4px;
  1783. line-height: 32rpx;
  1784. font-size: $font-size-22;
  1785. color: #ffffff;
  1786. text-align: center;
  1787. position: absolute;
  1788. left: 0;
  1789. top: 6rpx;
  1790. }
  1791. .p-title-share {
  1792. width: 96rpx;
  1793. height: 96rpx;
  1794. position: absolute;
  1795. right: 0;
  1796. text-align: center;
  1797. color: #999999;
  1798. font-size: $font-size-24;
  1799. box-sizing: border-box;
  1800. display: block;
  1801. background: transparent;
  1802. border-radius: 0;
  1803. border: 0;
  1804. margin: 0;
  1805. padding: 8rpx 0;
  1806. z-index: 20;
  1807. .icon-fenxiang1 {
  1808. font-size: $font-size-34;
  1809. }
  1810. }
  1811. .tui-share-btn::after {
  1812. border: 0;
  1813. }
  1814. }
  1815. .wrap-main-text {
  1816. line-height: 56rpx;
  1817. color: #ff2a2a;
  1818. font-size: $font-size-26;
  1819. display: block;
  1820. float: left;
  1821. font-weight: normal;
  1822. }
  1823. .wrap-main-none {
  1824. display: block;
  1825. width: 256rpx;
  1826. height: 44rpx;
  1827. padding-left: 20rpx;
  1828. border-radius: 11rpx;
  1829. background: $btn-confirm;
  1830. float: right;
  1831. line-height: 44rpx;
  1832. color: #ffffff;
  1833. text-align: center;
  1834. font-size: $font-size-24;
  1835. }
  1836. .p-price-none {
  1837. height: 44rpx;
  1838. line-height: 44rpx;
  1839. float: left;
  1840. font-size: $font-size-24;
  1841. color: #666;
  1842. text-decoration: line-through;
  1843. margin-left: 8rpx;
  1844. }
  1845. .p-minBuy {
  1846. height: 44rpx;
  1847. line-height: 44rpx;
  1848. float: right;
  1849. padding: 0 18rpx;
  1850. border-radius: 22rpx;
  1851. background-color: #f7f7f7;
  1852. color: #7f7f7f;
  1853. font-size: 24rpx;
  1854. text-align: center;
  1855. .min-text {
  1856. margin: 0 6rpx;
  1857. }
  1858. }
  1859. .p-login {
  1860. height: 56rpx;
  1861. line-height: 56rpx;
  1862. color: $color-system;
  1863. font-size: $font-size-24;
  1864. &.grade {
  1865. .price-left {
  1866. float: left;
  1867. .none {
  1868. display: block;
  1869. font-size: $font-size-20;
  1870. line-height: 48rpx;
  1871. color: #4a4b54;
  1872. float: left;
  1873. font-weight: bold;
  1874. margin-left: 5rpx;
  1875. text {
  1876. letter-spacing: 4rpx;
  1877. font-size: $font-size-32;
  1878. }
  1879. }
  1880. }
  1881. }
  1882. .p-no {
  1883. float: left;
  1884. margin-right: 5rpx;
  1885. font-size: $font-size-28;
  1886. color: $text-color;
  1887. }
  1888. .p-login-btn {
  1889. display: block;
  1890. height: 44rpx;
  1891. padding: 0 10rpx 0 20rpx;
  1892. border-radius: 11rpx;
  1893. background: $btn-confirm;
  1894. float: right;
  1895. line-height: 44rpx;
  1896. color: #ffffff;
  1897. text-align: center;
  1898. font-size: $font-size-24;
  1899. }
  1900. }
  1901. }
  1902. .wrap-label {
  1903. float: left;
  1904. width: 85%;
  1905. box-sizing: border-box;
  1906. .label-a {
  1907. padding: 0 18rpx;
  1908. line-height: 32rpx;
  1909. font-size: $font-size-20;
  1910. color: $color-system;
  1911. text-align: center;
  1912. border-radius: 6rpx;
  1913. background: #ffe6dc;
  1914. margin: 0 20rpx 15rpx 0;
  1915. display: inline-block;
  1916. }
  1917. }
  1918. .wrap-top-price {
  1919. float: left;
  1920. width: 100%;
  1921. box-sizing: border-box;
  1922. .wrap-main-item {
  1923. width: 100%;
  1924. height: 56rpx;
  1925. .p-price {
  1926. height: 56rpx;
  1927. line-height: 56rpx;
  1928. float: left;
  1929. color: #ff2a2a;
  1930. font-weight: bold;
  1931. &.none {
  1932. text-decoration: line-through;
  1933. color: #999999;
  1934. font-weight: normal;
  1935. }
  1936. .txt {
  1937. margin: 0 2rpx;
  1938. }
  1939. .txt.sm {
  1940. font-size: $font-size-26;
  1941. }
  1942. .txt.big {
  1943. font-size: $font-size-34;
  1944. }
  1945. }
  1946. }
  1947. .floor-item-act {
  1948. height: 56rpx;
  1949. text-align: center;
  1950. box-sizing: border-box;
  1951. float: left;
  1952. padding: 10rpx 0;
  1953. margin-left: 10rpx;
  1954. }
  1955. .floor-item-btn {
  1956. float: right;
  1957. height: 40rpx;
  1958. margin-top: 8rpx;
  1959. margin-left: 10rpx;
  1960. .btn {
  1961. line-height: 40rpx;
  1962. padding: 0 20rpx;
  1963. height: 40rpx;
  1964. background: $btn-confirm;
  1965. color: #ffffff;
  1966. font-size: $font-size-20;
  1967. border-radius: 4rpx;
  1968. }
  1969. }
  1970. }
  1971. .wrap-info {
  1972. float: left;
  1973. width: 702rpx;
  1974. padding: 24rpx 24rpx 0 24rpx;
  1975. border-bottom: 1px solid #f8f8f8;
  1976. .info-viewT {
  1977. width: 100%;
  1978. min-height: 40rpx;
  1979. font-size: $font-size-28;
  1980. color: $text-color;
  1981. line-height: 40rpx;
  1982. text-align: left;
  1983. &.none {
  1984. color: #999999;
  1985. }
  1986. .info-viewL {
  1987. min-width: 350rpx;
  1988. float: left;
  1989. margin-bottom: 24rpx;
  1990. }
  1991. .info-viewR {
  1992. min-width: 352rpx;
  1993. float: left;
  1994. margin-bottom: 24rpx;
  1995. }
  1996. }
  1997. .info-viewB {
  1998. width: 100%;
  1999. height: auto;
  2000. }
  2001. .info-f {
  2002. width: 50%;
  2003. float: left;
  2004. font-size: $font-size-28;
  2005. color: $text-color;
  2006. line-height: 40rpx;
  2007. margin-bottom: 24rpx;
  2008. text-align: left;
  2009. }
  2010. }
  2011. }
  2012. .product-seve {
  2013. width: 100%;
  2014. height: 60rpx;
  2015. background-color: #ffffff;
  2016. position: relative;
  2017. display: flex;
  2018. line-height: 60rpx;
  2019. .label {
  2020. font-size: $font-size-28;
  2021. color: #333333;
  2022. }
  2023. .iconfont {
  2024. color: #fea785;
  2025. margin-right: 20rpx;
  2026. font-size: $font-size-22;
  2027. }
  2028. .text {
  2029. font-size: $font-size-22;
  2030. color: #fea785;
  2031. margin-left: 10rpx;
  2032. }
  2033. }
  2034. .product-item-none {
  2035. min-height: 348rpx;
  2036. display: flex;
  2037. flex-direction: column;
  2038. align-items: center;
  2039. border-bottom: 20rpx solid #f7f7f7;
  2040. box-sizing: border-box;
  2041. padding: 40rpx 0;
  2042. .none-image {
  2043. width: 284rpx;
  2044. height: 225rpx;
  2045. }
  2046. .none-text {
  2047. text-align: center;
  2048. font-size: $font-size-28;
  2049. color: #fea785;
  2050. line-height: 40rpx;
  2051. }
  2052. }
  2053. .product-supporting {
  2054. width: 100%;
  2055. height: 274rpx;
  2056. box-sizing: border-box;
  2057. padding: 30rpx 24rpx;
  2058. background-color: #ffffff;
  2059. border-bottom: 20rpx solid #f7f7f7;
  2060. .product-supporting-title {
  2061. width: 100%;
  2062. height: 40rpx;
  2063. text-align: left;
  2064. line-height: 40rpx;
  2065. font-size: $font-size-28;
  2066. color: #333333;
  2067. }
  2068. .product-supporting-list {
  2069. width: 100%;
  2070. height: 154rpx;
  2071. box-sizing: border-box;
  2072. padding: 13rpx 0;
  2073. position: relative;
  2074. .icon-xiayibu {
  2075. line-height: 154rpx;
  2076. display: inline-block;
  2077. position: absolute;
  2078. width: 80rpx;
  2079. top: 0;
  2080. right: 0;
  2081. color: #b2b2b2;
  2082. text-align: right;
  2083. }
  2084. .list {
  2085. width: 128rpx;
  2086. height: 128rpx;
  2087. margin-right: 24rpx;
  2088. float: left;
  2089. border: 1px solid #e1e1e1;
  2090. border-radius: 8rpx;
  2091. .list-image {
  2092. width: 100%;
  2093. height: 100%;
  2094. display: block;
  2095. border-radius: 8rpx;
  2096. }
  2097. }
  2098. }
  2099. }
  2100. .product-parameter {
  2101. width: 702rpx;
  2102. height: 90rpx;
  2103. padding: 0 24rpx;
  2104. background-color: #ffffff;
  2105. position: relative;
  2106. border-bottom: 20rpx solid #f7f7f7;
  2107. &.coupon {
  2108. .title {
  2109. color: #f94b4b;
  2110. }
  2111. .icon-xiayibu {
  2112. color: #f94b4b;
  2113. }
  2114. .coupon {
  2115. float: right;
  2116. box-sizing: border-box;
  2117. padding: 29rpx 0;
  2118. padding-right: 35rpx;
  2119. .tags {
  2120. height: 32rpx;
  2121. box-sizing: border-box;
  2122. border-radius: 8rpx;
  2123. background-color: #fff1eb;
  2124. line-height: 28rpx;
  2125. color: #f94b4b;
  2126. text-align: center;
  2127. display: inline-block;
  2128. padding: 0 10rpx;
  2129. font-size: $font-size-20;
  2130. border: 1px solid #f94b4b;
  2131. float: right;
  2132. margin: 0 6rpx;
  2133. }
  2134. }
  2135. }
  2136. .title {
  2137. line-height: 90rpx;
  2138. display: inline-block;
  2139. float: left;
  2140. font-size: $font-size-28;
  2141. color: #666666;
  2142. }
  2143. .name {
  2144. line-height: 90rpx;
  2145. display: inline-block;
  2146. float: left;
  2147. font-size: $font-size-28;
  2148. color: $text-color;
  2149. padding-right: 48rpx;
  2150. overflow: hidden;
  2151. text-overflow: ellipsis;
  2152. white-space: nowrap;
  2153. text-align: right;
  2154. }
  2155. .icon-xiayibu {
  2156. line-height: 90rpx;
  2157. display: inline-block;
  2158. position: absolute;
  2159. width: 48rpx;
  2160. top: 0;
  2161. right: 0;
  2162. color: #b2b2b2;
  2163. }
  2164. }
  2165. .product-supplier {
  2166. width: 100%;
  2167. height: 174rpx;
  2168. padding: 30rpx 24rpx;
  2169. box-sizing: border-box;
  2170. background-color: #ffffff;
  2171. position: relative;
  2172. box-sizing: border-box;
  2173. border-bottom: 20rpx solid #f7f7f7;
  2174. .logo {
  2175. width: 128rpx;
  2176. height: 92rpx;
  2177. float: left;
  2178. border: 1px solid #efefef;
  2179. border-radius: 6rpx;
  2180. image {
  2181. width: 100%;
  2182. height: 100%;
  2183. display: block;
  2184. border-radius: 6rpx;
  2185. }
  2186. }
  2187. .main {
  2188. width: 470rpx;
  2189. height: 92rpx;
  2190. float: left;
  2191. margin-left: 20rpx;
  2192. .name {
  2193. width: 100%;
  2194. line-height: 46rpx;
  2195. float: left;
  2196. font-size: $font-size-28;
  2197. color: $text-color;
  2198. float: right;
  2199. overflow: hidden;
  2200. text-overflow: ellipsis;
  2201. white-space: nowrap;
  2202. text-align: left;
  2203. }
  2204. .massgs {
  2205. width: 100%;
  2206. line-height: 46rpx;
  2207. float: left;
  2208. font-size: $font-size-24;
  2209. color: #999999;
  2210. .label {
  2211. float: left;
  2212. }
  2213. .p-stars {
  2214. float: left;
  2215. margin-left: 20rpx;
  2216. }
  2217. .acount {
  2218. float: right;
  2219. text {
  2220. color: $color-system;
  2221. }
  2222. }
  2223. }
  2224. }
  2225. .icon-xiayibu {
  2226. line-height: 154rpx;
  2227. display: inline-block;
  2228. position: absolute;
  2229. width: 48rpx;
  2230. top: 0;
  2231. right: 0;
  2232. color: #b2b2b2;
  2233. }
  2234. }
  2235. .product-details {
  2236. width: 100%;
  2237. background: #ffffff;
  2238. border-bottom: 20rpx solid #f7f7f7;
  2239. &.service {
  2240. border-bottom: none;
  2241. }
  2242. &.recommend {
  2243. background-color: #f7f7f7;
  2244. border-bottom: none;
  2245. .title {
  2246. .title-tab {
  2247. background-color: #f7f7f7;
  2248. color: $text-color;
  2249. }
  2250. }
  2251. }
  2252. .product-rich-text-none {
  2253. box-sizing: border-box;
  2254. padding: 0 24rpx;
  2255. text-align: left;
  2256. font-size: 24rpx;
  2257. color: #999999;
  2258. line-height: 60rpx;
  2259. &.bold {
  2260. font-weight: bold;
  2261. color: #333333;
  2262. }
  2263. }
  2264. .content-none {
  2265. width: 100%;
  2266. height: 80rpx;
  2267. line-height: 80rpx;
  2268. text-align: left;
  2269. font-size: $font-size-26;
  2270. color: #999999;
  2271. box-sizing: border-box;
  2272. padding: 0 24rpx;
  2273. }
  2274. .title {
  2275. width: 100%;
  2276. box-sizing: border-box;
  2277. padding: 0 24rpx;
  2278. .title-tab {
  2279. width: 100%;
  2280. height: 100rpx;
  2281. background: #fff;
  2282. z-index: 10;
  2283. font-size: $font-size-30;
  2284. text-align: left;
  2285. color: $text-color;
  2286. line-height: 100rpx;
  2287. font-weight: 600;
  2288. }
  2289. .title-msg {
  2290. width: 100%;
  2291. height: 236rpx;
  2292. padding: 18rpx;
  2293. background-color: rgba(225, 86, 22, 0.1);
  2294. color: $color-system;
  2295. box-sizing: border-box;
  2296. margin-bottom: 30rpx;
  2297. .tit {
  2298. line-height: 46rpx;
  2299. font-size: $font-size-24;
  2300. text-align: left;
  2301. }
  2302. .txt {
  2303. line-height: 38rpx;
  2304. font-size: $font-size-20;
  2305. text-align: justify;
  2306. }
  2307. }
  2308. }
  2309. .content {
  2310. width: 100%;
  2311. background-color: #ffffff;
  2312. }
  2313. }
  2314. .isLower {
  2315. width: 100%;
  2316. height: 116rpx;
  2317. line-height: 116rpx;
  2318. text-align: center;
  2319. color: #000000;
  2320. font-size: $font-size-32;
  2321. font-weight: bold;
  2322. }
  2323. .bottom-btn {
  2324. width: 100%;
  2325. height: 100rpx;
  2326. position: fixed;
  2327. bottom: 0;
  2328. left: 0;
  2329. background: #ffffff;
  2330. z-index: 99;
  2331. .bottom-le {
  2332. width: 300rpx;
  2333. height: 100rpx;
  2334. padding: 10rpx 20rpx 10rpx 0;
  2335. float: left;
  2336. box-sizing: border-box;
  2337. .item-bt {
  2338. width: 80rpx;
  2339. height: 100%;
  2340. margin-right: 15rpx;
  2341. display: flex;
  2342. float: left;
  2343. flex-direction: column;
  2344. align-items: center;
  2345. justify-content: center;
  2346. font-size: $font-size-22;
  2347. color: $text-color;
  2348. line-height: 34rpx;
  2349. position: relative;
  2350. .animation-num {
  2351. font-size: $font-size-32;
  2352. color: #ff2a2a;
  2353. position: absolute;
  2354. top: -12rpx;
  2355. right: 4rpx;
  2356. font-weight: bold;
  2357. }
  2358. .animation {
  2359. animation: showAmnation 2.2s ease-in-out both;
  2360. }
  2361. .restion {
  2362. animation: hideAmnation 1s ease-in-out both;
  2363. }
  2364. .icon-num {
  2365. position: absolute;
  2366. right: -12rpx;
  2367. top: -5rpx;
  2368. }
  2369. .icon-num.goleft {
  2370. right: 2rpx;
  2371. }
  2372. &:last-child {
  2373. margin-right: 0;
  2374. }
  2375. image {
  2376. width: 44rpx;
  2377. height: 44rpx;
  2378. }
  2379. button.contact-btn {
  2380. width: 100%;
  2381. height: 100%;
  2382. margin: 0;
  2383. padding: 0;
  2384. display: flex;
  2385. flex-direction: column;
  2386. align-items: center;
  2387. justify-content: center;
  2388. box-sizing: border-box;
  2389. font-size: $font-size-24;
  2390. text-align: center;
  2391. text-decoration: none;
  2392. line-height: 34rpx;
  2393. border-radius: 0;
  2394. -webkit-tap-highlight-color: transparent;
  2395. overflow: hidden;
  2396. color: $text-color;
  2397. background-color: #ffffff;
  2398. }
  2399. }
  2400. }
  2401. .bottom-ri {
  2402. width: 450rpx;
  2403. height: 100%;
  2404. float: right;
  2405. display: flex;
  2406. box-sizing: border-box;
  2407. padding: 13rpx 20rpx 13rpx 0;
  2408. .btn {
  2409. flex: 1;
  2410. width: 200rpx;
  2411. line-height: 80rpx;
  2412. text-align: center;
  2413. font-size: $font-size-24;
  2414. color: #ffffff;
  2415. }
  2416. .btn-cart {
  2417. background-color: #ffe6dc;
  2418. color: $color-system;
  2419. border-radius: 42rpx 0 0 42rpx;
  2420. }
  2421. .btn-cart.disabled {
  2422. background-color: #e1e1e1;
  2423. color: #ffffff;
  2424. }
  2425. .btn-bay {
  2426. background: linear-gradient(to right, #f28f31 0%, #e15616 100%);
  2427. border-radius: 0 42rpx 42rpx 0;
  2428. }
  2429. .btn-bay.disabled {
  2430. background: linear-gradient(135deg, rgba(242, 143, 49, 0.5) 0%, rgba(225, 86, 22, 0.5) 100%);
  2431. }
  2432. }
  2433. }
  2434. .uni-badge--small {
  2435. -webkit-transform: scale(0.8);
  2436. -ms-transform: scale(0.8);
  2437. transform: scale(0.8);
  2438. -webkit-transform-origin: center center;
  2439. -ms-transform-origin: center center;
  2440. transform-origin: center center;
  2441. }
  2442. .uni-badge {
  2443. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  2444. -webkit-box-sizing: border-box;
  2445. box-sizing: border-box;
  2446. font-size: 12px;
  2447. line-height: 1;
  2448. display: inline-block;
  2449. padding: 3px 6px;
  2450. color: #333;
  2451. border-radius: 100px;
  2452. background-color: #f1f1f1;
  2453. }
  2454. .uni-badge-error {
  2455. color: #fff;
  2456. background-color: #dd524d;
  2457. }
  2458. .product-topnav {
  2459. width: 100%;
  2460. height: 174rpx;
  2461. box-sizing: border-box;
  2462. background: #ffffff;
  2463. z-index: 990;
  2464. position: fixed;
  2465. opacity: 1;
  2466. left: 0;
  2467. &.fixed {
  2468. animation: showFixedColor 0.1s ease-in-out both;
  2469. }
  2470. &.none {
  2471. animation: hideFixedColor 0.1s ease-in-out both;
  2472. }
  2473. .navbar {
  2474. width: 100%;
  2475. height: 60rpx;
  2476. box-sizing: border-box;
  2477. padding: 0 24rpx;
  2478. display: flex;
  2479. .nav-item {
  2480. display: flex;
  2481. flex: 1;
  2482. justify-content: center;
  2483. align-items: center;
  2484. height: 60rpx;
  2485. font-size: $font-size-28;
  2486. color: $text-color;
  2487. position: relative;
  2488. float: left;
  2489. position: relative;
  2490. .line {
  2491. width: 60rpx;
  2492. height: 2px;
  2493. border-radius: 1px;
  2494. background: #ffffff;
  2495. position: absolute;
  2496. bottom: 0;
  2497. left: 50%;
  2498. margin-left: -30rpx;
  2499. }
  2500. &.current {
  2501. color: $color-system;
  2502. .line {
  2503. background: $color-system;
  2504. }
  2505. }
  2506. }
  2507. }
  2508. .search-input {
  2509. width: 100%;
  2510. height: 114rpx;
  2511. padding: 24rpx;
  2512. box-sizing: border-box;
  2513. .gosearch-btn {
  2514. width: 100%;
  2515. height: 100%;
  2516. border-radius: 40rpx;
  2517. margin: 0 auto;
  2518. font-size: 26rpx;
  2519. line-height: 66rpx;
  2520. color: #b2b2b2;
  2521. position: relative;
  2522. box-sizing: border-box;
  2523. padding-left: 66rpx;
  2524. &.fixed {
  2525. background: rgba(70, 70, 70, 0.1);
  2526. }
  2527. &.none {
  2528. background: rgba(70, 70, 70, 0.1);
  2529. }
  2530. .search-icon {
  2531. width: 66rpx;
  2532. height: 66rpx;
  2533. position: absolute;
  2534. left: 0;
  2535. top: 2rpx;
  2536. text-align: center;
  2537. line-height: 66rpx;
  2538. .icon-iconfonticonfontsousuo1 {
  2539. margin: 0 6rpx;
  2540. font-size: $font-size-34;
  2541. color: #b2b2b2;
  2542. z-index: 10;
  2543. }
  2544. }
  2545. .search-text {
  2546. font-size: $font-size-24;
  2547. line-height: 66rpx;
  2548. color: #b2b2b2;
  2549. }
  2550. }
  2551. }
  2552. }
  2553. @keyframes showFixedColor {
  2554. 0% {
  2555. background: rgba(255, 255, 255, 0);
  2556. }
  2557. 50% {
  2558. background: rgba(255, 255, 255, 0.5);
  2559. }
  2560. 100% {
  2561. background: rgba(255, 255, 255, 1);
  2562. }
  2563. }
  2564. @keyframes hideFixedColor {
  2565. 0% {
  2566. background: rgba(255, 255, 255, 1);
  2567. }
  2568. 50% {
  2569. background: rgba(255, 255, 255, 0.5);
  2570. }
  2571. 100% {
  2572. background: rgba(255, 255, 255, 0);
  2573. }
  2574. }
  2575. /* 加入购物模态层*/
  2576. @keyframes showPopup {
  2577. 0% {
  2578. opacity: 0;
  2579. }
  2580. 100% {
  2581. opacity: 1;
  2582. }
  2583. }
  2584. @keyframes hidePopup {
  2585. 0% {
  2586. opacity: 1;
  2587. }
  2588. 100% {
  2589. opacity: 0;
  2590. }
  2591. }
  2592. @keyframes showLayer {
  2593. 0% {
  2594. transform: translateY(0);
  2595. }
  2596. 100% {
  2597. transform: translateY(-100%);
  2598. }
  2599. }
  2600. @keyframes hideLayer {
  2601. 0% {
  2602. transform: translateY(-100%);
  2603. }
  2604. 100% {
  2605. transform: translateY(0);
  2606. }
  2607. }
  2608. @keyframes showAmnation {
  2609. 0% {
  2610. top: -12rpx;
  2611. opacity: 0;
  2612. }
  2613. 50% {
  2614. top: -60rpx;
  2615. opacity: 1;
  2616. }
  2617. 100% {
  2618. top: -100rpx;
  2619. opacity: 0;
  2620. }
  2621. }
  2622. @keyframes hideAmnation {
  2623. 0% {
  2624. top: -100rpx;
  2625. opacity: 0;
  2626. }
  2627. 100% {
  2628. top: -12rpx;
  2629. opacity: 0;
  2630. }
  2631. }
  2632. .tui-popup-box {
  2633. position: relative;
  2634. box-sizing: border-box;
  2635. min-height: 220rpx;
  2636. padding: 40rpx 24rpx 0 24rpx;
  2637. .tui-popup-close {
  2638. width: 90rpx;
  2639. height: 90rpx;
  2640. position: absolute;
  2641. right: 0;
  2642. top: 24rpx;
  2643. line-height: 90rpx;
  2644. text-align: center;
  2645. color: #b2b2b2;
  2646. .icon-iconfontguanbi {
  2647. font-size: $font-size-40;
  2648. }
  2649. }
  2650. .title {
  2651. font-size: $font-size-34;
  2652. color: $text-color;
  2653. line-height: 88rpx;
  2654. text-align: center;
  2655. float: left;
  2656. width: 100%;
  2657. height: 88rpx;
  2658. font-weight: bold;
  2659. }
  2660. .tui-popup-main {
  2661. width: 100%;
  2662. float: left;
  2663. &.coupon {
  2664. padding-bottom: 40rpx;
  2665. .coupon-empty {
  2666. width: 100%;
  2667. height: 600rpx;
  2668. display: flex;
  2669. align-items: center;
  2670. justify-content: center;
  2671. flex-direction: column;
  2672. position: fixed;
  2673. background: $bg-color;
  2674. .empty-container-image {
  2675. width: 150rpx;
  2676. height: 150rpx;
  2677. margin-bottom: 0;
  2678. margin-top: 0;
  2679. }
  2680. .error-text {
  2681. font-size: $font-size-28;
  2682. color: #999999;
  2683. line-height: 88rpx;
  2684. }
  2685. }
  2686. }
  2687. .tui-popup-scroll {
  2688. width: 100%;
  2689. height: 600rpx;
  2690. .coupon-list {
  2691. width: 100%;
  2692. height: 200rpx;
  2693. margin-top: 24rpx;
  2694. box-sizing: border-box;
  2695. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  2696. background-size: cover;
  2697. &:last-child {
  2698. margin-bottom: 24rpx;
  2699. }
  2700. .list-cell-le {
  2701. width: 224rpx;
  2702. height: 100%;
  2703. box-sizing: border-box;
  2704. padding: 37rpx 0;
  2705. float: left;
  2706. .coupon-maxMoney {
  2707. width: 100%;
  2708. height: 78rpx;
  2709. line-height: 78rpx;
  2710. font-size: 56rpx;
  2711. color: #ffffff;
  2712. text-align: center;
  2713. .small {
  2714. font-size: $font-size-24;
  2715. }
  2716. }
  2717. .coupon-minMoney {
  2718. width: 100%;
  2719. height: 33rpx;
  2720. line-height: 33rpx;
  2721. font-size: $font-size-24;
  2722. color: #ffffff;
  2723. text-align: center;
  2724. }
  2725. }
  2726. .list-cell-ri {
  2727. width: 478rpx;
  2728. height: 100%;
  2729. box-sizing: border-box;
  2730. padding: 20rpx 24rpx 0 24rpx;
  2731. float: right;
  2732. .list-cell-top {
  2733. width: 100%;
  2734. height: 121rpx;
  2735. float: left;
  2736. border-bottom: 1px solid #e1e1e1;
  2737. .list-cell-type {
  2738. width: 286rpx;
  2739. height: 100%;
  2740. float: left;
  2741. .list-cell-tags {
  2742. width: 100%;
  2743. height: 32rpx;
  2744. margin-bottom: 7rpx;
  2745. .tags {
  2746. display: inline-block;
  2747. padding: 0 10rpx;
  2748. height: 32rpx;
  2749. line-height: 32rpx;
  2750. background-color: #ffdcce;
  2751. color: #f94b4b;
  2752. font-size: $font-size-20;
  2753. border-radius: 8rpx;
  2754. text-align: center;
  2755. float: left;
  2756. }
  2757. }
  2758. .list-cell-texts {
  2759. width: 100%;
  2760. height: auto;
  2761. line-height: 35rpx;
  2762. text-overflow: ellipsis;
  2763. display: -webkit-box;
  2764. word-break: break-all;
  2765. -webkit-box-orient: vertical;
  2766. -webkit-line-clamp: 2;
  2767. overflow: hidden;
  2768. font-size: 26rpx;
  2769. color: #333333;
  2770. }
  2771. }
  2772. .list-cell-btn {
  2773. width: 128rpx;
  2774. height: 100%;
  2775. float: right;
  2776. .icon-used {
  2777. width: 100%;
  2778. height: 100%;
  2779. box-sizing: border-box;
  2780. padding-top: 28rpx;
  2781. .icon-used-text {
  2782. width: 100%;
  2783. text-align: center;
  2784. line-height: 26rpx;
  2785. font-size: $font-size-20;
  2786. color: #f94b4b;
  2787. }
  2788. .icon-used-btn {
  2789. width: 128rpx;
  2790. height: 48rpx;
  2791. border-radius: 28rpx;
  2792. line-height: 48rpx;
  2793. font-size: $font-size-26;
  2794. text-align: center;
  2795. &.receive {
  2796. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);
  2797. color: #ffffff;
  2798. }
  2799. &.make {
  2800. border: solid 1px #f94b4b;
  2801. color: #f94b4b;
  2802. }
  2803. }
  2804. }
  2805. }
  2806. }
  2807. .list-cell-time {
  2808. width: 100%;
  2809. height: 58rpx;
  2810. line-height: 58rpx;
  2811. text-align: left;
  2812. font-size: $font-size-20;
  2813. color: #999999;
  2814. }
  2815. }
  2816. }
  2817. &.train {
  2818. height: 240rpx;
  2819. }
  2820. .content-tr {
  2821. width: 100%;
  2822. min-height: 58rpx;
  2823. line-height: 58rpx;
  2824. display: flex;
  2825. .content-td {
  2826. display: flex;
  2827. flex: 3;
  2828. font-size: $font-size-26;
  2829. color: #999999;
  2830. line-height: 58rpx;
  2831. text-align: left;
  2832. }
  2833. .content-th {
  2834. display: flex;
  2835. flex: 7;
  2836. font-size: $font-size-26;
  2837. color: #333333;
  2838. line-height: 58rpx;
  2839. text-align: left;
  2840. padding-left: 10rpx;
  2841. }
  2842. }
  2843. }
  2844. }
  2845. .tui-shopping-main {
  2846. width: 100%;
  2847. .layer-smimg {
  2848. width: 114rpx;
  2849. height: 114rpx;
  2850. float: left;
  2851. border-radius: 10rpx;
  2852. margin-right: 24rpx;
  2853. image {
  2854. width: 114rpx;
  2855. height: 114rpx;
  2856. border-radius: 10rpx;
  2857. }
  2858. }
  2859. .layer-nunbox {
  2860. justify-content: space-between;
  2861. align-items: center;
  2862. width: 536rpx;
  2863. height: auto;
  2864. float: left;
  2865. .layer-nunbox-t {
  2866. width: 100%;
  2867. height: 44rpx;
  2868. position: relative;
  2869. display: flex;
  2870. margin-bottom: 10rpx;
  2871. .text {
  2872. font-size: $font-size-24;
  2873. line-height: 48rpx;
  2874. color: #999999;
  2875. }
  2876. .layer-nunbox-text {
  2877. line-height: 44rpx;
  2878. font-size: $font-size-28;
  2879. }
  2880. .number-box {
  2881. display: flex;
  2882. justify-content: center;
  2883. align-items: center;
  2884. border: 2rpx solid #ffe6dc;
  2885. border-radius: 30rpx;
  2886. height: 48rpx;
  2887. margin-left: 20rpx;
  2888. .iconfont {
  2889. font-size: $font-size-24;
  2890. padding: 0 18rpx;
  2891. color: #999999;
  2892. text-align: center;
  2893. line-height: 48rpx;
  2894. font-weight: bold;
  2895. background: #fef6f3;
  2896. &.icon-jianhao {
  2897. border-radius: 30rpx 0 0 30rpx;
  2898. }
  2899. &.icon-jiahao {
  2900. border-radius: 0 30rpx 30rpx 0;
  2901. }
  2902. }
  2903. .btn-input {
  2904. width: 62rpx;
  2905. height: 48rpx;
  2906. line-height: 48rpx;
  2907. background: #ffffff;
  2908. border-radius: 4rpx;
  2909. text-align: center;
  2910. font-size: $font-size-28;
  2911. }
  2912. }
  2913. .product-step {
  2914. position: absolute;
  2915. left: 45rpx;
  2916. bottom: 0;
  2917. height: 44rpx;
  2918. background: #ffffff;
  2919. }
  2920. }
  2921. .layer-nunbox-b {
  2922. width: 100%;
  2923. height: 44rpx;
  2924. margin-top: 13rpx;
  2925. }
  2926. .text {
  2927. line-height: 44rpx;
  2928. font-size: $font-size-28;
  2929. .p {
  2930. color: #ff2a2a;
  2931. }
  2932. .p:first-child {
  2933. margin-left: 30rpx;
  2934. }
  2935. .p.sm {
  2936. font-size: $font-size-24;
  2937. }
  2938. }
  2939. }
  2940. }
  2941. }
  2942. .tui-popup-btn {
  2943. width: 100%;
  2944. height: auto;
  2945. float: left;
  2946. margin-top: 24rpx;
  2947. .tui-button {
  2948. width: 100%;
  2949. height: 88rpx;
  2950. background: $btn-confirm;
  2951. line-height: 88rpx;
  2952. text-align: center;
  2953. color: #ffffff;
  2954. font-size: $font-size-28;
  2955. border-radius: 44rpx;
  2956. }
  2957. }
  2958. /*富文本样式*/
  2959. rich-text.p {
  2960. width: 702rpx !important;
  2961. padding: 0 24rpx;
  2962. text-align: justify;
  2963. }
  2964. rich-text.img {
  2965. width: 100%;
  2966. height: auto;
  2967. }
  2968. </style>