product.vue 79 KB

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