newcomerTasks.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view class="content">
  3. <image class="w h-454" src="/static/image/index/new_task_cover.png"></image>
  4. <view class="box">
  5. <view class="box-content">
  6. <view class="text-32 text-600 text-070202 top_c">
  7. 做任务得奖励
  8. <image class="under_line" src="/static/image/index/task_text_underline.png"></image>
  9. </view>
  10. <view class="item flex jc_between" v-for="(item,index) in list">
  11. <view class="left_c ">
  12. <view class="title">
  13. {{ index+1 }}、{{ item.title }}({{item.current}}/{{item.total}})
  14. </view>
  15. <view class="amount">
  16. 现金奖励{{ item.amount }}元
  17. </view>
  18. </view>
  19. <view :class="item.current == item.total? 'disabled_btn btn' : 'btn'"
  20. @click="goFinish(item)">
  21. {{ item.current == item.total?'已完成':'去完成' }}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. list:[
  33. {
  34. title:'完成两个悬赏任务',
  35. amount:'0.5',
  36. current:2,
  37. total:2,
  38. },
  39. {
  40. title:'完成3个金额大于3元的悬赏',
  41. amount:'0.5',
  42. current:0,
  43. total:3,
  44. },
  45. {
  46. title:'分享平台',
  47. amount:'0.1',
  48. current:0,
  49. total:3,
  50. },
  51. {
  52. title:'邀请好友',
  53. amount:'1',
  54. current:0,
  55. total:5,
  56. },
  57. ]
  58. }
  59. },
  60. onLoad() {
  61. },
  62. methods: {
  63. goFinish(item){
  64. if(item.current != item.total){
  65. // 功能页 、分享
  66. uni.navigateTo({
  67. url:'/pages/index/taskDetails'
  68. })
  69. }else{
  70. uni.showToast({
  71. title:'任务已完成',
  72. icon:'none'
  73. })
  74. }
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. .box{
  81. padding: 0 32rpx;
  82. position: absolute;
  83. margin-top: -94rpx;
  84. z-index: 2;
  85. .box-content{
  86. width: 686rpx;
  87. background-color: #fff;
  88. border-radius: 24rpx;
  89. box-shadow: 0 0 88rpx 0 #00000014;
  90. padding: 28rpx 32rpx;
  91. .top_c{
  92. border-bottom: 1px dashed #afb0b2ff;
  93. padding-bottom:8rpx;
  94. .under_line{
  95. width: 166rpx;
  96. height: 24rpx;
  97. margin-top: -4rpx;
  98. margin-left: 12rpx;
  99. }
  100. }
  101. .item{
  102. padding: 26rpx 8rpx;
  103. border-bottom:1rpx solid #eee;
  104. align-items: center;
  105. .left_c{
  106. .title{
  107. color: #303030;
  108. font-family: "MiSans VF";
  109. font-size: 28rpx;
  110. font-style: normal;
  111. font-weight: 500;
  112. line-height: normal;
  113. }
  114. .amount{
  115. color: #e02e24;
  116. font-family: "MiSans VF";
  117. font-size: 24rpx;
  118. font-style: normal;
  119. font-weight: 400;
  120. line-height: normal;
  121. margin-left: 46rpx;
  122. }
  123. }
  124. .btn{
  125. width: 116rpx;
  126. height: 52rpx;
  127. line-height: 52rpx;
  128. text-align: center;
  129. flex-shrink: 0;
  130. border-radius: 52rpx;
  131. background: #FE6505;
  132. color: #fff;
  133. font-size: 24rpx;
  134. }
  135. .disabled_btn{
  136. background: #FED0B4;
  137. }
  138. }
  139. }
  140. }
  141. </style>