product.vue 60 KB

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