product.vue 78 KB

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