index.vue 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666
  1. <template name="navbars">
  2. <view>
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <view class="container-cart-main tui-skeleton" :style="{ paddingTop: isshowDelbtn ? '0rpx' : '80rpx' }">
  11. <template v-if="pathType == 0">
  12. <view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length > 0">
  13. <view class="foot-text"
  14. >共<text>{{ kindCount }}</text
  15. >件商品</view
  16. >
  17. <view class="delBtn" @tap.stop="showDelManager">删除</view>
  18. </view>
  19. </template>
  20. <template v-else>
  21. <view
  22. class="foot-check-delbtn"
  23. v-if="!isshowDelbtn && goodsList.length > 0"
  24. :style="{ top: CustomBar + 'px' }"
  25. >
  26. <view class="foot-text"
  27. >共<text>{{ kindCount }}</text
  28. >件商品</view
  29. >
  30. <view class="delBtn" @tap.stop="showDelManager">删除</view>
  31. </view>
  32. </template>
  33. <view v-if="!isEmpty" class="container-cart">
  34. <view class="cart-content" :style="{ paddingBottom: isIphoneX ? '130rpx' : '100rpx' }">
  35. <view class="goods-list">
  36. <view v-for="(item, index) in goodsList" :key="index" class="goods-item clearfix">
  37. <view class="shoptitle">
  38. <!--选择商店的全部商品"-->
  39. <view class="checkbox-box" @click.stop="checkShop(item)">
  40. <view
  41. class="checkbox iconfont"
  42. :class="[item.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  43. ></view>
  44. </view>
  45. <view v-if="item.promotions" class="floor-item-act">
  46. <view class="floor-tags" @click.stop="clickPopupShow(item, 2)">{{
  47. item.promotions.name
  48. }}</view>
  49. </view>
  50. <view class="text" @click.stop="goSuppile(item)">{{ item.shopName }} </view>
  51. <view class="text-coupon" @click="showPopup(0, item)" v-if="item.couponsLogo"
  52. >领券</view
  53. >
  54. </view>
  55. <view class="productlist">
  56. <view class="goods-pros" v-for="(pros, idx) in item.cartList" :key="idx">
  57. <view class="goods-pros-t">
  58. <!--选择商品-->
  59. <view class="checkbox-box" @click.stop="ischeck(item, pros)">
  60. <view
  61. class="checkbox iconfont"
  62. :class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  63. ></view>
  64. </view>
  65. <view class="pros-img" @click.stop="navToListPage(pros.productId)"
  66. ><image :src="pros.image ? pros.image : ''" alt="" /><view
  67. class="pros-type"
  68. v-if="pros.productType == 2"
  69. >医疗器械</view
  70. >
  71. </view>
  72. <view class="pros-product">
  73. <view class="producttitle" @click.stop="navToListPage(pros.productId)">{{
  74. pros.name
  75. }}</view>
  76. <view class="productspec">规格:{{ pros.unit ? pros.unit : '' }}</view>
  77. <template v-if="pros.stock> 0">
  78. <view class="cart-sku-temp" @click.stop="handleShouUnitPopup(pros)">
  79. <view class="cart-sku-text">重新选择商品规格</view>
  80. <view class="cart-sku-btn">重选</view>
  81. </view>
  82. </template>
  83. <template v-else>
  84. <view class="productprice">
  85. <!--使用过滤器对总价改变-->
  86. <view
  87. class="price"
  88. :class="
  89. PromotionsFormat(pros.promotions) ||
  90. (pros.svipProductFlag == 1 && vipFlag == 1)
  91. ? 'disabled'
  92. : ''
  93. "
  94. >
  95. <text>¥</text>
  96. {{
  97. (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
  98. ? pros.originalPrice
  99. : pros.price) | NumFormat
  100. }}
  101. </view>
  102. <view
  103. class="count"
  104. v-if="pros.validFlag == 2"
  105. :class="[isshowDelbtn ? 'none' : 'show']"
  106. >
  107. <text class="count-tips" v-if="pros.number < pros.min"
  108. >起订量:{{ pros.min }}</text
  109. >
  110. <text class="count-tips step" v-if="pros.isStep"
  111. >购买量必须为起订量的整数倍</text
  112. >
  113. <view class="number-box">
  114. <view
  115. class="iconfont icon-jianhao"
  116. @click="changeCountSub(item, pros)"
  117. ></view>
  118. <input
  119. class="btn-input"
  120. type="number"
  121. maxlength="4"
  122. v-model="pros.number"
  123. @blur="changeNnmber($event, item, pros)"
  124. @focus="changeInput(pros)"
  125. />
  126. <view
  127. class="iconfont icon-jiahao"
  128. @click="changeCountAdd(item, pros)"
  129. ></view>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="floor-item-act">
  134. <template v-if="pros.actStatus == 1 && pros.promotions">
  135. <view
  136. v-if="PromotionsFormat(pros.promotions)"
  137. class="floor-tags"
  138. @click.stop="clickPopupShow(pros, 1)"
  139. >
  140. {{ pros.promotions.name }}
  141. <text
  142. v-if="pros.promotions != null && pros.promotions.type != 3"
  143. >
  144. :¥{{
  145. pros.promotions == null
  146. ? '0.00'
  147. : pros.promotions.touchPrice | NumFormat
  148. }}
  149. </text>
  150. </view>
  151. <view
  152. v-else-if="pros.promotions.type != 3"
  153. class="floor-tags"
  154. @click.stop="clickPopupShow(pros, 2)"
  155. >
  156. {{ pros.promotions.name }}
  157. </view>
  158. </template>
  159. <template v-if="pros.actStatus == null && pros.ladderFlag == 1">
  160. <view class="floor-tags" @click.stop="clickPopupShow(pros, 2)"
  161. >阶梯价格</view
  162. >
  163. </template>
  164. <template v-if="pros.svipProductFlag == 1">
  165. <view class="svip-tags">
  166. <view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
  167. <view class="price" v-if="isShowVipFlag(pros)">{{
  168. pros.svipPriceTag
  169. }}</view>
  170. </view>
  171. </template>
  172. </view>
  173. </template>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none' : 'show']">
  179. <view class="sum-none" v-if="item.reducedPrice > 0">
  180. <text class="money-sign">¥</text>
  181. <text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
  182. <text class="money-reduced"
  183. >减<text>¥{{ item.reducedPrice | NumFormat }}</text></text
  184. >
  185. </view>
  186. <view class="sum"
  187. >合计:<text class="money"
  188. ><text class="money-sign">¥</text>{{ item.totalPrice | NumFormat }}</text
  189. ></view
  190. >
  191. </view>
  192. </view>
  193. </view>
  194. <view class="failure-list" v-if="failureList.length > 0">
  195. <view class="failure-title">
  196. <view class="title-txt"
  197. >失效商品<text>{{ failureList.length }}件</text></view
  198. >
  199. <view class="title-btn" @click.stop="deletefailureList"
  200. ><text class="butto">清空失效商品</text></view
  201. >
  202. </view>
  203. <view class="productlist">
  204. <view class="goods-pros" v-for="(failure, failureIdx) in failureList" :key="failureIdx">
  205. <view class="goods-pros-t" @click.stop="failureToProduct(failure)">
  206. <!--选择商品-->
  207. <view
  208. class="checkbox-box"
  209. @click.stop="ischeckFailure(failure)"
  210. v-if="isshowDelbtn"
  211. >
  212. <button
  213. class="checkbox iconfont"
  214. :class="[failure.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  215. ></button>
  216. </view>
  217. <text class="img-tip">失效</text>
  218. <view class="pros-img">
  219. <image :src="failure.image ? failure.image : ''" alt="" />
  220. <view class="pros-type" v-if="failure.productType == 2">医疗器械</view>
  221. </view>
  222. <view class="pros-product">
  223. <view class="producttitle">{{ failure.name }}</view>
  224. <view class="productspec">规格:{{ failure.unit ? failure.unit : '' }}</view>
  225. <view class="productstate">{{ failureStateText(failure.status) }}</view>
  226. </view>
  227. <view class="pros-marks" v-if="failure.isFailureLayer"></view>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. </view>
  233. <!-- 脚部菜单 -->
  234. <template v-if="pathType == 0">
  235. <view class="footer">
  236. <view class="footer-le">
  237. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  238. <button
  239. class="checkbox iconfont"
  240. :class="[isCheckAll ? 'icon-yixuanze' : 'icon-weixuanze']"
  241. ></button>
  242. <view class="text">全选</view>
  243. </view>
  244. <view class="sum">
  245. <view class="sum-price" :class="isDiscount ? '' : 'none'">
  246. 总价:<text class="money-sign">¥</text
  247. ><text class="money">{{ (allPrice - couponPrice) | NumFormat }}</text>
  248. </view>
  249. <view class="sum-none" v-if="isDiscount">
  250. <text class="money-reduced"
  251. >共减<text>¥{{ totalDiscountAmount | NumFormat }}</text></text
  252. >
  253. <text class="money-popup" @click="showPopup(1)"
  254. >优惠明细<text class="iconfont icon-xiangshangjiantou"></text
  255. ></text>
  256. </view>
  257. </view>
  258. </view>
  259. <view v-if="!isshowDelbtn" class="footer-ri">
  260. <view class="btn hanld-btn" @tap="toConfirmation">去结算({{ allCount }})</view>
  261. </view>
  262. <view v-else class="footer-del">
  263. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  264. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  265. </view>
  266. </view>
  267. </template>
  268. <template v-else>
  269. <view class="footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  270. <view class="footer-le">
  271. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  272. <button
  273. class="checkbox iconfont"
  274. :class="[isCheckAll ? 'icon-yixuanze' : 'icon-weixuanze']"
  275. ></button>
  276. <view class="text">全选</view>
  277. </view>
  278. <view class="sum">
  279. <view class="sum-price" :class="isDiscount ? '' : 'none'">
  280. 总价:<text class="money-sign">¥</text
  281. ><text class="money">{{ (allPrice - couponPrice) | NumFormat }}</text>
  282. </view>
  283. <view class="sum-none" v-if="isDiscount">
  284. <text class="money-reduced"
  285. >共减<text>¥{{ totalDiscountAmount | NumFormat }}</text></text
  286. >
  287. <text class="money-popup" @click="showPopup(1)"
  288. >优惠明细<text class="iconfont icon-xiangshangjiantou"></text
  289. ></text>
  290. </view>
  291. </view>
  292. </view>
  293. <view v-if="!isshowDelbtn" class="footer-ri">
  294. <view class="btn hanld-btn" @tap="toConfirmation">去结算({{ allCount }})</view>
  295. </view>
  296. <view v-else class="footer-del">
  297. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  298. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  299. </view>
  300. </view>
  301. </template>
  302. </view>
  303. <view v-else class="cart-content empty">
  304. <view class="empty-container">
  305. <image
  306. class="empty-container-image"
  307. src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png"
  308. mode="aspectFit"
  309. ></image>
  310. <text class="error-text">购物车空空如也,快去商城逛逛吧~</text>
  311. <view class="login-btn" @click="goIndex">去商城</view>
  312. </view>
  313. </view>
  314. </view>
  315. <!-- 选择规格弹窗 -->
  316. <cm-unit-popup
  317. v-if="popupShow2"
  318. :popupShow="popupShow2"
  319. :product="handlePros"
  320. @btnConfirm="handleBtnConfirm"
  321. ></cm-unit-popup>
  322. <!-- 促销活动弹窗 -->
  323. <activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
  324. <!-- 透明模态层 -->
  325. <modal-layer v-if="modallayer"></modal-layer>
  326. <!-- 优惠券 -->
  327. <tui-bottom-popup :radius="true" :show="popupShow0" @close="hidePopup(0)">
  328. <view class="tui-popup-box clearfix">
  329. <view class="title">优惠券</view>
  330. <view class="tui-popup-close" @click="hidePopup(0)">
  331. <text class="iconfont icon-iconfontguanbi"></text>
  332. </view>
  333. <view class="tui-popup-tabs">
  334. <coupon-tabs
  335. :tabs="navbar"
  336. :currentTab="currentTab > 2 ? 0 : currentTab"
  337. @change="couponChange"
  338. :itemWidth="100 / navbar.length + '%'"
  339. selectedColor="#e15616"
  340. sliderBgColor="#e15616"
  341. >
  342. </coupon-tabs>
  343. </view>
  344. <div class="tui-popup-main coupon">
  345. <scroll-view class="tui-popup-scroll" scroll-y="true">
  346. <view class="coupon-empty" v-if="isCouponEmpty">
  347. <image
  348. class="empty-container-image"
  349. :src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"
  350. ></image>
  351. <text class="error-text">暂无优惠券~</text>
  352. </view>
  353. <template v-else>
  354. <view
  355. v-for="(coupon, index) in productCouponList"
  356. :key="index"
  357. :id="coupon.couponId"
  358. class="coupon-list"
  359. >
  360. <view class="list-cell-le">
  361. <view class="coupon-maxMoney"
  362. ><text class="small">¥</text>{{ coupon.couponAmount }}</view
  363. >
  364. <view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
  365. </view>
  366. <view class="list-cell-ri">
  367. <view class="list-cell-top">
  368. <view class="list-cell-type">
  369. <view class="list-cell-tags">
  370. <template v-if="coupon.moneyCouponFlag == 1">
  371. <text class="tags" v-if="coupon.moneyCouponType == 1"
  372. >意向{{ coupon.couponType | TypeFormat }}</text
  373. >
  374. <text class="tags" v-else
  375. >定向{{ coupon.couponType | TypeFormat }}</text
  376. >
  377. </template>
  378. <template v-else>
  379. <text class="tags">{{ coupon.couponType | TypeFormat }}</text>
  380. </template>
  381. </view>
  382. <view
  383. class="list-cell-texts"
  384. :class="currentTab == 1 || currentTab == 2 ? 'none' : ''"
  385. >
  386. <text v-if="coupon.couponType == 0">
  387. {{
  388. coupon.productType && coupon.productType == 1
  389. ? '全商城商品通用'
  390. : '仅可购买指定商品'
  391. }}
  392. </text>
  393. <text v-if="coupon.couponType == 1">
  394. {{
  395. coupon.categoryType == 1
  396. ? '仅限购买产品类商品'
  397. : '仅限购买仪器类商品'
  398. }}
  399. </text>
  400. <text v-if="coupon.couponType == 3"
  401. >仅限购买店铺【{{ coupon.shopName }}】的商品</text
  402. >
  403. <text v-if="coupon.couponType == 4 || coupon.couponType == 2"
  404. >全商城商品通用</text
  405. >
  406. </view>
  407. </view>
  408. <view class="list-cell-btn">
  409. <view class="icon-used">
  410. <template v-if="coupon.couponBtnType == 0">
  411. <template v-if="coupon.couponPayWay == 2">
  412. <view class="icon-used-text"
  413. >{{ coupon.moneyCouponPrice }}采美豆</view
  414. >
  415. <view
  416. class="icon-used-btn receive"
  417. @click="toDeductCoupon(coupon)"
  418. >抵扣</view
  419. >
  420. </template>
  421. <template v-else-if="coupon.couponPayWay == 1">
  422. <view class="icon-used-text">购买</view>
  423. <view class="icon-used-btn receive" @click="toPayCoupon(coupon)"
  424. >¥{{ coupon.moneyCouponPrice }}</view
  425. >
  426. </template>
  427. <template v-else>
  428. <view
  429. class="icon-used-btn receive"
  430. @click="receiveCoupon(coupon)"
  431. >领取</view
  432. >
  433. </template>
  434. </template>
  435. <view class="icon-used-btn make" v-if="coupon.couponBtnType == 1"
  436. >已领取</view
  437. >
  438. </view>
  439. </view>
  440. </view>
  441. <view class="list-cell-time">{{ coupon.startDate }} - {{ coupon.endDate }}</view>
  442. </view>
  443. </view>
  444. </template>
  445. </scroll-view>
  446. </div>
  447. </view>
  448. </tui-bottom-popup>
  449. <!-- 优惠明细 -->
  450. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  451. <view class="tui-popup-box clearfix">
  452. <view class="title">优惠明细</view>
  453. <view class="tui-popup-close" @click="hidePopup(1)">
  454. <text class="iconfont icon-iconfontguanbi"></text>
  455. </view>
  456. <div class="tui-popup-main coupon">
  457. <view class="tui-popup-coupon">
  458. <view class="tui-popup-h1">
  459. <view class="tui-popup-text left">商品总额</view>
  460. <view class="tui-popup-text right bold">¥{{ totalAmount | NumFormat }}</view>
  461. </view>
  462. <view class="tui-popup-h1" v-if="reducedPrice > 0">
  463. <view class="tui-popup-text left">促销满减</view>
  464. <view class="tui-popup-text right bold red">-¥{{ reducedPrice | NumFormat }}</view>
  465. </view>
  466. <view class="tui-popup-h1" v-if="couponPrice > 0">
  467. <view class="tui-popup-text left">优惠券</view>
  468. <view class="tui-popup-text right bold red">-¥{{ couponPrice | NumFormat }}</view>
  469. </view>
  470. <view class="tui-popup-h1" v-if="svipReducedPrice > 0">
  471. <view class="tui-popup-text left">超级会员优惠</view>
  472. <view class="tui-popup-text right bold red">-¥{{ svipReducedPrice | NumFormat }}</view>
  473. </view>
  474. <view class="tui-popup-h1">
  475. <view class="tui-popup-text left bold">共减</view>
  476. <view class="tui-popup-text right bold red">-¥{{ totalDiscountAmount | NumFormat }}</view>
  477. </view>
  478. <view class="tui-popup-h1">
  479. <view class="tui-popup-text left bold">总价</view>
  480. <view class="tui-popup-text right bold"
  481. >¥{{ (totalAmount - totalDiscountAmount) | NumFormat }}</view
  482. >
  483. </view>
  484. </view>
  485. </div>
  486. </view>
  487. </tui-bottom-popup>
  488. <!-- 弹窗提示 -->
  489. <tui-modal
  490. :show="modal"
  491. @click="handleClick"
  492. @cancel="hideMobel"
  493. :content="contentModalText"
  494. :button="modalButton"
  495. color="#333"
  496. :size="32"
  497. shape="circle"
  498. :maskClosable="false"
  499. >
  500. </tui-modal>
  501. </view>
  502. </template>
  503. <script>
  504. import authorize from '@/common/config/authorize.js'
  505. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  506. import tuiNomore from '@/components/tui-components/nomore/nomore'
  507. import activiPopup from '@/components/cm-module/productDetails/cm-activipopu'
  508. import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
  509. import cmUnitPopup from './cm-unit-popup.vue'
  510. import modalLayer from '@/components/modal-layer'
  511. import payMixins from '@/mixins/payMixins.js'
  512. import { mapState, mapMutations } from 'vuex'
  513. export default {
  514. name: 'cartComponents',
  515. mixins: [payMixins],
  516. props: {
  517. pathType: {
  518. type: Number
  519. }
  520. },
  521. components: {
  522. tuiLoadmore,
  523. tuiNomore,
  524. activiPopup,
  525. couponTabs,
  526. cmUnitPopup,
  527. modalLayer
  528. },
  529. data() {
  530. return {
  531. StaticUrl: this.$Static, // 静态图片路径
  532. CustomBar: this.CustomBar, // 顶部导航栏高度
  533. isIphoneX: this.$store.state.isIphoneX,
  534. userId: 0,
  535. userIdentity: 0,
  536. alertType: '',
  537. isStock: '',
  538. handlerPros: {}, // 监听单挑促销商品
  539. failureList: [], // 失效商品列表
  540. goodsList: [], // 购物车的商品
  541. promotionsList: [], // 促销列表
  542. totalCouponList: [], // 优惠券算列表
  543. eligibleCoupons: [], // 最终需要用到优惠券
  544. delGoodsList: '', // 要删除的商品
  545. setGoodData: '', // 确认订单的商品
  546. isCheckAll: false, // 是否全选
  547. kindCount: 0, // 购物车宝贝数量
  548. totalAmount: 0, // 商品最终合计总价
  549. allPrice: 0, // 所有价格
  550. totalOriginalPrice: 0, // 所有原价价
  551. reducedPrice: 0, // 促销满减
  552. couponPrice: 0, // 优惠金额
  553. svipReducedPrice: 0, // 超级会员优惠金额
  554. totalDiscountAmount: 0, // 总共减去金额
  555. isDiscount: false, // 控制显示优惠明细
  556. allCount: 0, // 被选中的产品数量
  557. isModallayer: false,
  558. skeletonShow: true,
  559. isshowDelbtn: false,
  560. isDisabled: false, // 供应商/店铺全选是否禁用状态
  561. isNoConfim: false,
  562. isEmpty: false, // 显示空购物车
  563. scrollHeight: 'auto',
  564. nomoreText: '上拉显示更多',
  565. hasNextPage: false,
  566. loadding: false,
  567. pullUpOn: true,
  568. pullFlag: true,
  569. pageSize: 10,
  570. pageNum: 1,
  571. submitIds: [],
  572. checkenProsList: [],
  573. popupShow: false,
  574. popupShow0: false,
  575. popupShow1: false,
  576. popupShow2: false,
  577. currentTab: 1,
  578. navbar: [{ name: '未领取', num: 0 }, { name: '已领取', num: 0 }],
  579. couponParam: {
  580. // 获取弹窗优惠券领取参数
  581. userId: 0,
  582. shopId: 0,
  583. status: 1,
  584. source: 2
  585. },
  586. productCouponList: [], // 优惠券弹窗列表
  587. isCouponEmpty: false,
  588. contentModalText: '', //操作文字提示语句
  589. modal: false,
  590. modalButton: [
  591. {
  592. text: '取消',
  593. type: 'gray',
  594. plain: true //是否空心
  595. },
  596. {
  597. text: '去升级',
  598. customStyle: {
  599. color: '#fff',
  600. bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
  601. },
  602. plain: false
  603. }
  604. ],
  605. handlePros:{}
  606. }
  607. },
  608. created() {
  609. this.setScrollHeight()
  610. console.log('pathType', this.pathType)
  611. },
  612. computed: {
  613. ...mapState(['hasLogin', 'userInfo', 'isWxAuthorize'])
  614. },
  615. watch: {
  616. //深度监听所有数据,每次改变重新计算总价和总数
  617. goodsList: {
  618. deep: true,
  619. handler(val, oldval) {
  620. this.totalPeice()
  621. this.totalCount()
  622. }
  623. }
  624. },
  625. filters: {
  626. NumFormat(value) {
  627. //处理金额
  628. return Number(value).toFixed(2)
  629. },
  630. totalprice(val, count) {
  631. //单件商品的价格 × 数量
  632. return (val * count).toFixed(2)
  633. },
  634. TypeFormat(value) {
  635. switch (value) {
  636. case 0:
  637. return '活动券'
  638. break
  639. case 1:
  640. return '品类券'
  641. break
  642. case 2:
  643. return '用户专享券'
  644. break
  645. case 3:
  646. return '店铺券'
  647. break
  648. case 4:
  649. return '新用户券'
  650. break
  651. }
  652. }
  653. },
  654. methods: {
  655. async initData() {
  656. const userInfo = await this.$api.getStorage()
  657. this.isModallayer = false //遮罩层 防止多次点击
  658. this.skeletonShow = true //预加载圆圈
  659. this.isCheckAll = false //是否全选
  660. this.submitIds = []
  661. this.checkenProsList = []
  662. this.couponPrice = 0
  663. this.reducedPrice = 0
  664. this.totalDiscountAmount = 0
  665. this.isDiscount = false
  666. this.eligibleCoupons = []
  667. this.userId = this.couponParam.userId = userInfo.userId ? userInfo.userId : 0
  668. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  669. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  670. this.initGetCartGoodsList()
  671. },
  672. isShowVipFlag(pros) {
  673. if (pros.priceFlag != 1) {
  674. if (this.userIdentity == 4 && this.vipFlag == 1) {
  675. return true
  676. } else if (this.userIdentity == 2) {
  677. return true
  678. }
  679. }
  680. },
  681. initLogin() {
  682. this.$api.redirectTo('/pages/login/login')
  683. },
  684. clickPopupShow(pros, type) {
  685. this.popupShow = true
  686. this.handlerPros = pros
  687. },
  688. setScrollHeight() {
  689. // 窗口高度-footer高度
  690. const { windowHeight, pixelRatio } = uni.getSystemInfoSync()
  691. setTimeout(() => {
  692. const query = uni.createSelectorQuery().in(this)
  693. query.selectAll('.footer').boundingClientRect()
  694. query.exec(res => {
  695. this.windowHeight = windowHeight
  696. if (res[0][0]) {
  697. this.scrollHeight = windowHeight - res[0][0].height
  698. }
  699. })
  700. }, 500)
  701. },
  702. initGetCartGoodsList() {
  703. //初始化购物车 index:1
  704. this.ProductService.QueryShoppingCartList({ userId: this.userId, source: 2 })
  705. .then(response => {
  706. this.skeletonShow = false
  707. let data = response.data
  708. this.kindCount = data.kindCount
  709. this.promotionsList = data.promotions
  710. this.totalCouponList = data.couponList
  711. this.$store.commit('updateAllNum', data.kindCount)
  712. if (data.list.length > 0 || data.invalid.length > 0) {
  713. this.isEmpty = false
  714. } else {
  715. this.isEmpty = true
  716. }
  717. if (data.list && data.list.length > 0) {
  718. this.goodsList = data.list
  719. this.goodsList.forEach((item, index) => {
  720. item.cartList.forEach(pros => {
  721. pros.shopId = item.shopId
  722. pros.isStep = false
  723. if (pros.step === 2) {
  724. if (pros.number % pros.min != 0) {
  725. pros.number = pros.min
  726. this.totalShopPeice()
  727. this.updateShoppogNum(pros)
  728. }
  729. }
  730. })
  731. })
  732. this.totalShopPeice()
  733. } else {
  734. this.goodsList = []
  735. }
  736. if (data.invalid && data.invalid.length > 0) {
  737. let newFailureList = [],
  738. isFailureLayer
  739. data.invalid.forEach((failure, index) => {
  740. if (failure.status == 1 || failure.status == 2) {
  741. isFailureLayer = true
  742. } else {
  743. isFailureLayer = false
  744. }
  745. newFailureList.push(Object.assign({}, failure, { isFailureLayer: isFailureLayer }))
  746. })
  747. this.failureList = newFailureList
  748. } else {
  749. this.failureList = []
  750. }
  751. })
  752. .catch(error => {
  753. this.$util.msg(error.msg, 2000)
  754. })
  755. },
  756. ischeckFailure(failure) {
  757. failure.isChecked = !failure.isChecked
  758. this.updateCheckAllBtn()
  759. },
  760. ischeck(item, pro) {
  761. //为未选中的时候改变为true,反之为true
  762. pro.isChecked = !pro.isChecked
  763. if (pro.isChecked) {
  764. if (!this.submitIds.includes(pro.productId * 1)) {
  765. this.submitIds.push(pro.productId)
  766. this.checkenProsList.push(pro)
  767. }
  768. } else {
  769. var lent = this.submitIds.indexOf(pro.productId * 1)
  770. if (lent >= 0) {
  771. this.submitIds.splice(lent, 1)
  772. this.checkenProsList.splice(lent, 1)
  773. }
  774. }
  775. this.updateProductCheckedAllBtn(item)
  776. this.updateCheckAllBtn()
  777. },
  778. updateProductCheckedAllBtn(item) {
  779. // 单独每个供应商的勾选判断
  780. let productsList = item.cartList,
  781. productsCheckedLength = 0,
  782. disabledLength = 0
  783. if (this.isshowDelbtn) {
  784. productsList.forEach(pros => {
  785. if (pros.isChecked) {
  786. productsCheckedLength++
  787. }
  788. })
  789. } else {
  790. productsList.forEach(pros => {
  791. if (pros.isChecked) {
  792. productsCheckedLength++
  793. }
  794. })
  795. }
  796. item.isChecked = productsCheckedLength === productsList.length
  797. },
  798. updateCheckAllBtn() {
  799. // 全选勾选判断
  800. let goodsCheckedLength = 0,
  801. goodsList = this.goodsList,
  802. failureList = this.failureList
  803. goodsList.forEach(item => {
  804. if (item.isChecked) {
  805. goodsCheckedLength++
  806. }
  807. })
  808. failureList.forEach(failureItem => {
  809. if (failureItem.isChecked) {
  810. goodsCheckedLength++
  811. }
  812. })
  813. if (this.isshowDelbtn) {
  814. this.isCheckAll = goodsCheckedLength === goodsList.length + failureList.length
  815. } else {
  816. this.isCheckAll = goodsCheckedLength === goodsList.length
  817. }
  818. },
  819. checkShop(item) {
  820. //与单选商品类似
  821. item.isChecked = !item.isChecked
  822. this.setProductChecked(item)
  823. this.updateCheckAllBtn()
  824. },
  825. setProductChecked(item) {
  826. item.cartList.forEach(pros => {
  827. if (item.isChecked) {
  828. pros.isChecked = true
  829. if (!this.submitIds.includes(pros.productId * 1)) {
  830. this.submitIds.push(pros.productId)
  831. this.checkenProsList.push(pros)
  832. }
  833. } else {
  834. pros.isChecked = false
  835. var lent = this.submitIds.indexOf(pros.productId * 1)
  836. if (lent >= 0) {
  837. this.submitIds.splice(lent, 1)
  838. this.checkenProsList.splice(lent, 1)
  839. }
  840. }
  841. })
  842. },
  843. updateBothCheckBtn() {
  844. if (this.isshowDelbtn) {
  845. // 当管理删除按钮出现时,失效的商品可被选择
  846. this.goodsList.forEach(item => {
  847. item.isChecked = this.isCheckAll
  848. this.setProductChecked(item)
  849. })
  850. //删除按钮 全选包括失效商品勾选
  851. this.failureList.forEach(failureItem => {
  852. failureItem.isChecked = this.isCheckAll
  853. })
  854. } else {
  855. this.goodsList.forEach(item => {
  856. item.isChecked = this.isCheckAll && !item.isDisabled
  857. this.setProductChecked(item)
  858. })
  859. }
  860. },
  861. checkAll() {
  862. //全选方法内调用方法
  863. this.isCheckAll = !this.isCheckAll
  864. if (!this.isCheckAll) {
  865. this.popupShow1 = false
  866. }
  867. this.updateBothCheckBtn()
  868. },
  869. totalShopPeice() {
  870. //每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
  871. let touchPrice = 0
  872. let reducedPrice = 0 //商铺合计满减价
  873. this.goodsList.map((item, index) => {
  874. //计算店铺满减后店铺合计
  875. if (item.promotions && item.promotions.mode == 2) {
  876. let prosPrice = 0 // 店铺价格合计
  877. let prosDiscountNum = 0 // 店铺促销叠加次数
  878. let totalOriginalPrice = 0 //店铺原价合计
  879. item.cartList.forEach(pros => {
  880. prosPrice += pros.price * pros.number
  881. totalOriginalPrice += pros.originalPrice * pros.number
  882. })
  883. if (item.promotions.discount == 1) {
  884. // 支持促销叠加条件的店铺满减 执行
  885. prosDiscountNum = parseInt(prosPrice / item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
  886. console.log('店铺满减促销叠加通道叠加次数', `${prosDiscountNum}次`)
  887. if (prosPrice >= item.promotions.touchPrice) {
  888. // 满足店铺满减条件下执行
  889. item.totalPrice = prosPrice - item.promotions.reducedPrice * prosDiscountNum
  890. item.reducedPrice = item.promotions.reducedPrice * prosDiscountNum
  891. item.totalOriginalPrice = totalOriginalPrice
  892. } else {
  893. item.reducedPrice = 0 //统计合计价格
  894. item.totalPrice = prosPrice
  895. }
  896. } else {
  897. console.log('店铺满减促销非叠加通道')
  898. if (prosPrice >= item.promotions.touchPrice) {
  899. // 满足店铺满减条件下执行
  900. item.totalPrice = prosPrice - item.promotions.reducedPrice
  901. item.reducedPrice = item.promotions.reducedPrice
  902. item.totalOriginalPrice = totalOriginalPrice
  903. } else {
  904. item.reducedPrice = 0 //统计合计价格
  905. item.totalPrice = prosPrice
  906. }
  907. }
  908. } else {
  909. //以下为计算除店铺满减以外的单品满减以及正常商品合计
  910. let _totalPrice = 0
  911. let _reducedPrice = 0
  912. let discountNum = 0
  913. let _totalOriginalPrice = 0
  914. item.cartList.forEach(pros => {
  915. let _price = pros.price * pros.number
  916. _totalOriginalPrice += _price
  917. if (pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2) {
  918. if (pros.promotions.discount == 1) {
  919. discountNum = parseInt(_price / pros.promotions.touchPrice)
  920. console.log('单品满减促销叠加通道叠加次数', `${discountNum}次`)
  921. if (_price >= pros.promotions.touchPrice) {
  922. _price = _price - pros.promotions.reducedPrice * discountNum
  923. _reducedPrice += pros.promotions.reducedPrice * discountNum
  924. }
  925. _totalPrice += _price
  926. } else {
  927. console.log('单品满减非促销叠加通道')
  928. if (_price >= pros.promotions.touchPrice) {
  929. _price = _price - pros.promotions.reducedPrice
  930. _reducedPrice += pros.promotions.reducedPrice
  931. }
  932. _totalPrice += _price
  933. }
  934. } else {
  935. _reducedPrice = 0
  936. _totalPrice += pros.price * pros.number
  937. }
  938. })
  939. item.reducedPrice = _reducedPrice
  940. item.totalOriginalPrice = _totalOriginalPrice
  941. item.totalPrice = _totalPrice
  942. }
  943. })
  944. },
  945. totalPeice() {
  946. //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  947. let totalPrice = 0
  948. let reducedPrice = 0
  949. let originalPrice = 0
  950. let svipReducedPrice = 0
  951. let totalAmount = 0
  952. this.goodsList.forEach((item, index) => {
  953. let supplierPrice = 0
  954. let supplierReducedPrice = 0
  955. item.totalprice = 0
  956. item.reducedprice = 0
  957. item.originalprice = 0
  958. item.cartList.forEach(pros => {
  959. if (pros.isChecked) {
  960. supplierPrice += pros.price * pros.number
  961. svipReducedPrice += item.svipReducedPrice
  962. if (pros.svipProductFlag == 1) {
  963. totalAmount += item.originalPrice
  964. } else {
  965. item.totalprice = supplierPrice
  966. totalAmount += item.totalprice
  967. }
  968. // 单品满减
  969. if (pros.promotions && pros.promotions.type * 1 === 1 && pros.promotions.mode * 1 === 2) {
  970. let _price = pros.price * pros.number
  971. if (pros.promotions.discount == 1) {
  972. let discountNum = parseInt(_price / pros.promotions.touchPrice)
  973. console.log('单品满减促销叠加通道叠加次数', `${discountNum}次`)
  974. // 单品满减-重新计算供应商总价/满减金额
  975. if (_price >= pros.promotions.touchPrice) {
  976. supplierPrice -= pros.promotions.reducedPrice * discountNum
  977. supplierReducedPrice += pros.promotions.reducedPrice * discountNum
  978. }
  979. } else {
  980. console.log(' 单品满减非促销叠加通道')
  981. // 单品满减-重新计算供应商总价/满减金额
  982. if (_price >= pros.promotions.touchPrice) {
  983. supplierPrice -= pros.promotions.reducedPrice
  984. supplierReducedPrice += pros.promotions.reducedPrice
  985. }
  986. }
  987. }
  988. }
  989. })
  990. // 店铺满减
  991. if (item.promotions && item.promotions.mode * 1 === 2) {
  992. if (item.promotions.discount == 1) {
  993. // 支持促销叠加条件的店铺满减 执行
  994. let prosDiscountNum = parseInt(supplierPrice / item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
  995. console.log('店铺满减促销叠加通道叠加次数', `${prosDiscountNum}次`)
  996. if (supplierPrice >= item.promotions.touchPrice) {
  997. supplierPrice -= item.promotions.reducedPrice * prosDiscountNum
  998. supplierReducedPrice += item.promotions.reducedPrice * prosDiscountNum
  999. }
  1000. } else {
  1001. console.log('店铺满减非促销叠加通道')
  1002. // 店铺满减-计算供应商总价/满减金额
  1003. if (supplierPrice >= item.promotions.touchPrice) {
  1004. supplierPrice -= item.promotions.reducedPrice
  1005. supplierReducedPrice += item.promotions.reducedPrice
  1006. }
  1007. }
  1008. }
  1009. item.totalprice = supplierPrice
  1010. item.reducedprice = supplierReducedPrice
  1011. item.originalprice = supplierPrice + supplierReducedPrice
  1012. totalPrice += item.totalprice
  1013. reducedPrice += item.reducedprice
  1014. originalPrice += item.originalprice
  1015. this.totalAmount = totalAmount
  1016. })
  1017. // 总促销计算
  1018. this.promotionsList.forEach(promotions => {
  1019. // 凑单满减
  1020. if (promotions.mode === 2 && promotions.type === 2) {
  1021. let collecTotal = 0
  1022. let collecDiscountNum = 0
  1023. promotions.productList.forEach(pros => {
  1024. collecTotal += this.collecTotalPrice(pros)
  1025. })
  1026. if (promotions.discount == 1) {
  1027. // 支持凑单满减促销叠加条件的执行
  1028. collecDiscountNum += parseInt(collecTotal / promotions.touchPrice) // 凑单满减促销叠加次数 = 凑单商品合计价格/凑单满减促销价格
  1029. console.log('凑单促销满减叠加通道叠加次数', `${collecDiscountNum}次`)
  1030. if (collecTotal >= promotions.touchPrice) {
  1031. totalPrice -= promotions.reducedPrice * collecDiscountNum
  1032. reducedPrice += promotions.reducedPrice * collecDiscountNum
  1033. }
  1034. } else {
  1035. console.log('凑单促销满减非叠加通道')
  1036. if (collecTotal >= promotions.touchPrice) {
  1037. totalPrice -= promotions.reducedPrice
  1038. reducedPrice += promotions.reducedPrice
  1039. }
  1040. }
  1041. }
  1042. })
  1043. // 最后勾选的超级会员优惠价
  1044. this.svipReducedPrice = svipReducedPrice
  1045. // 最后统计商品原价
  1046. this.totalOriginalPrice = originalPrice
  1047. // 最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
  1048. this.reducedPrice = reducedPrice
  1049. // 最终合计价格 = 店铺满减合计 + 单品满减 + 正常合计 + 凑单满减
  1050. this.allPrice = totalPrice
  1051. console.log('最后统计商品原价', `${this.totalOriginalPrice}元`)
  1052. console.log('最后满减金额', `${this.reducedPrice}元`)
  1053. console.log('最终合计价格', `${this.allPrice}元`)
  1054. // 计算优惠券
  1055. if (this.totalCouponList.length > 0) {
  1056. let eligibleCoupons = this.calculationCoupon()
  1057. if (eligibleCoupons.length > 0) {
  1058. this.eligibleCoupons.splice(0, this.eligibleCoupons.length)
  1059. this.eligibleCoupons = eligibleCoupons.sort((a, b) => b.couponAmount - a.couponAmount)
  1060. this.couponPrice = this.eligibleCoupons[0].couponAmount
  1061. } else {
  1062. this.couponPrice = 0
  1063. }
  1064. }
  1065. // 最终优惠金额 = 促销优惠金额 + 优惠券优惠金额 + 超级会员优惠金额
  1066. this.totalDiscountAmount = this.reducedPrice + this.couponPrice + this.svipReducedPrice
  1067. console.log('最终优惠金额', `${this.totalDiscountAmount}元`)
  1068. // 控制显示优惠明细
  1069. this.isDiscount = this.totalDiscountAmount > 0 ? true : false
  1070. },
  1071. collecTotalPrice(pros) {
  1072. // 凑单满减计算勾选的凑单商品总价
  1073. let price
  1074. this.checkenProsList.find(el => {
  1075. if (pros.productId == el.productId) {
  1076. price = el.number * el.price
  1077. }
  1078. })
  1079. return price
  1080. },
  1081. totalCount() {
  1082. //计算总数量
  1083. this.allCount = 0
  1084. let prosAllCount = 0
  1085. let validCount = 0
  1086. let validList = []
  1087. let productsList = []
  1088. this.goodsList.forEach(item => {
  1089. productsList = item.cartList
  1090. productsList.forEach(pros => {
  1091. if (pros.isChecked) {
  1092. prosAllCount += parseInt(pros.number)
  1093. this.allCount = prosAllCount
  1094. }
  1095. })
  1096. })
  1097. },
  1098. calculationCoupon() {
  1099. // 优惠券计算
  1100. let eligibleCoupons = []
  1101. this.goodsList.forEach(shop => {
  1102. shop.cartList.forEach(pros => {
  1103. if (pros.isChecked) {
  1104. this.totalCouponList.forEach(coupon => {
  1105. //循环优惠券
  1106. switch (coupon.couponType) {
  1107. case 0: // 活动券
  1108. if (coupon.productType == 1) {
  1109. // 活动券-全商城商品
  1110. if (this.allPrice >= coupon.touchPrice) {
  1111. eligibleCoupons.push(coupon)
  1112. }
  1113. } else if (coupon.productType == 2) {
  1114. // 活动券-指定商品
  1115. if (coupon.productIds && coupon.productIds.includes(pros.productId)) {
  1116. if (this.allPrice >= coupon.touchPrice) {
  1117. eligibleCoupons.push(coupon)
  1118. }
  1119. }
  1120. }
  1121. break
  1122. case 1: // 品类券适用于产品或者仪器 categoryType(commodityType) : 1 产品 2 仪器
  1123. if (coupon.categoryType && coupon.categoryType == pros.commodityType) {
  1124. if (this.allPrice >= coupon.touchPrice) {
  1125. eligibleCoupons.push(coupon)
  1126. }
  1127. }
  1128. break
  1129. case 2: // 用户专享券 适用于商城全部商品
  1130. if (this.allPrice >= coupon.touchPrice) {
  1131. eligibleCoupons.push(coupon)
  1132. }
  1133. break
  1134. case 3: // 店铺券适用于某个供应商的全部商品
  1135. if (coupon.shopId && pros.supplierId == coupon.shopId) {
  1136. if (this.allPrice >= coupon.touchPrice) {
  1137. eligibleCoupons.push(coupon)
  1138. }
  1139. }
  1140. break
  1141. case 4: //新用户券 适用于商城全部商品
  1142. if (this.allPrice >= coupon.touchPrice) {
  1143. eligibleCoupons.push(coupon)
  1144. }
  1145. break
  1146. }
  1147. })
  1148. } else {
  1149. console.log('没有选择商品')
  1150. return
  1151. }
  1152. })
  1153. })
  1154. return eligibleCoupons
  1155. },
  1156. changeCountAdd(item, pros) {
  1157. //商品数量加加
  1158. if (pros.step === 2) {
  1159. pros.isStep = false
  1160. pros.number += pros.min
  1161. this.processActivityPrice(pros)
  1162. this.isStock = false
  1163. } else {
  1164. pros.number++
  1165. this.processActivityPrice(pros)
  1166. this.isStock = false
  1167. }
  1168. this.updateShoppogNum(pros)
  1169. this.totalShopPeice()
  1170. },
  1171. changeCountSub(item, pros) {
  1172. //商品数量减减
  1173. if (pros.number <= pros.min) {
  1174. pros.number = pros.min
  1175. this.$util.msg(`该商品最小起订量为${pros.min}`, 2000)
  1176. return
  1177. } else {
  1178. if (pros.step === 2) {
  1179. pros.isStep = false
  1180. pros.number -= pros.min
  1181. } else {
  1182. pros.number--
  1183. }
  1184. this.processActivityPrice(pros)
  1185. }
  1186. this.updateShoppogNum(pros)
  1187. this.totalShopPeice()
  1188. },
  1189. changeInput(pros) {
  1190. //输入商品数量更新
  1191. pros.isStep = false
  1192. },
  1193. changeNnmber(e, item, pros) {
  1194. //输入商品数量更新
  1195. let _value = Number(e.detail.value)
  1196. if (!this.$api.isNumber(_value)) {
  1197. pros.number = pros.min
  1198. } else if (_value < pros.min) {
  1199. this.$util.msg(`该商品最小起订量为${pros.min}`, 2000)
  1200. pros.number = pros.min
  1201. } else if (_value % pros.min != 0) {
  1202. pros.isStep = true
  1203. pros.number = pros.min
  1204. } else {
  1205. pros.isStep = false
  1206. pros.number = e.detail.value
  1207. this.processActivityPrice(pros)
  1208. }
  1209. this.updateShoppogNum(pros)
  1210. this.totalShopPeice()
  1211. },
  1212. processActivityPrice(pros) {
  1213. //单独处理活动价格和阶梯价格
  1214. let ladderPriceList = pros.ladderPrices
  1215. if (pros.ladderFlag == 0 || pros.actStatus == 1) {
  1216. pros.price = pros.price
  1217. } else {
  1218. ladderPriceList.forEach((item, index) => {
  1219. if (pros.number >= item.buyNum) {
  1220. pros.price = item.buyPrice
  1221. }
  1222. })
  1223. }
  1224. },
  1225. updateShoppogNum(pros) {
  1226. //加减购物车商品更新到后台
  1227. this.ProductService.ShoppingCartUpdate({
  1228. userId: this.userId,
  1229. productId: pros.productId,
  1230. productCount: pros.number,
  1231. source: 2
  1232. })
  1233. .then(response => {
  1234. this.isshowDelbtn = false
  1235. // this.initGetCartGoodsList()
  1236. })
  1237. .catch(error => {
  1238. this.$util.msg(error.msg, 2000)
  1239. })
  1240. },
  1241. toConfirmation() {
  1242. //跳转确认订单页面
  1243. let setGoodsList = []
  1244. this.goodsList.forEach(res => {
  1245. let products = res.cartList
  1246. products.forEach(pros => {
  1247. if (pros.isChecked) {
  1248. setGoodsList.push(pros.productId)
  1249. }
  1250. })
  1251. })
  1252. if (setGoodsList == '') {
  1253. this.$util.msg('请先选择结算商品~', 2000)
  1254. return
  1255. } else {
  1256. this.isNoConfim = false
  1257. this.goodsList.forEach(el => {
  1258. el.cartList.forEach(pros => {
  1259. if (pros.isChecked) {
  1260. if (pros.number < pros.min) {
  1261. this.isNoConfim = true
  1262. }
  1263. }
  1264. })
  1265. })
  1266. if (this.isNoConfim) {
  1267. this.$util.modal(
  1268. '',
  1269. '有商品的购买量没达到最小起订量,请修改数量后再次提交结算',
  1270. '去修改',
  1271. '',
  1272. false,
  1273. () => {}
  1274. )
  1275. return
  1276. }
  1277. let productIds = ''
  1278. this.goodsList.forEach(el => {
  1279. //获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
  1280. el.cartList.forEach(pros => {
  1281. if (pros.isChecked) {
  1282. productIds += pros.productId + ','
  1283. }
  1284. })
  1285. })
  1286. let cartPramsData = { productIds: productIds.substring(0, productIds.lastIndexOf(',')) }
  1287. // 友盟埋点购物车去结算点击事件
  1288. if (process.env.NODE_ENV != 'development') {
  1289. this.$uma.trackEvent('Um_Event_shoppingCartConfirmOrder', {
  1290. Um_Key_PageName: '去结算',
  1291. Um_Key_SourcePage: '底部菜单购物车'
  1292. })
  1293. }
  1294. this.$api.navigateTo(
  1295. `/pages/user/order/create-order?type=2&data=${JSON.stringify({ data: cartPramsData })}`
  1296. )
  1297. }
  1298. },
  1299. showDelManager() {
  1300. //显示删除商品管理
  1301. this.isshowDelbtn = true
  1302. if (this.isCheckAll) {
  1303. this.updateBothCheckBtn()
  1304. } else {
  1305. this.goodsList.forEach(item => {
  1306. if (item.isChecked) {
  1307. item.cartList.forEach(pros => {
  1308. pros.isChecked = true
  1309. })
  1310. }
  1311. })
  1312. this.updateCheckAllBtn()
  1313. }
  1314. // 失效也被勾选
  1315. this.failureList.forEach(failureItem => {
  1316. if (failureItem.isFailureLayer) {
  1317. failureItem.isFailureLayer = false
  1318. }
  1319. })
  1320. },
  1321. hideDelManage() {
  1322. //隐藏删除商品管理
  1323. this.isshowDelbtn = false
  1324. let isFailureLayer,
  1325. newFailureList = []
  1326. if (this.isCheckAll) {
  1327. this.updateBothCheckBtn()
  1328. } else {
  1329. // 失效商品取消勾选
  1330. this.goodsList.forEach(item => {
  1331. if (item.isDisabled) {
  1332. item.isChecked = false
  1333. }
  1334. item.cartList.forEach(pros => {
  1335. if (pros.validFlag == 3) {
  1336. pros.isChecked = false
  1337. }
  1338. })
  1339. })
  1340. this.updateCheckAllBtn()
  1341. }
  1342. this.failureList.forEach((failure, index) => {
  1343. if (failure.failureState == 1 || failure.failureState == 2) {
  1344. isFailureLayer = true
  1345. } else {
  1346. isFailureLayer = false
  1347. }
  1348. newFailureList.push(Object.assign({}, failure, { isFailureLayer: isFailureLayer }))
  1349. })
  1350. this.failureList = newFailureList
  1351. },
  1352. deleteList() {
  1353. //删除购物车商品
  1354. this.delGoodsList = []
  1355. this.goodsList.forEach(delitem => {
  1356. let products = delitem.cartList
  1357. products.forEach(pros => {
  1358. if (pros.isChecked) {
  1359. this.delGoodsList += pros.productId + ','
  1360. }
  1361. })
  1362. })
  1363. this.failureList.forEach(failure => {
  1364. if (failure.isChecked) {
  1365. this.delGoodsList += failure.productId + ','
  1366. }
  1367. })
  1368. if (this.delGoodsList.length == 0) {
  1369. this.$util.msg('请选择要删除的商品~', 2000)
  1370. return
  1371. } else {
  1372. this.$util.modal('', '确定删除选中的商品吗?', '确定', '取消', true, () => {
  1373. this.ProductService.ShoppingCartDelete({
  1374. userId: this.userId,
  1375. productIds: this.delGoodsList
  1376. })
  1377. .then(response => {
  1378. this.$util.msg('删除成功', 2000)
  1379. setTimeout(() => {
  1380. this.isshowDelbtn = false
  1381. this.initGetCartGoodsList()
  1382. }, 2000)
  1383. })
  1384. .catch(error => {
  1385. this.$util.msg(error.msg, 2000)
  1386. })
  1387. })
  1388. }
  1389. },
  1390. deletefailureList() {
  1391. this.failureList.forEach(failure => {
  1392. this.delGoodsList += failure.productId + ','
  1393. })
  1394. this.$util.modal('', '确定清空全部失效商品吗?', '确定', '取消', true, () => {
  1395. this.ProductService.ShoppingCartDelete({
  1396. userId: this.userId,
  1397. productIds: this.delGoodsList
  1398. })
  1399. .then(response => {
  1400. this.$util.msg('删除成功', 2000)
  1401. setTimeout(() => {
  1402. this.isshowDelbtn = false
  1403. this.initGetCartGoodsList()
  1404. }, 2000)
  1405. })
  1406. .catch(error => {
  1407. this.$util.msg(error.msg, 2000)
  1408. })
  1409. })
  1410. },
  1411. goIndex() {
  1412. uni.switchTab({
  1413. url: '/pages/tabBar/home/index'
  1414. })
  1415. },
  1416. goSuppile(shop) {
  1417. //跳转店铺
  1418. if (shop.shopType === 2) {
  1419. return
  1420. }
  1421. this.$api.navigateTo(`/pages/supplier/user/my-shop?shopId=${shop.shopId}`)
  1422. },
  1423. goNavto(url) {
  1424. uni.navigateTo({
  1425. url
  1426. })
  1427. },
  1428. navToListPage(id) {
  1429. this.isModallayer = true
  1430. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  1431. },
  1432. failureToProduct(failure) {
  1433. if (failure.status == 1) {
  1434. this.$util.msg('商品已丢失,不能查看', 2000)
  1435. return
  1436. } else if (failure.status == 2) {
  1437. this.$util.msg('商品已停售,不能查看', 2000)
  1438. return
  1439. } else {
  1440. this.isModallayer = true
  1441. this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
  1442. }
  1443. },
  1444. failureStateText(state) {
  1445. let stateText = '',
  1446. stateTextObject = {
  1447. 1: '商品已丢失',
  1448. 2: '商品已停售',
  1449. 3: '商品已下架',
  1450. 4: '商品已售罄',
  1451. 5: '价格仅会员可见,您不能购买',
  1452. 6: '未公开价格',
  1453. 7: '库存不足',
  1454. 8: '价格仅医美机构可见'
  1455. }
  1456. Object.keys(stateTextObject).forEach(key => {
  1457. if (key == state) {
  1458. stateText = stateTextObject[key]
  1459. }
  1460. })
  1461. return stateText
  1462. },
  1463. setHeaderBtnPosi() {
  1464. // 获得胶囊按钮位置信息
  1465. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  1466. return headerBtnPosi
  1467. },
  1468. setSysteminfo() {
  1469. let systeminfo
  1470. uni.getSystemInfo({
  1471. // 获取设备信息
  1472. success: res => {
  1473. systeminfo = res
  1474. }
  1475. })
  1476. return systeminfo
  1477. },
  1478. PromotionsFormat(promo) {
  1479. //促销活动类型数据处理
  1480. if (promo != null) {
  1481. if (promo.type == 1 && promo.mode == 1) {
  1482. return true
  1483. } else {
  1484. return false
  1485. }
  1486. }
  1487. return false
  1488. },
  1489. queryPopupCoupons() {
  1490. // 获取弹窗优惠券列表
  1491. this.ProductService.ShoppingCartGetCoupon(this.couponParam)
  1492. .then(response => {
  1493. let data = response.data
  1494. this.navbar[0].num = data.notCouponNum
  1495. this.navbar[1].num = data.couponNum
  1496. if (data.couponList && data.couponList.length > 0) {
  1497. this.productCouponList = data.couponList
  1498. this.isCouponEmpty = false
  1499. } else {
  1500. this.isCouponEmpty = true
  1501. }
  1502. })
  1503. .catch(error => {
  1504. console.log('获取优惠券列表失败')
  1505. })
  1506. },
  1507. receiveCoupon(coupon) {
  1508. // 点击优惠券领取按钮,友盟埋点收集领取优惠券
  1509. if (process.env.NODE_ENV != 'development') {
  1510. this.$uma.trackEvent('Um_Event_cartCouponReceive', {
  1511. Um_Key_PageName: '机构购物车',
  1512. Um_Key_EvenName: '领取优惠券',
  1513. Um_Key_CouponId: `${coupon.couponId}`
  1514. })
  1515. }
  1516. this.ProductService.ReceiveCoupon({
  1517. userId: this.couponParam.userId,
  1518. couponId: coupon.couponId,
  1519. source: 1
  1520. })
  1521. .then(response => {
  1522. this.$util.msg('领取成功', 1500, true, 'success')
  1523. setTimeout(() => {
  1524. this.currentTab = 1
  1525. this.couponParam.status = 2
  1526. this.queryPopupCoupons()
  1527. }, 1500)
  1528. })
  1529. .catch(error => {
  1530. this.$util.msg(error.msg, 2000)
  1531. })
  1532. },
  1533. toDeductCoupon(coupon) {
  1534. // 点击采美豆抵扣优惠券
  1535. if (process.env.NODE_ENV != 'development') {
  1536. this.$uma.trackEvent('Um_Event_userCouponCollectionBuy', {
  1537. Um_Key_PageName: '领券中心',
  1538. Um_Key_EvenName: '抵扣优惠券',
  1539. Um_Key_CouponId: `${coupon.couponId}`
  1540. })
  1541. }
  1542. if (this.hasLogin) {
  1543. if (this.userIdentity === 1 || this.userIdentity === 3) {
  1544. this.$util.msg('您的身份暂不支持领取优惠券', 2000)
  1545. return
  1546. }
  1547. this.WeChatPayCouponBeans(coupon)
  1548. } else {
  1549. this.$api.navigateTo('/pages/login/login')
  1550. }
  1551. },
  1552. WeChatPayCouponBeans(coupon) {
  1553. // 采美豆抵扣优惠券
  1554. this.PayService.WeChatPayCouponBeans({
  1555. source: 1, //领取渠道 1 小程序 2 网站
  1556. userId: this.couponParam.userId,
  1557. couponId: coupon.couponId
  1558. })
  1559. .then(response => {
  1560. this.$util.msg('抵扣成功', 1500)
  1561. setTimeout(() => {
  1562. this.currentTab = 1
  1563. this.couponParam.status = 2
  1564. this.queryPopupCoupons()
  1565. }, 1500)
  1566. })
  1567. .catch(error => {
  1568. this.$util.msg(error.msg, 2000)
  1569. })
  1570. },
  1571. toPayCoupon(coupon) {
  1572. // 点击购买优惠券,友盟埋点收集购买优惠券
  1573. if (process.env.NODE_ENV != 'development') {
  1574. this.$uma.trackEvent('Um_Event_cartCouponBuy', {
  1575. Um_Key_PageName: '机构购物车',
  1576. Um_Key_EvenName: '购买优惠券',
  1577. Um_Key_CouponId: `${coupon.couponId}`
  1578. })
  1579. }
  1580. this.createCouponRecord(coupon)
  1581. },
  1582. createCouponRecord(coupon) {
  1583. // 生成购买优惠券记录Id
  1584. this.PayService.WeChatCouponRecord({
  1585. userId: this.userId,
  1586. couponId: coupon.couponId
  1587. })
  1588. .then(response => {
  1589. this.MiniWxPayFor(coupon, response.data.couponRecordId)
  1590. })
  1591. .catch(error => {
  1592. if (error.code == -1) {
  1593. //个人机构不能购买
  1594. this.contentModalText = '该优惠券仅限医美机构购买,请升级为医美机构后再次购买。'
  1595. this.modal = true
  1596. } else if (error.code == -2) {
  1597. //会员机构不是医美机构不能购买
  1598. this.$util.msg('该优惠券仅限医美机构购买', 2000)
  1599. }
  1600. })
  1601. },
  1602. async MiniWxPayFor(coupon, couponRecordId) {
  1603. const wechatcode = await authorize.getCode('weixin')
  1604. const params = {
  1605. userId: this.userId,
  1606. couponId: coupon.couponId,
  1607. couponRecordId: couponRecordId,
  1608. payType: 'XCX',
  1609. code: wechatcode,
  1610. source: 1 //支付来源 1 小程序 2 WWW
  1611. }
  1612. this.weChatMiniCouponWxPay(
  1613. params,
  1614. 'Um_Event_cartCouponPay',
  1615. '机构购物车',
  1616. '线上支付优惠券',
  1617. coupon.couponId,
  1618. this.userId
  1619. )
  1620. },
  1621. hideMobel() {
  1622. this.modal = false
  1623. },
  1624. handleClick(e) {
  1625. //个人机构跳转升级页面
  1626. if (e.index == 1) {
  1627. this.$api.navigateTo('/pages/login/apply')
  1628. }
  1629. this.modal = false
  1630. },
  1631. showPopup(index, shop) {
  1632. // 显示popup弹窗
  1633. switch (index) {
  1634. case 0:
  1635. // 友盟埋点收集领券按钮
  1636. if (process.env.NODE_ENV != 'development') {
  1637. this.$uma.trackEvent('Um_Event_cartCouponButton', {
  1638. Um_Key_PageName: '机构购物车',
  1639. Um_Key_EvenName: '点击领券按钮',
  1640. Um_Key_userId: `${this.userId}`
  1641. })
  1642. }
  1643. this.currentTab = 0
  1644. this.couponParam.status = 1
  1645. this.couponParam.shopId = shop.shopId
  1646. this.queryPopupCoupons()
  1647. this.popupShow0 = true
  1648. break
  1649. case 1:
  1650. this.popupShow1 = true
  1651. break
  1652. }
  1653. },
  1654. handleShouUnitPopup(pros){// 规格弹窗
  1655. this.popupShow2 = true
  1656. this.handlePros = pros
  1657. },
  1658. hidePopup(index) {
  1659. // 隐藏popup弹窗
  1660. switch (index) {
  1661. case 0:
  1662. this.popupShow0 = false
  1663. break
  1664. case 1:
  1665. this.popupShow1 = false
  1666. break
  1667. }
  1668. },
  1669. couponChange(e) {
  1670. this.currentTab = e.index
  1671. switch (this.currentTab) {
  1672. case 0:
  1673. this.couponParam.status = 1
  1674. this.queryPopupCoupons()
  1675. break
  1676. case 1:
  1677. this.couponParam.status = 2
  1678. this.queryPopupCoupons()
  1679. break
  1680. }
  1681. }
  1682. }
  1683. }
  1684. </script>
  1685. <style lang="scss">
  1686. page {
  1687. background: #f7f7f7;
  1688. height: auto;
  1689. }
  1690. .cart-content {
  1691. position: relative;
  1692. }
  1693. .container-cart-main.none {
  1694. display: none;
  1695. }
  1696. .container-cart-main.show {
  1697. display: block;
  1698. }
  1699. .cart-content.empty.none {
  1700. display: none;
  1701. }
  1702. .cart-content.empty.show {
  1703. display: block;
  1704. }
  1705. .container-cart.show {
  1706. display: block;
  1707. }
  1708. .container-cart.none {
  1709. display: none;
  1710. }
  1711. .empty-container.none {
  1712. display: none;
  1713. }
  1714. .empty-container.show {
  1715. display: flex;
  1716. }
  1717. .foot-check-delbtn {
  1718. width: 100%;
  1719. height: 80rpx;
  1720. position: fixed;
  1721. top: 0;
  1722. left: 0;
  1723. box-sizing: border-box;
  1724. padding: 15rpx 24rpx;
  1725. background-color: #f7f7f7;
  1726. z-index: 990;
  1727. .foot-text {
  1728. font-size: $font-size-26;
  1729. height: 50rpx;
  1730. line-height: 50rpx;
  1731. color: #666666;
  1732. float: left;
  1733. padding-left: 10rpx;
  1734. text {
  1735. margin: 0 6rpx;
  1736. }
  1737. }
  1738. .delBtn {
  1739. width: 100rpx;
  1740. display: inline-block;
  1741. padding: 0 15rpx;
  1742. font-size: $font-size-26;
  1743. height: 50rpx;
  1744. line-height: 50rpx;
  1745. border-radius: 30rpx;
  1746. background: #ffffff;
  1747. border: 1px solid #e15616;
  1748. color: #e15616;
  1749. float: right;
  1750. text-align: center;
  1751. &.none {
  1752. display: none;
  1753. }
  1754. }
  1755. }
  1756. .checkbox-box {
  1757. display: flex;
  1758. align-items: center;
  1759. .checkbox {
  1760. display: flex;
  1761. margin: 0;
  1762. padding: 5rpx;
  1763. display: flex;
  1764. flex-direction: column;
  1765. align-items: center;
  1766. box-sizing: border-box;
  1767. text-align: center;
  1768. text-decoration: none;
  1769. border-radius: 0;
  1770. -webkit-tap-highlight-color: transparent;
  1771. overflow: hidden;
  1772. background-color: #ffffff;
  1773. font-size: 36rpx;
  1774. color: #999999;
  1775. &.icon-yixuanze {
  1776. color: $color-system;
  1777. }
  1778. }
  1779. &.disabled {
  1780. .checkbox {
  1781. color: #999999;
  1782. }
  1783. }
  1784. .text {
  1785. font-size: $font-size-24;
  1786. margin-left: 10rpx;
  1787. }
  1788. }
  1789. .goods-list {
  1790. width: 100%;
  1791. height: auto;
  1792. background-color: #f7f7f7;
  1793. .goods-item {
  1794. width: 702rpx;
  1795. padding: 0 24rpx;
  1796. background: #ffffff;
  1797. margin-bottom: 24rpx;
  1798. }
  1799. .shoptitle {
  1800. height: 80rpx;
  1801. line-height: 80rpx;
  1802. .checkbox-box {
  1803. float: left;
  1804. line-height: 80rpx;
  1805. display: inline-block;
  1806. box-sizing: border-box;
  1807. }
  1808. .text {
  1809. width: 400rpx;
  1810. float: left;
  1811. display: block;
  1812. overflow: hidden;
  1813. text-overflow: ellipsis;
  1814. white-space: nowrap;
  1815. line-height: 80rpx;
  1816. margin-left: 20rpx;
  1817. font-size: $font-size-28;
  1818. color: $text-color;
  1819. text-align: left;
  1820. font-weight: bold;
  1821. }
  1822. .text-coupon {
  1823. float: right;
  1824. line-height: 80rpx;
  1825. font-size: $font-size-30;
  1826. color: #e15616;
  1827. }
  1828. .floor-item-act {
  1829. width: 120rpx;
  1830. height: 80rpx;
  1831. text-align: center;
  1832. box-sizing: border-box;
  1833. float: left;
  1834. padding: 24rpx 0;
  1835. margin-left: 20rpx;
  1836. }
  1837. }
  1838. .goods-pros {
  1839. width: 100%;
  1840. height: auto;
  1841. margin-bottom: 20rpx;
  1842. }
  1843. .goods-pros-t {
  1844. display: flex;
  1845. align-items: center;
  1846. width: 100%;
  1847. height: 210rpx;
  1848. padding: 0 0 26rpx 0;
  1849. .checkbox-box {
  1850. // padding: 10rpx;
  1851. }
  1852. .pros-img {
  1853. width: 210rpx;
  1854. height: 100%;
  1855. border-radius: 10rpx;
  1856. margin: 0 20rpx;
  1857. border: 1px solid #f3f3f3;
  1858. position: relative;
  1859. image {
  1860. width: 100%;
  1861. height: 100%;
  1862. border-radius: 10rpx;
  1863. }
  1864. .pros-type {
  1865. width: 64rpx;
  1866. height: 64rpx;
  1867. text-align: justify;
  1868. box-sizing: border-box;
  1869. padding: 10rpx;
  1870. border-radius: 0 0 8rpx 8rpx;
  1871. background-color: #33ccbf;
  1872. font-size: $font-size-22;
  1873. color: #ffffff;
  1874. line-height: 25rpx;
  1875. position: absolute;
  1876. top: 0;
  1877. right: 10rpx;
  1878. }
  1879. }
  1880. }
  1881. .goods-pros-b {
  1882. width: 100%;
  1883. height: auto;
  1884. padding: 0 0 24rpx 0;
  1885. box-sizing: border-box;
  1886. &.show {
  1887. display: block;
  1888. }
  1889. &.none {
  1890. display: none;
  1891. }
  1892. .sum-none {
  1893. width: 100%;
  1894. height: 48rpx;
  1895. line-height: 48rpx;
  1896. color: $text-color;
  1897. float: left;
  1898. text-align: right;
  1899. .money {
  1900. font-size: $font-size-26;
  1901. color: #999999;
  1902. text-decoration: line-through;
  1903. }
  1904. .money-sign {
  1905. font-size: $font-size-26;
  1906. color: #999999;
  1907. text-decoration: line-through;
  1908. }
  1909. .money-reduced {
  1910. margin-left: 10rpx;
  1911. font-size: $font-size-26;
  1912. color: $color-system;
  1913. .iconfont {
  1914. font-size: $font-size-34;
  1915. }
  1916. }
  1917. }
  1918. .sum {
  1919. width: 100%;
  1920. height: 40rpx;
  1921. font-size: $font-size-26;
  1922. line-height: 40rpx;
  1923. color: $text-color;
  1924. float: left;
  1925. display: flex;
  1926. justify-content: flex-end;
  1927. font-weight: bold;
  1928. .money {
  1929. color: #ff2a2a;
  1930. font-size: $font-size-26;
  1931. }
  1932. .money-sign {
  1933. font-size: $font-size-24;
  1934. color: #ff2a2a;
  1935. }
  1936. }
  1937. }
  1938. .pros-product {
  1939. width: 416rpx;
  1940. height: 100%;
  1941. line-height: 36rpx;
  1942. font-size: $font-size-28;
  1943. position: relative;
  1944. .producttitle {
  1945. width: 100%;
  1946. display: inline-block;
  1947. height: auto;
  1948. text-overflow: ellipsis;
  1949. display: -webkit-box;
  1950. word-break: break-all;
  1951. -webkit-box-orient: vertical;
  1952. -webkit-line-clamp: 2;
  1953. overflow: hidden;
  1954. margin-bottom: 15rpx;
  1955. .no-text {
  1956. display: inline-block;
  1957. height: 36rpx;
  1958. padding: 0 12rpx;
  1959. line-height: 36rpx;
  1960. background: linear-gradient(315deg, rgba(231, 0, 0, 1) 0%, rgba(255, 104, 1, 1) 100%);
  1961. border-radius: 18rpx;
  1962. text-align: center;
  1963. color: #ffffff;
  1964. font-size: $font-size-28;
  1965. margin-right: 24rpx;
  1966. }
  1967. }
  1968. .productspec {
  1969. height: 36rpx;
  1970. color: #999999;
  1971. font-size: $font-size-26;
  1972. }
  1973. .cart-sku-temp{
  1974. width: 100%;
  1975. height: 48rpx;
  1976. margin: 30rpx 0 0 0;
  1977. .cart-sku-text{
  1978. font-size: 28rpx;
  1979. line-height: 48rpx;
  1980. color: #666666;
  1981. float: left;
  1982. }
  1983. .cart-sku-btn{
  1984. padding: 0 16rpx;
  1985. text-align: center;
  1986. line-height: 40rpx;
  1987. font-size: 24rpx;
  1988. box-sizing: border-box;
  1989. border: 1px solid #e15616;
  1990. color: #e15616;
  1991. float: left;
  1992. border-radius: 20rpx;
  1993. margin-left: 16rpx;
  1994. }
  1995. }
  1996. .productprice {
  1997. width: 100%;
  1998. height: 48rpx;
  1999. margin: 30rpx 0 0 0;
  2000. .price {
  2001. line-height: 48rpx;
  2002. font-size: $font-size-26;
  2003. width: 48%;
  2004. color: #ff2a2a;
  2005. float: left;
  2006. font-weight: bold;
  2007. &.disabled {
  2008. color: #999999;
  2009. text-decoration: line-through;
  2010. }
  2011. .money-sign {
  2012. font-size: $font-size-24;
  2013. color: #ff2a2a;
  2014. }
  2015. }
  2016. .count {
  2017. height: 100%;
  2018. float: right;
  2019. position: relative;
  2020. &.show {
  2021. display: block;
  2022. }
  2023. &.none {
  2024. display: none;
  2025. }
  2026. .count-tips {
  2027. width: auto;
  2028. display: inline-block;
  2029. padding: 0 15rpx;
  2030. line-height: 44rpx;
  2031. height: 44rpx;
  2032. border-radius: 22rpx;
  2033. background: $btn-confirm;
  2034. font-size: $font-size-24;
  2035. text-align: center;
  2036. color: #ffffff;
  2037. position: absolute;
  2038. top: -60rpx;
  2039. left: -5rpx;
  2040. z-index: 5;
  2041. &.step {
  2042. left: -217rpx;
  2043. }
  2044. &::before {
  2045. content: '';
  2046. position: absolute;
  2047. bottom: -30rpx;
  2048. right: 15rpx;
  2049. z-index: 1;
  2050. width: 0;
  2051. height: 0;
  2052. border-width: 18rpx;
  2053. border-style: solid;
  2054. border-color: $color-system transparent transparent transparent;
  2055. }
  2056. }
  2057. .number-box {
  2058. display: flex;
  2059. justify-content: center;
  2060. align-items: center;
  2061. border: 2rpx solid #ffe6dc;
  2062. border-radius: 30rpx;
  2063. .iconfont {
  2064. font-size: $font-size-24;
  2065. padding: 0 18rpx;
  2066. color: #999999;
  2067. text-align: center;
  2068. line-height: 48rpx;
  2069. font-weight: bold;
  2070. background: #fef6f3;
  2071. &.icon-jianhao {
  2072. border-radius: 30rpx 0 0 30rpx;
  2073. }
  2074. &.icon-jiahao {
  2075. border-radius: 0 30rpx 30rpx 0;
  2076. }
  2077. }
  2078. .btn-input {
  2079. width: 62rpx;
  2080. height: 48rpx;
  2081. line-height: 48rpx;
  2082. background: #fff;
  2083. border-radius: 4rpx;
  2084. text-align: center;
  2085. font-size: $font-size-24;
  2086. }
  2087. }
  2088. .uni-numbox {
  2089. position: absolute;
  2090. left: 45rpx;
  2091. bottom: 0;
  2092. .uni-numbox-minus,
  2093. .uni-numbox-plus {
  2094. width: 50rpx;
  2095. line-height: 40rpx;
  2096. }
  2097. .uni-numbox-value {
  2098. font-size: $font-size-28;
  2099. width: 60rpx;
  2100. }
  2101. }
  2102. }
  2103. }
  2104. .floor-item-act {
  2105. width: 100%;
  2106. height: 56rpx;
  2107. text-align: center;
  2108. box-sizing: border-box;
  2109. float: left;
  2110. padding: 0 0 10rpx 0;
  2111. margin-left: 10rpx;
  2112. }
  2113. }
  2114. }
  2115. .failure-list {
  2116. width: 702rpx;
  2117. height: auto;
  2118. padding: 0 24rpx;
  2119. margin-top: 20rpx;
  2120. background: #ffffff;
  2121. .failure-title {
  2122. width: 100%;
  2123. height: 82rpx;
  2124. line-height: 82rpx;
  2125. font-size: $font-size-28;
  2126. border-bottom: 1px solid #ebebeb;
  2127. .title-txt {
  2128. float: left;
  2129. color: #666666;
  2130. text-align: left;
  2131. }
  2132. .title-btn {
  2133. float: right;
  2134. color: $color-system;
  2135. text-align: right;
  2136. line-height: 80rpx;
  2137. .butto {
  2138. display: inline-block;
  2139. padding: 0 15rpx;
  2140. font-size: $font-size-26;
  2141. height: 50rpx;
  2142. line-height: 50rpx;
  2143. border-radius: 30rpx;
  2144. background: #ffffff;
  2145. // border: 1px solid #C9C9C9;
  2146. // color: #999999;
  2147. margin-top: 15rpx;
  2148. }
  2149. }
  2150. }
  2151. .productlist {
  2152. padding-top: 10rpx;
  2153. .goods-pros {
  2154. width: 100%;
  2155. height: auto;
  2156. padding: 20rpx 0;
  2157. }
  2158. .goods-pros-t {
  2159. display: flex;
  2160. align-items: center;
  2161. width: 100%;
  2162. height: 210rpx;
  2163. position: relative;
  2164. .img-tip {
  2165. display: block;
  2166. width: 72rpx;
  2167. height: 36rpx;
  2168. line-height: 36rpx;
  2169. font-size: $font-size-24;
  2170. text-align: center;
  2171. color: #ffffff;
  2172. border-radius: 24rpx;
  2173. background: rgba(51, 51, 51, 0.3);
  2174. // position: absolute;
  2175. // left: 0;
  2176. // top: 0;
  2177. }
  2178. .checkbox-box {
  2179. padding: 10rpx;
  2180. }
  2181. .pros-img {
  2182. width: 180rpx;
  2183. height: 100%;
  2184. border-radius: 10rpx;
  2185. margin: 0 20rpx;
  2186. border: 1px solid #f3f3f3;
  2187. position: relative;
  2188. image {
  2189. width: 100%;
  2190. height: 100%;
  2191. border-radius: 10rpx;
  2192. }
  2193. }
  2194. .pros-marks {
  2195. width: 730rpx;
  2196. height: 250rpx;
  2197. z-index: 90;
  2198. background: rgba(0, 0, 0, 0.05);
  2199. position: absolute;
  2200. left: -20rpx;
  2201. top: -20rpx;
  2202. }
  2203. }
  2204. .goods-pros-b {
  2205. width: 622rpx;
  2206. margin-left: 84rpx;
  2207. height: 40rpx;
  2208. padding: 0 0 26rpx 0;
  2209. // border-top: 1px solid #EBEBEB;
  2210. &.show {
  2211. display: block;
  2212. }
  2213. &.none {
  2214. display: none;
  2215. }
  2216. .sum {
  2217. font-size: $font-size-28;
  2218. line-height: 40rpx;
  2219. color: $text-color;
  2220. display: flex;
  2221. justify-content: flex-end;
  2222. .money {
  2223. color: #ff2a2a;
  2224. font-size: $font-size-28;
  2225. }
  2226. .money-sign {
  2227. font-size: $font-size-24;
  2228. color: #ff2a2a;
  2229. }
  2230. }
  2231. }
  2232. .pros-product {
  2233. width: 402rpx;
  2234. height: 100%;
  2235. line-height: 36rpx;
  2236. font-size: $font-size-28;
  2237. position: relative;
  2238. .producttitle {
  2239. width: 100%;
  2240. display: inline-block;
  2241. height: auto;
  2242. text-overflow: ellipsis;
  2243. display: -webkit-box;
  2244. word-break: break-all;
  2245. -webkit-box-orient: vertical;
  2246. -webkit-line-clamp: 2;
  2247. overflow: hidden;
  2248. margin-bottom: 8rpx;
  2249. .no-text {
  2250. display: inline-block;
  2251. height: 36rpx;
  2252. padding: 0 12rpx;
  2253. line-height: 36rpx;
  2254. background: linear-gradient(315deg, rgba(231, 0, 0, 1) 0%, rgba(255, 104, 1, 1) 100%);
  2255. border-radius: 18rpx;
  2256. text-align: center;
  2257. color: #ffffff;
  2258. font-size: $font-size-28;
  2259. margin-right: 24rpx;
  2260. }
  2261. }
  2262. .productspec {
  2263. height: 36rpx;
  2264. color: #999999;
  2265. font-size: $font-size-26;
  2266. margin-top: 20rpx;
  2267. }
  2268. .productstate {
  2269. font-size: $font-size-28;
  2270. height: 44rpx;
  2271. color: #ff2a2a;
  2272. position: absolute;
  2273. bottom: 0;
  2274. left: 0;
  2275. }
  2276. }
  2277. }
  2278. }
  2279. .tui-popup-box {
  2280. position: relative;
  2281. box-sizing: border-box;
  2282. min-height: 220rpx;
  2283. padding: 24rpx 24rpx 0 24rpx;
  2284. .tui-popup-close {
  2285. width: 90rpx;
  2286. height: 90rpx;
  2287. position: absolute;
  2288. right: 0;
  2289. top: 24rpx;
  2290. line-height: 90rpx;
  2291. text-align: center;
  2292. color: #b2b2b2;
  2293. .icon-iconfontguanbi {
  2294. font-size: $font-size-40;
  2295. }
  2296. }
  2297. .title {
  2298. font-size: $font-size-34;
  2299. color: $text-color;
  2300. line-height: 88rpx;
  2301. text-align: center;
  2302. float: left;
  2303. width: 100%;
  2304. height: 88rpx;
  2305. font-weight: bold;
  2306. }
  2307. .tui-popup-main {
  2308. width: 100%;
  2309. float: left;
  2310. &.coupon {
  2311. padding-bottom: 40rpx;
  2312. .coupon-empty {
  2313. width: 100%;
  2314. height: 600rpx;
  2315. display: flex;
  2316. align-items: center;
  2317. justify-content: center;
  2318. flex-direction: column;
  2319. position: fixed;
  2320. background: $bg-color;
  2321. .empty-container-image {
  2322. width: 150rpx;
  2323. height: 150rpx;
  2324. margin-bottom: 0;
  2325. margin-top: 0;
  2326. }
  2327. .error-text {
  2328. font-size: $font-size-28;
  2329. color: #999999;
  2330. line-height: 88rpx;
  2331. }
  2332. }
  2333. }
  2334. .tui-popup-scroll {
  2335. width: 100%;
  2336. height: 600rpx;
  2337. .coupon-list {
  2338. width: 100%;
  2339. height: 200rpx;
  2340. margin-top: 24rpx;
  2341. box-sizing: border-box;
  2342. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  2343. background-size: cover;
  2344. &:last-child {
  2345. margin-bottom: 24rpx;
  2346. }
  2347. .list-cell-le {
  2348. width: 224rpx;
  2349. height: 100%;
  2350. box-sizing: border-box;
  2351. padding: 37rpx 0;
  2352. float: left;
  2353. .coupon-maxMoney {
  2354. width: 100%;
  2355. height: 78rpx;
  2356. line-height: 78rpx;
  2357. font-size: 56rpx;
  2358. color: #ffffff;
  2359. text-align: center;
  2360. .small {
  2361. font-size: $font-size-24;
  2362. }
  2363. }
  2364. .coupon-minMoney {
  2365. width: 100%;
  2366. height: 33rpx;
  2367. line-height: 33rpx;
  2368. font-size: $font-size-24;
  2369. color: #ffffff;
  2370. text-align: center;
  2371. }
  2372. }
  2373. .list-cell-ri {
  2374. width: 478rpx;
  2375. height: 100%;
  2376. box-sizing: border-box;
  2377. padding: 20rpx 24rpx 0 24rpx;
  2378. float: right;
  2379. .list-cell-top {
  2380. width: 100%;
  2381. height: 121rpx;
  2382. float: left;
  2383. border-bottom: 1px solid #e1e1e1;
  2384. .list-cell-type {
  2385. width: 286rpx;
  2386. height: 100%;
  2387. float: left;
  2388. .list-cell-tags {
  2389. width: 100%;
  2390. height: 32rpx;
  2391. margin-bottom: 7rpx;
  2392. .tags {
  2393. display: inline-block;
  2394. padding: 0 10rpx;
  2395. height: 32rpx;
  2396. line-height: 32rpx;
  2397. background-color: #ffdcce;
  2398. color: #f94b4b;
  2399. font-size: $font-size-20;
  2400. border-radius: 8rpx;
  2401. text-align: center;
  2402. float: left;
  2403. }
  2404. }
  2405. .list-cell-texts {
  2406. width: 100%;
  2407. height: auto;
  2408. line-height: 35rpx;
  2409. text-overflow: ellipsis;
  2410. display: -webkit-box;
  2411. word-break: break-all;
  2412. -webkit-box-orient: vertical;
  2413. -webkit-line-clamp: 2;
  2414. overflow: hidden;
  2415. font-size: 26rpx;
  2416. color: #333333;
  2417. }
  2418. }
  2419. .list-cell-btn {
  2420. width: 128rpx;
  2421. height: 100%;
  2422. float: right;
  2423. .icon-used {
  2424. width: 100%;
  2425. height: 100%;
  2426. box-sizing: border-box;
  2427. padding-top: 28rpx;
  2428. .icon-used-text {
  2429. width: 100%;
  2430. text-align: center;
  2431. line-height: 26rpx;
  2432. font-size: $font-size-20;
  2433. color: #f94b4b;
  2434. }
  2435. .icon-used-btn {
  2436. width: 128rpx;
  2437. height: 48rpx;
  2438. border-radius: 28rpx;
  2439. line-height: 48rpx;
  2440. font-size: $font-size-26;
  2441. text-align: center;
  2442. &.receive {
  2443. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);
  2444. color: #ffffff;
  2445. }
  2446. &.make {
  2447. border: solid 1px #f94b4b;
  2448. color: #f94b4b;
  2449. }
  2450. }
  2451. }
  2452. }
  2453. }
  2454. .list-cell-time {
  2455. width: 100%;
  2456. height: 58rpx;
  2457. line-height: 58rpx;
  2458. text-align: left;
  2459. font-size: $font-size-20;
  2460. color: #999999;
  2461. }
  2462. }
  2463. }
  2464. }
  2465. .tui-popup-coupon {
  2466. width: 100%;
  2467. height: 500rpx;
  2468. box-sizing: border-box;
  2469. padding: 30rpx 20rpx;
  2470. .tui-popup-h1 {
  2471. width: 100%;
  2472. height: 66rpx;
  2473. display: flex;
  2474. align-items: center;
  2475. .tui-popup-text {
  2476. flex: 1;
  2477. height: 66rpx;
  2478. line-height: 66rpx;
  2479. font-size: $font-size-30;
  2480. color: #333333;
  2481. &.red {
  2482. color: #f94b4b;
  2483. }
  2484. &.bold {
  2485. font-weight: bold;
  2486. }
  2487. &.left {
  2488. text-align: left;
  2489. }
  2490. &.right {
  2491. text-align: right;
  2492. }
  2493. }
  2494. }
  2495. }
  2496. }
  2497. }
  2498. .footer {
  2499. width: 100%;
  2500. background-color: #ffffff;
  2501. height: 110rpx;
  2502. position: fixed;
  2503. bottom: 0rpx;
  2504. z-index: 990;
  2505. .footer-le {
  2506. width: 520rpx;
  2507. height: 100%;
  2508. padding-left: 24rpx;
  2509. float: left;
  2510. box-sizing: border-box;
  2511. .foot-check {
  2512. width: 100rpx;
  2513. float: left;
  2514. line-height: 110rpx;
  2515. font-size: $font-size-24;
  2516. .checkbox {
  2517. width: 40rpx;
  2518. text-align: center;
  2519. }
  2520. .text {
  2521. width: 60rpx;
  2522. float: right;
  2523. }
  2524. }
  2525. .sum {
  2526. width: 360rpx;
  2527. height: 110rpx;
  2528. float: right;
  2529. box-sizing: border-box;
  2530. padding: 10rpx;
  2531. .sum-none {
  2532. width: 100%;
  2533. height: 45rpx;
  2534. line-height: 45rpx;
  2535. color: $text-color;
  2536. float: left;
  2537. text-align: left;
  2538. .money {
  2539. font-size: $font-size-24;
  2540. color: #999999;
  2541. text-decoration: line-through;
  2542. }
  2543. .money-sign {
  2544. font-size: $font-size-24;
  2545. color: #999999;
  2546. text-decoration: line-through;
  2547. }
  2548. .money-reduced {
  2549. margin-left: 10rpx;
  2550. font-size: $font-size-24;
  2551. color: #ff2a2a;
  2552. }
  2553. .money-popup {
  2554. height: 45rpx;
  2555. line-height: 45rpx;
  2556. display: inline-block;
  2557. float: right;
  2558. font-size: $font-size-24;
  2559. color: #ff2a2a;
  2560. .icon-xiangshangjiantou {
  2561. font-size: $font-size-30;
  2562. margin-left: 5rpx;
  2563. }
  2564. }
  2565. }
  2566. .sum-price {
  2567. width: 100%;
  2568. height: 45rpx;
  2569. line-height: 45rpx;
  2570. font-size: $font-size-30;
  2571. color: $text-color;
  2572. float: left;
  2573. font-weight: normal;
  2574. text-align: left;
  2575. &.none {
  2576. height: 90rpx;
  2577. line-height: 90rpx;
  2578. }
  2579. .money {
  2580. color: #ff2a2a;
  2581. }
  2582. .money-sign {
  2583. font-size: $font-size-24;
  2584. color: #ff2a2a;
  2585. }
  2586. }
  2587. }
  2588. }
  2589. .footer-ri {
  2590. width: 230rpx;
  2591. height: 100%;
  2592. float: right;
  2593. display: flex;
  2594. justify-content: space-between;
  2595. align-items: center;
  2596. z-index: 999;
  2597. box-sizing: border-box;
  2598. padding: 13rpx 15rpx 13rpx 5rpx;
  2599. &.none {
  2600. display: none;
  2601. }
  2602. .btn {
  2603. width: 200rpx;
  2604. height: 100%;
  2605. background: linear-gradient(135deg, rgba(242, 143, 49, 1) 0%, rgba(225, 86, 22, 1) 100%);
  2606. font-size: $font-size-28;
  2607. line-height: 84rpx;
  2608. color: #ffffff;
  2609. display: flex;
  2610. border-radius: 42rpx;
  2611. justify-content: center;
  2612. align-items: center;
  2613. }
  2614. }
  2615. .footer-del {
  2616. width: 400rpx;
  2617. height: 110rpx;
  2618. position: absolute;
  2619. padding-left: 200rpx;
  2620. background: #ffffff;
  2621. right: 0;
  2622. top: 0;
  2623. z-index: 1000;
  2624. &.show {
  2625. animation: showDelbtn 0s linear both;
  2626. }
  2627. &.none {
  2628. animation: hideDelbtn 0s linear both;
  2629. }
  2630. .btn {
  2631. width: 50%;
  2632. height: 100%;
  2633. line-height: 110rpx;
  2634. font-size: $font-size-28;
  2635. color: #ffffff;
  2636. text-align: center;
  2637. float: left;
  2638. }
  2639. .btn.btn-cancel {
  2640. background: #eec1ab;
  2641. }
  2642. .btn.btn-confirm {
  2643. background: #ff2a2a;
  2644. }
  2645. @keyframes showDelbtn {
  2646. 0% {
  2647. transform: translateX(0);
  2648. }
  2649. 100% {
  2650. transform: translateX(-100%);
  2651. }
  2652. }
  2653. @keyframes hideDelbtn {
  2654. 0% {
  2655. transform: translateX(-100%);
  2656. }
  2657. 100% {
  2658. transform: translateX(0);
  2659. }
  2660. }
  2661. }
  2662. }
  2663. </style>