recycle.vue 3.1 KB

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