bountyItem.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <view class="bounty" @click="goDetail">
  3. <view class="head">
  4. <image class="image" src="/static/image/index/default_avatar.png" mode="scaleToFill" />
  5. </view>
  6. <view class="middle"></view>
  7. <view class="main">
  8. <view class="top_title">
  9. <view class="bounty_title">
  10. <view class="text-32 text-500 text-070602 text">
  11. 这是一条悬赏任务悬赏任务
  12. </view>
  13. <view class="flex ai_center tips" v-if="showTags">
  14. <view class="tip_item top_color">顶</view>
  15. <view class="tip_item quick_color">快审</view>
  16. <view class="tip_item hot_color">热</view>
  17. <view class="tip_item new_color">新</view>
  18. </view>
  19. </view>
  20. <view class="price text-32 text-600 text-DD3D3D">+3.02元</view>
  21. </view>
  22. <view class="flex jc_between mgt-16">
  23. <view class="flex ai_center text-24 text-400 text-7E7E7E">
  24. <view>671已赚</view>
  25. <view class="line"></view>
  26. <view>剩余21个</view>
  27. </view>
  28. <view class="text-24 text-400 text-7E7E7E">支持设备:苹果</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. props:{
  36. showTags:{
  37. type:Boolean,
  38. default:true
  39. },
  40. info:{
  41. type:Object,
  42. defalut:{},// 后续接收单条详情
  43. }
  44. },
  45. data() {
  46. return {};
  47. },
  48. onLoad() {},
  49. methods: {
  50. goDetail(){
  51. uni.navigateTo({
  52. url:'/pages/index/taskDetails'
  53. })
  54. }
  55. },
  56. };
  57. </script>
  58. <style scoped lang="scss">
  59. .bounty {
  60. width: 100%;
  61. height: 160rpx;
  62. display: flex;
  63. align-items: center;
  64. border-bottom: 2rpx solid #F7F7F7;
  65. .head {
  66. display: flex;
  67. .image {
  68. width: 96rpx;
  69. height: 96rpx;
  70. border-radius: 50%;
  71. }
  72. }
  73. .middle {
  74. width: 8rpx;
  75. height: 100%;
  76. }
  77. .main {
  78. flex: 1;
  79. height: 100%;
  80. display: flex;
  81. flex-direction: column;
  82. justify-content: center;
  83. .top_title {
  84. display: flex;
  85. align-items: center;
  86. .bounty_title {
  87. flex: 1;
  88. display: flex;
  89. align-items: center;
  90. .text {
  91. flex: 1;
  92. width: 0;
  93. overflow: hidden;
  94. white-space: nowrap;
  95. text-overflow: ellipsis;
  96. }
  97. .tips {
  98. width: 210rpx;
  99. display: flex;
  100. justify-content: space-between;
  101. .tip_item {
  102. display: flex;
  103. padding: 4rpx 8rpx;
  104. justify-content: center;
  105. align-items: center;
  106. border-radius: 0 6rpx 6rpx 6rpx;
  107. font-size: 24rpx;
  108. font-weight: 400;
  109. color: #fff;
  110. }
  111. }
  112. }
  113. .price {
  114. margin-left: 30rpx;
  115. text-align: end;
  116. }
  117. }
  118. }
  119. }
  120. .line {
  121. height: 80%;
  122. width: 1rpx;
  123. margin: 0 16rpx;
  124. background-color: #dadada;
  125. }
  126. .top_color {
  127. border: 1rpx solid #ffce31;
  128. background: #ffce31;
  129. }
  130. .quick_color {
  131. border: 1rpx solid #6b6df7;
  132. background: #6b6df7;
  133. }
  134. .hot_color {
  135. border: 1rpx solid #e02e24;
  136. background: #e02e24;
  137. }
  138. .new_color {
  139. border: 1rpx solid #fe6505;
  140. background: #fe6505;
  141. }
  142. </style>