product.vue 61 KB

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