index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <view class="cart" :class="{ hasPaddingTop: cartTopFixed }">
  3. <tui-skeleton v-if="isRequest" loadingType="2"></tui-skeleton>
  4. <template v-if="!isEmpty">
  5. <template v-if="!isshowDelbtn">
  6. <!-- 商品统计 / 批量删除商品 -->
  7. <view class="cart-top" :class="{ fixed: cartTopFixed }">
  8. <view class="count">共{{ kindCount }}件商品</view>
  9. <view class="btn" @click="showDelManager">删除</view>
  10. </view>
  11. <!-- TODO -->
  12. <view class="receive-coupon">
  13. <view class="tip-text">{{ couponTipText }}</view>
  14. <view class="btn" @click="receiveCoupon">领券</view>
  15. </view>
  16. </template>
  17. <!-- 购物车列表 -->
  18. <template v-for="(cart, index) in goodsList">
  19. <cm-cart-product
  20. class="product-list"
  21. :listType="listType"
  22. :key="index"
  23. :data="cart"
  24. vkey="productList"
  25. @chooseAll="chooseAllProduct"
  26. @chooseOne="chooseOneProduct"
  27. ></cm-cart-product>
  28. </template>
  29. <!-- 失效商品列表 -->
  30. <cm-cart-product
  31. class="product-list"
  32. :key="index"
  33. :data="failureList"
  34. :listType="failureListType"
  35. @chooseOne="chooseFailureProduct"
  36. v-if="failureList.length > 0"
  37. ></cm-cart-product>
  38. <!-- 底部按钮 -->
  39. <view class="footer">
  40. <view class="radio" @click="chooseAll">
  41. <text class="iconfont" :class="[isCheckAll ? 'icon-xuanze' : 'icon-weixuanze']"></text>
  42. <text class="tip">全选</text>
  43. </view>
  44. <template v-if="!isshowDelbtn">
  45. <view class="center">
  46. <view class="row">
  47. <text>总价:</text> <text class="total-price">¥{{ allPrice | NumFormat }}</text>
  48. </view>
  49. <!-- TODO -->
  50. <view class="row" v-if="currentCouponIndex > -1">
  51. <text>共减</text>
  52. <text class="discounted-price">¥{{ currentCoupon.couponAmount | NumFormat }}</text>
  53. <text @click="showDiscountedDetail">优惠明细</text>
  54. <text
  55. class="iconfont"
  56. :class="showDitail ? 'tui-icon-arrowdown' : 'tui-icon-arrowup'"
  57. ></text>
  58. </view>
  59. </view>
  60. <view class="submit" @click="toConfirmation">去结算({{ allCount }})</view>
  61. </template>
  62. <view v-else class="footer-del">
  63. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  64. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  65. </view>
  66. </view>
  67. </template>
  68. <view class="empty" v-else>
  69. <cm-empty :image="StaticUrl + 'icon-empty-cart.png'" message="购物车空空的,快去逛逛吧~"></cm-empty>
  70. </view>
  71. <!-- 优惠券列表 TODO-->
  72. <cm-coupon-list
  73. title="优惠券"
  74. listType="search"
  75. :couponList="couponList"
  76. :visible="couponVisible"
  77. :btnUseType="2"
  78. @close="closeCouponList"
  79. @tabClick="couponListTabClick"
  80. @couponClick="couponClick"
  81. :tabs="couponListTabs"
  82. ></cm-coupon-list>
  83. <!-- 优惠明细 -->
  84. <cm-drawer
  85. title="优惠明细"
  86. :visible="showDitail"
  87. position="bottom"
  88. :offset="100"
  89. @close="showDitail = false"
  90. zIndex="99"
  91. >
  92. <template>
  93. <view class="discounted-ditail">
  94. <view class="row">
  95. <text>商品总额</text> <text>¥{{ allPrice | NumFormat }}</text>
  96. </view>
  97. <view class="row">
  98. <text>促销满减</text> <text class="red">-¥{{ discountedPrice | NumFormat }}</text>
  99. </view>
  100. <view class="row" v-if="currentCouponIndex > -1">
  101. <text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | NumFormat }}</text>
  102. </view>
  103. <view class="row total">
  104. <text>总计</text> <text>¥{{ finallyPrice | NumFormat }}</text>
  105. </view>
  106. <view class="tip"> 实际订单金额以结算页为准 </view>
  107. </view>
  108. </template>
  109. </cm-drawer>
  110. <!-- 操作弹窗 -->
  111. <tui-modal
  112. :show="modal"
  113. @click="handleClick"
  114. @cancel="hideModal"
  115. :content="contentModalText"
  116. color="#333"
  117. :size="32"
  118. shape="circle"
  119. :maskClosable="false"
  120. ></tui-modal>
  121. </view>
  122. </template>
  123. <script>
  124. import { isIntersect } from '@/common/util.js'
  125. import CmCouponList from '@/components/cm-module/cm-coupon-list/cm-coupon-list'
  126. import CmDrawer from '@/components/cm-module/cm-drawer/cm-drawer.vue'
  127. import CmCartProduct from '@/components/cm-module/cm-cart-product/cm-cart-product.vue'
  128. import CmEmpty from '@/components/cm-module/cm-empty/cm-empty.vue'
  129. import { mapGetters, mapActions, mapMutations } from 'vuex'
  130. import { fetchSelectedProducts, findCouponBySelected, canUseCoupon, getCountPrice, couponSort } from '@/common/couponUtil.js'
  131. export default {
  132. components: {
  133. CmCouponList,
  134. CmDrawer,
  135. CmCartProduct,
  136. CmEmpty
  137. },
  138. data() {
  139. return {
  140. StaticUrl: this.$Static,
  141. CustomBar: this.CustomBar, // 顶部导航栏高度
  142. popupShow: false,
  143. handlerPros: {}, //监听单挑促销商品
  144. isCheckAll: false, //是否全选
  145. allPrice: 0, //所有价格
  146. totalOriginalPrice: 0, //所有原价价
  147. reducedPrice: 0, //满减
  148. isshowDelbtn: false,
  149. scrollHeight: 'auto',
  150. modal: false,
  151. contentModalText: '',
  152. couponVisible: false,
  153. showDitail: false,
  154. listType: 'normal',
  155. failureListType: 'expired',
  156. scrollTop: 0,
  157. isRequest: true,
  158. currentCouponIndex: -1,
  159. selectedPoducts: [], //已勾选商品列表
  160. receiveCouponList: [], // 已领取优惠券
  161. ableCouponList: [], // 可领取优惠券
  162. canUseCouponList: [], // 当前选中商品可使用的优惠券
  163. currentTabIndex: 0
  164. }
  165. },
  166. computed: {
  167. ...mapGetters([
  168. 'hasLogin',
  169. 'isIphoneX',
  170. 'isEmpty',
  171. 'goodsList',
  172. 'failureList',
  173. 'kindCount',
  174. 'userId',
  175. 'cartIds',
  176. 'productIds'
  177. ]),
  178. //被选中的产品数量
  179. allCount() {
  180. return this.cartIds.length
  181. },
  182. cartTopFixed() {
  183. return this.scrollTop > 0 && !this.isshowDelbtn
  184. },
  185. currentCoupon() {
  186. return this.canUseCouponList[this.currentCouponIndex]
  187. },
  188. nextCoupon() {
  189. if (this.currentCouponIndex <= 0) {
  190. return this.currentCoupon
  191. } else {
  192. return this.canUseCouponList[this.currentCouponIndex - 1]
  193. }
  194. },
  195. discountedPrice() {
  196. return 0
  197. },
  198. finallyPrice() {
  199. if (this.currentCoupon) {
  200. const finallyPrice = this.allPrice - this.discountedPrice - this.currentCoupon.couponAmount
  201. return finallyPrice < 0 ? 0 : finallyPrice
  202. }
  203. return this.allPrice - this.discountedPrice
  204. },
  205. couponTipText() {
  206. if (this.currentCouponIndex === -1) return ''
  207. if (this.currentCoupon === this.nextCoupon) {
  208. if (this.nextCoupon.noThresholdFlag === 1) {
  209. return `已享“减${this.currentCoupon.couponAmount}元”优惠券`
  210. }
  211. return `已享“满${this.currentCoupon.touchPrice}元减${this.currentCoupon.couponAmount}元”优惠券`
  212. }
  213. return `还差¥${this.nextCoupon.touchPrice - getCountPrice(this.selectedPoducts, this.nextCoupon)}元可用“满${this.nextCoupon.touchPrice}元减${
  214. this.nextCoupon.couponAmount
  215. }元”优惠券`
  216. },
  217. couponList() {
  218. if (this.currentTabIndex === 0) {
  219. return couponSort(this.receiveCouponList)
  220. } else {
  221. return couponSort(this.ableCouponList)
  222. }
  223. },
  224. couponListTabs() {
  225. const tabs = []
  226. const receiveCount = this.receiveCouponList.length
  227. const ableCouponCount = this.ableCouponList.length
  228. if (receiveCount > 0) {
  229. tabs.push({ name: `已领取优惠券(${receiveCount})` })
  230. } else {
  231. tabs.push({ name: '已领取优惠券' })
  232. }
  233. if (ableCouponCount > 0) {
  234. tabs.push({ name: `可领取优惠券(${ableCouponCount})` })
  235. } else {
  236. tabs.push({ name: '可领取优惠券' })
  237. }
  238. return tabs
  239. }
  240. },
  241. filters: {
  242. NumFormat(value) {
  243. //处理金额
  244. return Number(value).toFixed(2)
  245. },
  246. totalprice(val, count) {
  247. //单件商品的价格 × 数量
  248. return (val * count).toFixed(2)
  249. }
  250. },
  251. watch: {
  252. //深度监听所有数据,每次改变重新计算总价和总数
  253. goodsList: {
  254. deep: true,
  255. handler(val, oldval) {
  256. this.totalPeice()
  257. this.resetCouponUtil()
  258. }
  259. },
  260. isshowDelbtn(val) {
  261. if (val) {
  262. this.failureListType = 'expired delete'
  263. this.listType = 'normal delete'
  264. } else {
  265. this.failureListType = 'expired'
  266. this.listType = 'normal'
  267. }
  268. }
  269. },
  270. //下拉刷新
  271. onPullDownRefresh() {
  272. this.initCart().finally(() => {
  273. setTimeout(() => {
  274. uni.stopPullDownRefresh()
  275. }, 2000)
  276. })
  277. },
  278. onPageScroll(e) {
  279. this.scrollTop = e.scrollTop
  280. },
  281. onShow() {
  282. if (this.hasLogin) {
  283. this.initData()
  284. } else {
  285. this.$api.redirectTo('/pages/login/login')
  286. }
  287. },
  288. onLoad() {
  289. this.setScrollHeight()
  290. },
  291. methods: {
  292. ...mapActions('cart', ['initCart', 'removeFromCart']),
  293. ...mapMutations('cart', ['selectAllProduct', 'saveCartIds', 'selectAllFailure', 'saveProductIds']),
  294. initData() {
  295. this.saveCartIds([]) // 清空已选项
  296. this.saveProductIds([]) // 清空已选项
  297. this.isCheckAll = false
  298. this.isshowDelbtn = false
  299. // 初始化购物车后也要获取商品下的优惠券列表
  300. this.initCart()
  301. .then(() => {
  302. this.getCouponList()
  303. })
  304. .finally(() => {
  305. this.isRequest = false
  306. })
  307. },
  308. // 获取优惠券列表
  309. getCouponList() {
  310. if (this.isEmpty) return
  311. const productIds = []
  312. this.goodsList.forEach(shop => shop.productList.forEach(product => productIds.push(product.productId)))
  313. this.CouponService.GetCouponByProductIds({ userId: this.userId, productIds: productIds.join(',') }).then(
  314. res => {
  315. this.receiveCouponList = res.data.receiveCouponList
  316. this.ableCouponList = res.data.ableCouponList
  317. this.resetCouponUtil()
  318. }
  319. )
  320. },
  321. resetCouponUtil() {
  322. if(this.receiveCouponList.length <= 0) return
  323. this.selectedPoducts = fetchSelectedProducts(this.goodsList)
  324. this.canUseCouponList = findCouponBySelected(this.productIds, this.receiveCouponList)
  325. this.currentCouponIndex = canUseCoupon(0, this.productIds, this.canUseCouponList, this.selectedPoducts)
  326. },
  327. couponListTabClick(index) {
  328. this.currentTabIndex = index
  329. },
  330. couponClick() {
  331. // 领取优惠券
  332. if (this.currentTabIndex === 1) {
  333. this.getCouponList()
  334. }else{
  335. this.couponVisible = false
  336. }
  337. },
  338. // 领取优惠券弹窗
  339. receiveCoupon(){
  340. this.couponVisible = true
  341. this.getCouponList()
  342. },
  343. // 勾选单个失效商品
  344. chooseFailureProduct() {
  345. this.isSelectAll()
  346. },
  347. // 勾选供应商下所有商品
  348. chooseAllProduct() {
  349. this.isSelectAll()
  350. },
  351. // 勾选单核商品
  352. chooseOneProduct() {
  353. this.isSelectAll()
  354. },
  355. // 勾选全部商品
  356. chooseAll() {
  357. this.isCheckAll = !this.isCheckAll
  358. // 勾选所有有效商品
  359. this.selectAllProduct(this.isCheckAll)
  360. // 勾选所有失效商品
  361. if (this.isshowDelbtn) {
  362. this.selectAllFailure(this.isCheckAll)
  363. }
  364. this.isSelectAll()
  365. },
  366. // 判断是否全选商品
  367. isSelectAll() {
  368. // 是否勾选全部正常商品
  369. this.isCheckAll = this.goodsList.every(shop => shop.checked)
  370. if (this.isshowDelbtn) {
  371. this.isCheckAll = this.isCheckAll && this.failureList.every(product => product.productsChecked)
  372. }
  373. this.getCheckedProductId()
  374. },
  375. // 获取勾选商品的id
  376. getCheckedProductId() {
  377. const cartIds = []
  378. const productIds = []
  379. // 获取所有有效商品cartId
  380. this.goodsList.forEach(shop => {
  381. const ids = shop.productList.reduce((cartIds, prod) => {
  382. if (prod.productsChecked) {
  383. cartIds.push(prod.cartId)
  384. productIds.push(prod.productId)
  385. }
  386. return cartIds
  387. }, [])
  388. cartIds.push(...ids)
  389. })
  390. // 获取所有失效商品cartId
  391. if (this.isshowDelbtn) {
  392. const ids = this.failureList.reduce((cartIds, prod) => {
  393. if (prod.productsChecked) cartIds.push(prod.cartId)
  394. return cartIds
  395. }, [])
  396. cartIds.push(...ids)
  397. }
  398. this.saveProductIds(productIds) // 保存已选商品
  399. this.saveCartIds(cartIds)
  400. this.resetCouponUtil()
  401. },
  402. //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  403. totalPeice() {
  404. const priceObj = this.goodsList.reduce(
  405. (priceObj, shop) => {
  406. shop.productList.forEach(prod => {
  407. if (prod.productsChecked) {
  408. priceObj.totalOriginalPrice += prod.price * prod.productCount
  409. // 单品满减
  410. if (prod.promotion && prod.promotion.type * 1 === 1 && prod.promotion.mode * 1 === 2) {
  411. // 单品满减-重新计算供应商总价/满减金额
  412. if (prod.price * prod.productCount >= prod.promotion.touchPrice) {
  413. priceObj.reducedPrice += prod.promotion.reducedPrice
  414. }
  415. }
  416. }
  417. })
  418. priceObj.allPrice = priceObj.totalOriginalPrice - priceObj.reducedPrice
  419. return priceObj
  420. },
  421. {
  422. totalOriginalPrice: 0,
  423. reducedPrice: 0,
  424. allPrice: 0
  425. }
  426. )
  427. this.allPrice = priceObj.allPrice
  428. },
  429. //显示删除商品管理
  430. showDelManager() {
  431. this.isshowDelbtn = true
  432. },
  433. //隐藏删除商品管理
  434. hideDelManage() {
  435. this.selectAllFailure(false)
  436. this.isSelectAll()
  437. this.isshowDelbtn = false
  438. },
  439. //删除购物车商品
  440. deleteList() {
  441. if (this.cartIds.length <= 0) {
  442. return this.$util.msg('请选择要删除的商品~', 2000)
  443. } else {
  444. this.modal = true
  445. this.contentModalText = '确定删除选中的商品吗?'
  446. }
  447. },
  448. //从购物车移除商品
  449. handleClick(e) {
  450. if (e.index !== 1) return (this.modal = false)
  451. // 删除所有勾选的商品
  452. this.removeFromCart().finally(() => {
  453. this.isshowDelbtn = false
  454. })
  455. this.modal = false
  456. },
  457. // 关闭优惠券弹窗
  458. closeCouponList() {
  459. this.couponVisible = false
  460. },
  461. // 活动价弹窗
  462. clickPopupShow(pros, type) {
  463. if (pros.ladderList.length > 0) {
  464. this.popupShow = true
  465. this.handlerPros = pros
  466. }
  467. },
  468. // 优惠明细
  469. showDiscountedDetail() {
  470. this.showDitail = true
  471. },
  472. //跳转确认订单页面
  473. toConfirmation() {
  474. if (this.cartIds.length <= 0) {
  475. return this.$util.msg('请先选择结算商品~', 2000)
  476. }
  477. let cartPramsData = {
  478. allPrice: this.allPrice,
  479. allCount: this.allCount,
  480. cartIds: this.cartIds.join(','),
  481. productIds: this.productIds.join(','),
  482. productCount: ''
  483. }
  484. this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({ data: cartPramsData })}`)
  485. },
  486. hideModal() {
  487. this.modal = false
  488. },
  489. navToListPage(item) {
  490. this.$api.navigateTo(`/pages/goods/product?productId=${item.productId}`)
  491. },
  492. // 窗口高度-footer高度
  493. setScrollHeight() {
  494. const { windowHeight, pixelRatio } = uni.getSystemInfoSync()
  495. setTimeout(() => {
  496. const query = uni.createSelectorQuery().in(this)
  497. query.selectAll('.footer').boundingClientRect()
  498. query.exec(res => {
  499. this.windowHeight = windowHeight
  500. if (res[0][0]) {
  501. this.scrollHeight = windowHeight - res[0][0].height
  502. }
  503. })
  504. }, 500)
  505. }
  506. }
  507. }
  508. </script>
  509. <style lang="scss" scoped>
  510. .cart {
  511. padding-bottom: 100rpx;
  512. background: #f7f7f7;
  513. min-height: 100%;
  514. box-sizing: border-box;
  515. &.hasPaddingTop {
  516. padding-top: 80rpx;
  517. }
  518. .cart-top {
  519. display: flex;
  520. justify-content: space-between;
  521. align-items: center;
  522. padding: 0 24rpx;
  523. width: 750rpx;
  524. height: 80rpx;
  525. background: #f7f7f7;
  526. box-sizing: border-box;
  527. &.fixed {
  528. position: fixed;
  529. top: 0;
  530. flex: 0;
  531. z-index: 9999;
  532. }
  533. .count {
  534. font-size: 30rpx;
  535. color: #333333;
  536. }
  537. .btn {
  538. display: flex;
  539. justify-content: center;
  540. align-items: center;
  541. width: 88rpx;
  542. height: 42rpx;
  543. background: #fff8fd;
  544. border: 1rpx solid #ff457b;
  545. border-radius: 24rpx;
  546. font-size: 26rpx;
  547. color: #ff457b;
  548. }
  549. }
  550. .receive-coupon {
  551. display: flex;
  552. justify-content: space-between;
  553. align-items: center;
  554. padding: 24rpx;
  555. background: #fff;
  556. .tip-text {
  557. width: 560rpx;
  558. font-size: 26rpx;
  559. color: #ff457b;
  560. white-space: nowrap;
  561. overflow: hidden;
  562. text-overflow: ellipsis;
  563. }
  564. .btn {
  565. width: 88rpx;
  566. height: 42rpx;
  567. background: linear-gradient(270deg, #f83c6c 0%, #fc32b4 100%);
  568. border-radius: 28rpx;
  569. font-size: 26rpx;
  570. color: #ffffff;
  571. text-align: center;
  572. line-height: 42rpx;
  573. }
  574. }
  575. .footer {
  576. position: fixed;
  577. bottom: 0;
  578. left: 0;
  579. z-index: 899;
  580. display: flex;
  581. justify-content: space-between;
  582. align-items: center;
  583. width: 100%;
  584. height: 100rpx;
  585. box-sizing: border-box;
  586. padding: 0 24rpx;
  587. border-top: 1rpx solid #eee;
  588. background: #ffffff;
  589. .radio {
  590. font-size: 36rpx;
  591. color: #b2b2b2;
  592. .icon-xuanze {
  593. color: #f83c6c;
  594. }
  595. .tip {
  596. font-size: 30rpx;
  597. color: #333333;
  598. margin-left: 6rpx;
  599. }
  600. }
  601. .row {
  602. &:nth-child(1) {
  603. font-size: 26rpx;
  604. color: #333333;
  605. .total-price {
  606. color: #ff457b;
  607. }
  608. }
  609. &:nth-child(2) {
  610. margin-top: 6rpx;
  611. font-size: 24rpx;
  612. color: #ff457b;
  613. }
  614. .discounted-price {
  615. margin-right: 32rpx;
  616. }
  617. }
  618. .submit {
  619. width: 210rpx;
  620. height: 80rpx;
  621. background: linear-gradient(90deg, #fc32b4 0%, #f83c6c 100%);
  622. border-radius: 40rpx;
  623. font-size: 30rpx;
  624. color: #ffffff;
  625. text-align: center;
  626. line-height: 80rpx;
  627. }
  628. .footer-del {
  629. width: 420rpx;
  630. height: 100rpx;
  631. position: absolute;
  632. padding-left: 200rpx;
  633. background: #ffffff;
  634. right: 0;
  635. top: 0;
  636. z-index: 1000;
  637. box-sizing: border-box;
  638. padding: 10rpx 0;
  639. display: flex;
  640. &.show {
  641. animation: showDelbtn 0s linear both;
  642. }
  643. &.none {
  644. animation: hideDelbtn 0s linear both;
  645. }
  646. .btn {
  647. flex: 1;
  648. margin: 0 8rpx;
  649. height: 100%;
  650. line-height: 80rpx;
  651. font-size: $font-size-28;
  652. color: #ffffff;
  653. text-align: center;
  654. float: left;
  655. border-radius: 40rpx;
  656. }
  657. .btn.btn-cancel {
  658. background: #f7f7f7;
  659. color: #b2b2b2;
  660. }
  661. .btn.btn-confirm {
  662. background: $btn-confirm;
  663. color: #ffffff;
  664. }
  665. @keyframes showDelbtn {
  666. 0% {
  667. transform: translateX(0);
  668. }
  669. 100% {
  670. transform: translateX(-100%);
  671. }
  672. }
  673. @keyframes hideDelbtn {
  674. 0% {
  675. transform: translateX(-100%);
  676. }
  677. 100% {
  678. transform: translateX(0);
  679. }
  680. }
  681. }
  682. }
  683. .discounted-ditail {
  684. padding: 52rpx 8rpx 0;
  685. .row {
  686. display: flex;
  687. justify-content: space-between;
  688. align-items: center;
  689. padding: 12rpx 0;
  690. text {
  691. font-size: 30rpx;
  692. color: #333333;
  693. &.red {
  694. color: #f94b4b;
  695. }
  696. }
  697. &.total {
  698. font-size: 30rpx;
  699. font-weight: 600;
  700. }
  701. }
  702. .tip {
  703. padding: 12rpx 0;
  704. font-size: 26rpx;
  705. color: #999999;
  706. }
  707. }
  708. .empty {
  709. height: 80vh;
  710. }
  711. }
  712. </style>