product.vue 78 KB

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