detail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view>
  3. <view class="top">
  4. <view class="blessing">
  5. {{packet.description}}
  6. </view>
  7. <view class="money">
  8. {{packet.robMoney}}
  9. </view>
  10. <view class="face" :style="{'border-radius':radius}">
  11. <image :src="packet.userAvatar"></image>
  12. </view>
  13. <view class="desc">
  14. {{packet.userName}}的红包
  15. </view>
  16. <view class="username">
  17. 恭喜发财,大吉大利
  18. </view>
  19. </view>
  20. <view class="info">
  21. 已领 {{packet.number-packet.surplusNumber}}个,共{{packet.number}} 个
  22. </view>
  23. <view class="list">
  24. <view class="row" v-for="(row,index) in packet.Records" :key="index">
  25. <view class="left">
  26. <image :src="row.userAvatar"></image>
  27. </view>
  28. <view class="right">
  29. <view class="r1">
  30. <view class="username">
  31. {{row.userName}}
  32. </view>
  33. <view class="money">
  34. {{row.money}}元
  35. </view>
  36. </view>
  37. <view class="r2">
  38. <view class="time">
  39. {{row.lastUpdateTime}}
  40. </view>
  41. <view class="lucky" v-if="row.isLucky">
  42. 手气王
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. //动画效果
  55. radius:'100% 100% 0 0',
  56. $url:''
  57. };
  58. },
  59. onShow() {
  60. },
  61. onPageScroll(e) {
  62. //e.scrollTop;
  63. if(e.scrollTop>100){return;}
  64. let radiusTmp = 100 - e.scrollTop;
  65. this.radius = radiusTmp+'% '+radiusTmp+'% 0 0';
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. view{
  71. display: flex;
  72. flex-wrap: wrap;
  73. background-color: #fff;
  74. }
  75. .top{
  76. width: 100%;
  77. background-color: #EC624F;
  78. flex-wrap: wrap;
  79. .blessing,.money{
  80. width: 100%;
  81. color: #f8d757;
  82. padding: 20upx 0;
  83. justify-content: center;
  84. font-size: 34upx;
  85. background: #EC624F;
  86. }
  87. .money{
  88. font-size: 100upx;
  89. }
  90. .face{
  91. background-color: #fff;
  92. justify-content: center;
  93. width: 100%;
  94. height: 130upx;
  95. margin-top: 65upx;
  96. border-radius: 100% 100% 0 0;
  97. transition: border-radius .15s;
  98. image{
  99. width: 130upx;
  100. height: 130upx;
  101. border-radius: 100%;
  102. margin-top: -65upx;
  103. }
  104. }
  105. .username{
  106. width: 100%;
  107. justify-content: center;
  108. background-color: #fff;
  109. font-size: 16rpx;
  110. padding-bottom: 60rpx;
  111. }
  112. .desc{
  113. width: 100%;
  114. justify-content: center;
  115. background-color: #fff;
  116. font-size: 32rpx;
  117. font-weight: 600;
  118. padding-bottom: 30rpx;
  119. }
  120. }
  121. .info{
  122. width: 100%;
  123. height: 100upx;
  124. line-height: 100upx;
  125. padding-left: 4%;
  126. font-size: 28upx;
  127. color: #999;
  128. border-bottom: 2rpx solid #ededee;
  129. }
  130. .list{
  131. width: 100%;
  132. .row{
  133. width: 92%;
  134. padding: 0 4%;
  135. height: 120upx;
  136. border-bottom: solid 1upx #ececec;
  137. justify-content:flex-start;
  138. flex-wrap: nowrap;
  139. .left{
  140. flex-shrink: 0;
  141. width: 100upx;
  142. height: 110upx;
  143. justify-content: flex-start;
  144. align-items: center;
  145. image{
  146. width: 80upx;
  147. height: 80upx;
  148. border-radius: 100%;
  149. }
  150. }
  151. .right{
  152. width: 100%;
  153. height: 100upx;
  154. .r1{
  155. width: 100%;
  156. height: 70upx;
  157. justify-content: space-between;
  158. align-items: center;
  159. font-size: 34upx;
  160. .username{
  161. font-weight: 600;
  162. }
  163. }
  164. .r2{
  165. width: 100%;
  166. height: 30upx;
  167. justify-content: space-between;
  168. font-size: 26upx;
  169. .time{
  170. color: #8F8F94;
  171. }
  172. .lucky{
  173. padding: 3upx 8upx;
  174. border-radius: 5upx;
  175. background-color: #F8D757;
  176. align-items: center;
  177. height: 30upx;
  178. font-size: 24upx;
  179. color: #CF3C35;
  180. }
  181. }
  182. }
  183. }
  184. }
  185. </style>