hongbao.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view>
  3. <view class="empty" v-if="moneylist == ''">
  4. <view
  5. style="display: block; width: 90%; margin: 0 auto; position: fixed;top: 35%;left: 0rpx;right: 0rpx;text-align: center;">
  6. <image src="../../static/images/empty.png" style="width: 300rpx;height: 300rpx;"></image>
  7. <view style="color: #CCCCCC;">暂无内容</view>
  8. </view>
  9. </view>
  10. <view class="popup_money" v-else>
  11. <view class="data_select">
  12. <view class="money_box" v-for="(item,index) in moneylist" :key="index">
  13. <view class="box_tit">
  14. <view class="money_name">{{item.redPacketTitle}}</view>
  15. <view class="money_price">¥{{item.redPacketAmount}}</view>
  16. </view>
  17. <view class="money_data">有效期至{{item.expirationTime}}</view>
  18. <view class="money_line">
  19. <u-line direction="row" color="#E6E6E6" border-style="dashed" />
  20. </view>
  21. <view class="box_bottom">
  22. <view class="money_use">满{{item.minimumAmount}}元可使用</view>
  23. <!-- <view class="money_btn">
  24. <view class="lj_use">
  25. 立即使用
  26. </view>
  27. </view> -->
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. moneylist: ''
  39. }
  40. },
  41. onLoad() {
  42. this.hongbao()
  43. },
  44. methods: {
  45. //获取登录用户的所有红包
  46. hongbao() {
  47. this.$Request.getT('/app/tbindent/findAllRedPacket').then(res => {
  48. console.log(res)
  49. if (res.code === 0) {
  50. this.moneylist = res.data
  51. // console.log(this.hongbao)
  52. }
  53. });
  54. }
  55. },
  56. }
  57. </script>
  58. <style>
  59. body {
  60. background-color: #F5F5F5;
  61. }
  62. /* #ifndef MP-WEIXIN */
  63. page {
  64. background: #F2EDED;
  65. }
  66. /* #endif */
  67. .empty {
  68. width: 100%;
  69. background: #ffffff;
  70. /* #ifdef MP-WEIXIN */
  71. height: 93vh;
  72. /* #endif */
  73. /* #ifndef MP-WEIXIN */
  74. height: 100vh;
  75. /* #endif */
  76. }
  77. .popup_money {
  78. height: 800upx;
  79. width: 100%;
  80. position: relative;
  81. }
  82. .u-drawer-bottom {
  83. background-color: #FAF7F5 !important;
  84. }
  85. .money_box {
  86. width: 93%;
  87. margin: 0 auto;
  88. background: #ffffff;
  89. border-radius: 14upx;
  90. height: 220rpx;
  91. margin-bottom: 20upx;
  92. margin-top: 20rpx;
  93. }
  94. .box_tit {
  95. width: 90%;
  96. margin: 0 auto;
  97. height: 80upx;
  98. display: flex;
  99. }
  100. .money_name {
  101. flex: 1;
  102. display: flex;
  103. justify-content: left;
  104. align-items: center;
  105. font-size: 27rpx;
  106. font-weight: bold;
  107. letter-spacing: 2upx;
  108. }
  109. .money_price {
  110. flex: 1;
  111. display: flex;
  112. justify-content: flex-end;
  113. align-items: center;
  114. font-size: 39upx;
  115. /* font-weight: bold; */
  116. color: red;
  117. }
  118. .money_data {
  119. color: #999999;
  120. font-size: 24rpx;
  121. width: 90%;
  122. margin: 0 auto;
  123. margin-top: -8upx;
  124. }
  125. .u-line {
  126. width: 90% !important;
  127. border-bottom-width: 6upx !important;
  128. margin: 0 auto !important;
  129. margin-top: 22upx !important;
  130. margin-bottom: 22upx !important;
  131. }
  132. .box_bottom {
  133. width: 90%;
  134. margin: 0 auto;
  135. display: flex;
  136. height: 40upx;
  137. }
  138. .money_use {
  139. flex: 1;
  140. color: #999999;
  141. font-size: 24rpx;
  142. display: flex;
  143. justify-content: left;
  144. align-items: center;
  145. }
  146. .lj_use {
  147. width: 150rpx;
  148. border: 2rpx solid #FF7F00;
  149. color: #FF7F00;
  150. text-align: center;
  151. line-height: 48rpx;
  152. border-radius: 40rpx;
  153. font-size: 23rpx;
  154. }
  155. </style>