product.vue 71 KB

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