product.vue 62 KB

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