product.vue 77 KB

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