product.vue 77 KB

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