product.vue 77 KB

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