index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  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 } 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. return this.allPrice - this.discountedPrice - this.currentCoupon.couponAmount
  201. }
  202. return this.allPrice - this.discountedPrice
  203. },
  204. couponTipText() {
  205. if (this.currentCouponIndex === -1) return ''
  206. if (this.currentCoupon === this.nextCoupon) {
  207. if (this.nextCoupon.noThresholdFlag === 1) {
  208. return `已享“减${this.currentCoupon.couponAmount}元”优惠券`
  209. }
  210. return `已享“满${this.currentCoupon.touchPrice}元减${this.currentCoupon.couponAmount}元”优惠券`
  211. }
  212. return `还差¥${this.nextCoupon.touchPrice - getCountPrice()}元可用“满${this.nextCoupon.touchPrice}元减${
  213. this.nextCoupon.couponAmount
  214. }元”优惠券`
  215. },
  216. couponList() {
  217. if (this.currentTabIndex === 0) {
  218. return this.receiveCouponList
  219. } else {
  220. return this.ableCouponList
  221. }
  222. },
  223. couponListTabs() {
  224. const tabs = []
  225. const receiveCount = this.receiveCouponList.length
  226. const ableCouponCount = this.ableCouponList.length
  227. if (receiveCount > 0) {
  228. tabs.push({ name: `已领取优惠券(${receiveCount})` })
  229. } else {
  230. tabs.push({ name: '已领取优惠券' })
  231. }
  232. if (ableCouponCount > 0) {
  233. tabs.push({ name: `可领取优惠券(${ableCouponCount})` })
  234. } else {
  235. tabs.push({ name: '可领取优惠券' })
  236. }
  237. return tabs
  238. }
  239. },
  240. filters: {
  241. NumFormat(value) {
  242. //处理金额
  243. return Number(value).toFixed(2)
  244. },
  245. totalprice(val, count) {
  246. //单件商品的价格 × 数量
  247. return (val * count).toFixed(2)
  248. }
  249. },
  250. watch: {
  251. //深度监听所有数据,每次改变重新计算总价和总数
  252. goodsList: {
  253. deep: true,
  254. handler(val, oldval) {
  255. this.totalPeice()
  256. this.resetCouponUtil()
  257. }
  258. },
  259. isshowDelbtn(val) {
  260. if (val) {
  261. this.failureListType = 'expired delete'
  262. this.listType = 'normal delete'
  263. } else {
  264. this.failureListType = 'expired'
  265. this.listType = 'normal'
  266. }
  267. }
  268. },
  269. //下拉刷新
  270. onPullDownRefresh() {
  271. this.initCart().finally(() => {
  272. setTimeout(() => {
  273. uni.stopPullDownRefresh()
  274. }, 2000)
  275. })
  276. },
  277. onPageScroll(e) {
  278. this.scrollTop = e.scrollTop
  279. },
  280. onShow() {
  281. if (this.hasLogin) {
  282. this.initData()
  283. } else {
  284. this.$api.redirectTo('/pages/login/login')
  285. }
  286. },
  287. onLoad() {
  288. this.setScrollHeight()
  289. },
  290. methods: {
  291. ...mapActions('cart', ['initCart', 'removeFromCart']),
  292. ...mapMutations('cart', ['selectAllProduct', 'saveCartIds', 'selectAllFailure', 'saveProductIds']),
  293. initData() {
  294. this.saveCartIds([]) // 清空已选项
  295. this.saveProductIds([]) // 清空已选项
  296. this.isCheckAll = false
  297. this.isshowDelbtn = false
  298. // 初始化购物车后也要获取商品下的优惠券列表
  299. this.initCart()
  300. .then(() => {
  301. this.getCouponList()
  302. })
  303. .finally(() => {
  304. this.isRequest = false
  305. })
  306. },
  307. // 获取优惠券列表
  308. getCouponList() {
  309. if (this.isEmpty) return
  310. const productIds = []
  311. this.goodsList.forEach(shop => shop.productList.forEach(product => productIds.push(product.productId)))
  312. this.CouponService.GetCouponByProductIds({ userId: this.userId, productIds: productIds.join(',') }).then(
  313. res => {
  314. this.receiveCouponList = res.data.receiveCouponList
  315. this.ableCouponList = res.data.ableCouponList
  316. this.resetCouponUtil()
  317. }
  318. )
  319. },
  320. resetCouponUtil() {
  321. if(this.receiveCouponList.length <= 0) return
  322. this.selectedPoducts = fetchSelectedProducts(this.goodsList)
  323. this.canUseCouponList = findCouponBySelected(this.productIds, this.receiveCouponList)
  324. this.currentCouponIndex = canUseCoupon(0, this.productIds, this.canUseCouponList, this.selectedPoducts)
  325. },
  326. couponListTabClick(index) {
  327. this.currentTabIndex = index
  328. },
  329. couponClick() {
  330. // 领取优惠券
  331. if (this.currentTabIndex === 1) {
  332. this.getCouponList()
  333. }else{
  334. this.couponVisible = false
  335. }
  336. },
  337. // 领取优惠券弹窗
  338. receiveCoupon(){
  339. this.couponVisible = true
  340. this.getCouponList()
  341. },
  342. // 勾选单个失效商品
  343. chooseFailureProduct() {
  344. this.isSelectAll()
  345. },
  346. // 勾选供应商下所有商品
  347. chooseAllProduct() {
  348. this.isSelectAll()
  349. },
  350. // 勾选单核商品
  351. chooseOneProduct() {
  352. this.isSelectAll()
  353. },
  354. // 勾选全部商品
  355. chooseAll() {
  356. this.isCheckAll = !this.isCheckAll
  357. // 勾选所有有效商品
  358. this.selectAllProduct(this.isCheckAll)
  359. // 勾选所有失效商品
  360. if (this.isshowDelbtn) {
  361. this.selectAllFailure(this.isCheckAll)
  362. }
  363. this.isSelectAll()
  364. },
  365. // 判断是否全选商品
  366. isSelectAll() {
  367. // 是否勾选全部正常商品
  368. this.isCheckAll = this.goodsList.every(shop => shop.checked)
  369. if (this.isshowDelbtn) {
  370. this.isCheckAll = this.isCheckAll && this.failureList.every(product => product.productsChecked)
  371. }
  372. this.getCheckedProductId()
  373. },
  374. // 获取勾选商品的id
  375. getCheckedProductId() {
  376. const cartIds = []
  377. const productIds = []
  378. // 获取所有有效商品cartId
  379. this.goodsList.forEach(shop => {
  380. const ids = shop.productList.reduce((cartIds, prod) => {
  381. if (prod.productsChecked) {
  382. cartIds.push(prod.cartId)
  383. productIds.push(prod.productId)
  384. }
  385. return cartIds
  386. }, [])
  387. cartIds.push(...ids)
  388. })
  389. // 获取所有失效商品cartId
  390. if (this.isshowDelbtn) {
  391. const ids = this.failureList.reduce((cartIds, prod) => {
  392. if (prod.productsChecked) cartIds.push(prod.cartId)
  393. return cartIds
  394. }, [])
  395. cartIds.push(...ids)
  396. }
  397. this.saveProductIds(productIds) // 保存已选商品
  398. this.saveCartIds(cartIds)
  399. this.resetCouponUtil()
  400. },
  401. //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  402. totalPeice() {
  403. const priceObj = this.goodsList.reduce(
  404. (priceObj, shop) => {
  405. shop.productList.forEach(prod => {
  406. if (prod.productsChecked) {
  407. priceObj.totalOriginalPrice += prod.price * prod.productCount
  408. // 单品满减
  409. if (prod.promotion && prod.promotion.type * 1 === 1 && prod.promotion.mode * 1 === 2) {
  410. // 单品满减-重新计算供应商总价/满减金额
  411. if (prod.price * prod.productCount >= prod.promotion.touchPrice) {
  412. priceObj.reducedPrice += prod.promotion.reducedPrice
  413. }
  414. }
  415. }
  416. })
  417. priceObj.allPrice = priceObj.totalOriginalPrice - priceObj.reducedPrice
  418. return priceObj
  419. },
  420. {
  421. totalOriginalPrice: 0,
  422. reducedPrice: 0,
  423. allPrice: 0
  424. }
  425. )
  426. this.allPrice = priceObj.allPrice
  427. },
  428. //显示删除商品管理
  429. showDelManager() {
  430. this.isshowDelbtn = true
  431. },
  432. //隐藏删除商品管理
  433. hideDelManage() {
  434. this.selectAllFailure(false)
  435. this.isSelectAll()
  436. this.isshowDelbtn = false
  437. },
  438. //删除购物车商品
  439. deleteList() {
  440. if (this.cartIds.length <= 0) {
  441. return this.$util.msg('请选择要删除的商品~', 2000)
  442. } else {
  443. this.modal = true
  444. this.contentModalText = '确定删除选中的商品吗?'
  445. }
  446. },
  447. //从购物车移除商品
  448. handleClick(e) {
  449. if (e.index !== 1) return (this.modal = false)
  450. // 删除所有勾选的商品
  451. this.removeFromCart().finally(() => {
  452. this.isshowDelbtn = false
  453. })
  454. this.modal = false
  455. },
  456. // 关闭优惠券弹窗
  457. closeCouponList() {
  458. this.couponVisible = false
  459. },
  460. // 活动价弹窗
  461. clickPopupShow(pros, type) {
  462. if (pros.ladderList.length > 0) {
  463. this.popupShow = true
  464. this.handlerPros = pros
  465. }
  466. },
  467. // 优惠明细
  468. showDiscountedDetail() {
  469. this.showDitail = true
  470. },
  471. //跳转确认订单页面
  472. toConfirmation() {
  473. if (this.cartIds.length <= 0) {
  474. return this.$util.msg('请先选择结算商品~', 2000)
  475. }
  476. let cartPramsData = {
  477. allPrice: this.allPrice,
  478. allCount: this.allCount,
  479. cartIds: this.cartIds.join(','),
  480. productIds: this.productIds.join(','),
  481. productCount: ''
  482. }
  483. this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({ data: cartPramsData })}`)
  484. },
  485. hideModal() {
  486. this.modal = false
  487. },
  488. navToListPage(item) {
  489. this.$api.navigateTo(`/pages/goods/product?productId=${item.productId}`)
  490. },
  491. // 窗口高度-footer高度
  492. setScrollHeight() {
  493. const { windowHeight, pixelRatio } = uni.getSystemInfoSync()
  494. setTimeout(() => {
  495. const query = uni.createSelectorQuery().in(this)
  496. query.selectAll('.footer').boundingClientRect()
  497. query.exec(res => {
  498. this.windowHeight = windowHeight
  499. if (res[0][0]) {
  500. this.scrollHeight = windowHeight - res[0][0].height
  501. }
  502. })
  503. }, 500)
  504. }
  505. }
  506. }
  507. </script>
  508. <style lang="scss" scoped>
  509. .cart {
  510. padding-bottom: 100rpx;
  511. background: #f7f7f7;
  512. min-height: 100%;
  513. box-sizing: border-box;
  514. &.hasPaddingTop {
  515. padding-top: 80rpx;
  516. }
  517. .cart-top {
  518. display: flex;
  519. justify-content: space-between;
  520. align-items: center;
  521. padding: 0 24rpx;
  522. width: 750rpx;
  523. height: 80rpx;
  524. background: #f7f7f7;
  525. box-sizing: border-box;
  526. &.fixed {
  527. position: fixed;
  528. top: 0;
  529. flex: 0;
  530. z-index: 9999;
  531. }
  532. .count {
  533. font-size: 30rpx;
  534. color: #333333;
  535. }
  536. .btn {
  537. display: flex;
  538. justify-content: center;
  539. align-items: center;
  540. width: 88rpx;
  541. height: 42rpx;
  542. background: #fff8fd;
  543. border: 1rpx solid #ff457b;
  544. border-radius: 24rpx;
  545. font-size: 26rpx;
  546. color: #ff457b;
  547. }
  548. }
  549. .receive-coupon {
  550. display: flex;
  551. justify-content: space-between;
  552. align-items: center;
  553. padding: 24rpx;
  554. background: #fff;
  555. .tip-text {
  556. width: 560rpx;
  557. font-size: 26rpx;
  558. color: #ff457b;
  559. white-space: nowrap;
  560. overflow: hidden;
  561. text-overflow: ellipsis;
  562. }
  563. .btn {
  564. width: 88rpx;
  565. height: 42rpx;
  566. background: linear-gradient(270deg, #f83c6c 0%, #fc32b4 100%);
  567. border-radius: 28rpx;
  568. font-size: 26rpx;
  569. color: #ffffff;
  570. text-align: center;
  571. line-height: 42rpx;
  572. }
  573. }
  574. .footer {
  575. position: fixed;
  576. bottom: 0;
  577. left: 0;
  578. z-index: 899;
  579. display: flex;
  580. justify-content: space-between;
  581. align-items: center;
  582. width: 100%;
  583. height: 100rpx;
  584. box-sizing: border-box;
  585. padding: 0 24rpx;
  586. border-top: 1rpx solid #eee;
  587. background: #ffffff;
  588. .radio {
  589. font-size: 36rpx;
  590. color: #b2b2b2;
  591. .icon-xuanze {
  592. color: #f83c6c;
  593. }
  594. .tip {
  595. font-size: 30rpx;
  596. color: #333333;
  597. margin-left: 6rpx;
  598. }
  599. }
  600. .row {
  601. &:nth-child(1) {
  602. font-size: 26rpx;
  603. color: #333333;
  604. .total-price {
  605. color: #ff457b;
  606. }
  607. }
  608. &:nth-child(2) {
  609. margin-top: 6rpx;
  610. font-size: 24rpx;
  611. color: #ff457b;
  612. }
  613. .discounted-price {
  614. margin-right: 32rpx;
  615. }
  616. }
  617. .submit {
  618. width: 210rpx;
  619. height: 80rpx;
  620. background: linear-gradient(90deg, #fc32b4 0%, #f83c6c 100%);
  621. border-radius: 40rpx;
  622. font-size: 30rpx;
  623. color: #ffffff;
  624. text-align: center;
  625. line-height: 80rpx;
  626. }
  627. .footer-del {
  628. width: 420rpx;
  629. height: 100rpx;
  630. position: absolute;
  631. padding-left: 200rpx;
  632. background: #ffffff;
  633. right: 0;
  634. top: 0;
  635. z-index: 1000;
  636. box-sizing: border-box;
  637. padding: 10rpx 0;
  638. display: flex;
  639. &.show {
  640. animation: showDelbtn 0s linear both;
  641. }
  642. &.none {
  643. animation: hideDelbtn 0s linear both;
  644. }
  645. .btn {
  646. flex: 1;
  647. margin: 0 8rpx;
  648. height: 100%;
  649. line-height: 80rpx;
  650. font-size: $font-size-28;
  651. color: #ffffff;
  652. text-align: center;
  653. float: left;
  654. border-radius: 40rpx;
  655. }
  656. .btn.btn-cancel {
  657. background: #f7f7f7;
  658. color: #b2b2b2;
  659. }
  660. .btn.btn-confirm {
  661. background: $btn-confirm;
  662. color: #ffffff;
  663. }
  664. @keyframes showDelbtn {
  665. 0% {
  666. transform: translateX(0);
  667. }
  668. 100% {
  669. transform: translateX(-100%);
  670. }
  671. }
  672. @keyframes hideDelbtn {
  673. 0% {
  674. transform: translateX(-100%);
  675. }
  676. 100% {
  677. transform: translateX(0);
  678. }
  679. }
  680. }
  681. }
  682. .discounted-ditail {
  683. padding: 52rpx 8rpx 0;
  684. .row {
  685. display: flex;
  686. justify-content: space-between;
  687. align-items: center;
  688. padding: 12rpx 0;
  689. text {
  690. font-size: 30rpx;
  691. color: #333333;
  692. &.red {
  693. color: #f94b4b;
  694. }
  695. }
  696. &.total {
  697. font-size: 30rpx;
  698. font-weight: 600;
  699. }
  700. }
  701. .tip {
  702. padding: 12rpx 0;
  703. font-size: 26rpx;
  704. color: #999999;
  705. }
  706. }
  707. .empty {
  708. height: 80vh;
  709. }
  710. }
  711. </style>