cm-goods-activity-popup.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="goods-activity-popup">
  3. <uni-popup ref="activitypPopup" type="bottom">
  4. <view class="activity-price" :style="{ paddingBottom: safeArea ? 0 : '32rpx' }">
  5. <view class="close iconfont icon-iconfontguanbi" @click="close"></view>
  6. <view class="popup-content">
  7. <view class="row th">
  8. <view class="label">购买数</view>
  9. <view class="content">价格(元)</view>
  10. </view>
  11. <view class="row" v-for="(item, index) in ladderList" :key="index">
  12. <view class="label">{{ item.buyNum }}</view>
  13. <view class="content">{{ item.buyPrice | priceFormat }}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </uni-popup>
  18. </view>
  19. </template>
  20. <script>
  21. import { mapGetters } from 'vuex'
  22. export default {
  23. name: 'goods-activity-popup',
  24. props: {
  25. ladderList: {
  26. type: Array,
  27. default: () => []
  28. }
  29. },
  30. computed: {
  31. ...mapGetters(['safeArea'])
  32. },
  33. methods: {
  34. open() {
  35. this.$refs.activitypPopup.open()
  36. this.$emit('open')
  37. },
  38. close() {
  39. this.$refs.activitypPopup.close()
  40. this.$emit('close')
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .activity-price {
  47. padding: 32rpx;
  48. padding-top: 64rpx;
  49. position: relative;
  50. background-color: #fff;
  51. border-radius: 16rpx 16rpx 0 0;
  52. &::after {
  53. position: absolute;
  54. content: '';
  55. width: 100%;
  56. height: 80rpx;
  57. left: 0;
  58. bottom: -80rpx;
  59. background-color: #fff;
  60. }
  61. .close {
  62. position: absolute;
  63. right: 24rpx;
  64. top: 24rpx;
  65. color: #999;
  66. font-size: 32rpx;
  67. }
  68. .popup-content {
  69. padding: 24rpx 0;
  70. }
  71. .row {
  72. @extend .cm-flex-between;
  73. color: #333333;
  74. text-align: center;
  75. border-top: 1rpx solid;
  76. border-left: 1rpx solid;
  77. border-right: 1rpx solid;
  78. border-color: #e1e1e1;
  79. &:last-child {
  80. border-bottom: 1rpx solid #e1e1e1;
  81. }
  82. &.th {
  83. font-size: 32rpx;
  84. }
  85. .label {
  86. flex: 1;
  87. font-size: 26rpx;
  88. padding: 24rpx 8rpx;
  89. border-right: 1rpx solid #e1e1e1;
  90. }
  91. .content {
  92. flex: 1;
  93. padding: 24rpx 8rpx;
  94. font-size: 26rpx;
  95. }
  96. }
  97. }
  98. </style>