recycle.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <uni-popup ref="recycle" :mask-click="false">
  3. <view class="recycle">
  4. <view class="recycle_close" @click="$refs.recycle.close()"><image src="/static/image/publice/guanbi@2x.png" mode=""></image></view>
  5. <view class="recycle_head">提示</view>
  6. <view class="recycle_price center">
  7. <text>¥{{ recycleMessage.amount }}</text>
  8. <text>退款金币</text>
  9. </view>
  10. <scroll-view class="scrolllist" scroll-y="true">
  11. <view class="recycle_ul">
  12. <view class="recycle_ul_li flex" v-for="(item, index) in recycleMessage.goods_info" :key="index">
  13. <view class="recycle_ul_li_txt">{{ item.name }}</view>
  14. <view class="recycle_ul_li_r flexs">
  15. <text>¥{{ item.price }}</text>
  16. <text>x{{ item.num }}</text>
  17. </view>
  18. </view>
  19. </view>
  20. </scroll-view>
  21. <view class="recycle_txt">退款规则:平台统一回收折扣10,回收金币直接放【我的】 - 【余额】</view>
  22. <view class="sure" @click="$refs.recycle.close()">确定</view>
  23. </view>
  24. </uni-popup>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'recycle',
  29. data() {
  30. return {
  31. recycleMessage: {}
  32. };
  33. },
  34. methods: {
  35. //抽奖结束点击回收触发
  36. recycle(prizeInfo) {
  37. let ids = [];
  38. prizeInfo.forEach(item => {
  39. ids.push(item.prize_id);
  40. });
  41. this.$api.exchange({ record_ids: ids.join(',') }).then(res => {
  42. if (res.code === 1) {
  43. this.recycleMessage = res.data;
  44. this.$refs.recycle.open();
  45. }
  46. });
  47. },
  48. //打开回收结果窗口
  49. open(recycleMessage) {
  50. this.recycleMessage = recycleMessage;
  51. this.$refs.recycle.open();
  52. }
  53. }
  54. };
  55. </script>
  56. <style lang="scss">
  57. .sure {
  58. padding: 10rpx 20rpx;
  59. border-radius: 30rpx;
  60. font-size: 26rpx;
  61. background: -webkit-linear-gradient(0deg, #89f7fe 0%, #66a6ff 100%);
  62. color: #fff;
  63. width: 200rpx;
  64. text-align: center;
  65. margin: 0 auto;
  66. margin-top: 40rpx;
  67. }
  68. .recycle {
  69. .sure {
  70. padding: 10rpx 20rpx;
  71. border-radius: 30rpx;
  72. font-size: 26rpx;
  73. background: -webkit-linear-gradient(0deg, #89f7fe 0%, #66a6ff 100%);
  74. color: #fff;
  75. width: 200rpx;
  76. text-align: center;
  77. margin: 0 auto;
  78. margin-top: 40rpx;
  79. }
  80. width: 640rpx;
  81. padding-bottom: 95rpx;
  82. position: relative;
  83. background: #ffffff;
  84. box-shadow: 0rpx -5rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
  85. border-radius: 30rpx;
  86. .recycle_close {
  87. top: 20rpx;
  88. right: 30rpx;
  89. width: 44rpx;
  90. height: 44rpx;
  91. position: absolute;
  92. }
  93. .recycle_head {
  94. height: 100rpx;
  95. text-align: center;
  96. line-height: 100rpx;
  97. font-size: 32rpx;
  98. font-weight: bold;
  99. border-bottom: 2rpx solid #e9e9e9;
  100. }
  101. .recycle_price {
  102. margin: 40rpx 0 0rpx 0;
  103. flex-direction: column;
  104. text {
  105. color: #fa7e48;
  106. font-size: 36rpx;
  107. font-weight: bold;
  108. &:last-child {
  109. color: #333333;
  110. margin-top: 10rpx;
  111. font-size: 26rpx;
  112. }
  113. }
  114. }
  115. .scrolllist {
  116. max-height: 500rpx;
  117. }
  118. .recycle_ul {
  119. padding: 0 30rpx;
  120. margin: 50rpx 0;
  121. }
  122. .recycle_ul_li {
  123. margin-bottom: 30rpx;
  124. &:last-child {
  125. margin-bottom: 0;
  126. }
  127. .recycle_ul_li_txt {
  128. color: #999999;
  129. font-size: 26rpx;
  130. }
  131. .recycle_ul_li_r {
  132. text {
  133. color: #999999;
  134. font-size: 26rpx;
  135. &:last-child {
  136. width: 80rpx;
  137. text-align: right;
  138. color: #fa7e48;
  139. font-size: 30rpx;
  140. }
  141. }
  142. }
  143. }
  144. .recycle_txt {
  145. padding: 0 30rpx;
  146. color: #999999;
  147. font-size: 26rpx;
  148. }
  149. }
  150. </style>