product.vue 78 KB

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