product.vue 78 KB

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