task.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="content">
  3. <page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
  4. <scroll-view scroll-y="true" class="scroll-content" :enhanced="true" :bounces="false" :show-scrollbar="false" @scroll="pageScroll">
  5. <view class="task-header">
  6. <cu-custom :bgColor="scrollHeight>20?'bg-bluev-head':'none'">
  7. <block slot="content">任务广场</block>
  8. </cu-custom>
  9. <view class="sub-name">任务多,变现快!</view>
  10. <view class="sub-logo" :style="style"><image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/task-star-small.png" mode="widthFix"></image></view>
  11. </view>
  12. <view class="task-content">
  13. <view class="home-search">
  14. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/search-icon.png" mode="widthFix"></image>
  15. <input type="text" class="search-input" placeholder="搜一搜最新任务" />
  16. </view>
  17. <view :class="scrollHeight<20?'task-status':'fixed-filter task-status'" :style="fixedStyle">
  18. <filterMain :data="filterData" @success="searchFilter"></filterMain>
  19. </view>
  20. <view class="star-task-list">
  21. <view class="task-item" v-for="(item,indx) in 10" :key="indx">
  22. <view class="item-body">
  23. <view class="item-img">
  24. <image src="https://p9-dy.byteimg.com/obj/ecom-shop-material/jpeg_m_e3fa80e91300b16e0df15e2bcbd8c003_sx_426270_www800-800" mode="aspectFill"></image>
  25. </view>
  26. <view class="item-info">
  27. <view class="title">【官方正品】金纺柔顺剂宝宝衣物适用0漂白剂抗静电蓬松不僵硬CW-星川任务-202</view>
  28. <view class="item-tags">
  29. <view class="tag-item">抖音</view>
  30. <view class="tag-item">手拍</view>
  31. <view class="tag-item">真人出境</view>
  32. </view>
  33. <view class="item-price">
  34. <view class="item-platform">抖音L1</view>
  35. <view class="price-txt"><text>¥</text>20.0w</view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="item-foot">
  40. <view class="item-join">
  41. <view class="cu-avatar-group">
  42. <view class="cu-avatar round sm" v-for="(item,index) in avatar" :key="index" :style="[{ backgroundImage:'url(' + avatar[index] + ')' }]"></view>
  43. </view>
  44. <view class="join-text"><text>180</text>/200人已参加</view>
  45. </view>
  46. <view class="foot-btn">
  47. <button class="btn disabled" :disabled="true">立即参加</button>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="star-task-more"></view>
  53. </view>
  54. </scroll-view>
  55. <halfLogin ref="loginCom"></halfLogin>
  56. </view>
  57. </template>
  58. <script>
  59. var app;
  60. import filterMain from "./filter";
  61. export default {
  62. components: {
  63. filterMain
  64. },
  65. data() {
  66. return {
  67. show:false,
  68. style:"",
  69. fixedStyle:"",
  70. scrollHeight:0,
  71. avatar: [
  72. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
  73. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big81005.jpg',
  74. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg',
  75. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big91012.jpg'
  76. ],
  77. filterData:[
  78. {
  79. "name":"任务状态",
  80. "children":[
  81. {
  82. "name":"全部",
  83. "hide":"任务状态",
  84. "index":0
  85. },
  86. {
  87. "name":"招募中",
  88. "hide":"招募中",
  89. "index":1
  90. },
  91. {
  92. "name":"已终止",
  93. "hide":"已终止",
  94. "index":2
  95. }
  96. ]
  97. },
  98. {
  99. "name":"平台等级",
  100. "children":[
  101. {
  102. "name":"全部",
  103. "hide":"平台等级",
  104. "index":0
  105. },
  106. {
  107. "name":"LV.1",
  108. "hide":"LV.1",
  109. "index":1
  110. },
  111. {
  112. "name":"LV.2",
  113. "hide":"LV.2",
  114. "index":2
  115. },
  116. {
  117. "name":"LV.3",
  118. "hide":"LV.3",
  119. "index":3
  120. },
  121. {
  122. "name":"LV.4",
  123. "hide":"LV.4",
  124. "index":4
  125. }
  126. ]
  127. },
  128. {
  129. "name":"任务奖励",
  130. "children":[
  131. {
  132. "name":"不限",
  133. "hide":"任务奖励",
  134. "index":0
  135. },
  136. {
  137. "name":"100以下",
  138. "hide":"100以下",
  139. "index":1
  140. },
  141. {
  142. "name":"100-500",
  143. "hide":"100-500",
  144. "index":2
  145. },
  146. {
  147. "name":"500以上",
  148. "hide":"以上",
  149. "index":3
  150. }
  151. ]
  152. },
  153. {
  154. "name":"排序方式",
  155. "children":[
  156. {
  157. "name":"不限",
  158. "hide":"排序方式",
  159. "index":0
  160. },
  161. {
  162. "name":"综合排序",
  163. "hide":"综合",
  164. "index":1
  165. },
  166. {
  167. "name":"奖励最高",
  168. "hide":"最高",
  169. "index":2
  170. },
  171. {
  172. "name":"奖励最低",
  173. "hide":"最低",
  174. "index":3
  175. },
  176. {
  177. "name":"最新发布",
  178. "hide":"最新",
  179. "index":4
  180. }
  181. ]
  182. }
  183. ]
  184. }
  185. },
  186. onLoad() {
  187. app = this;
  188. var StatusBar= this.StatusBar;
  189. var CustomBar= this.CustomBar;
  190. var style = `top:${StatusBar}px;`;
  191. app.style = style;
  192. app.fixedStyle = `top:${CustomBar}px;`;
  193. },
  194. methods: {
  195. pageScroll(event) {
  196. var scrollHeight = event.detail.scrollTop;
  197. app.scrollHeight = scrollHeight;
  198. if (scrollHeight > 20) {
  199. app.show = true;
  200. } else {
  201. app.show = false;
  202. }
  203. },
  204. searchFilter(){
  205. }
  206. }
  207. }
  208. </script>
  209. <style lang="scss">
  210. page{background-color: #f8f8f8;}
  211. .fixed-filter{position: fixed;background-image: linear-gradient(180deg, #f8f8f8 9%, #fff 100%);z-index: 999;padding: 10rpx 20rpx;right: 0;left: 0;}
  212. .task-header{position: relative;background-image: linear-gradient(180deg, #85DFFE 9%, #D5F4FF 62.55%, #f8f8f8 100%);height: 290rpx;}
  213. .task-header .sub-name{font-size: 32rpx;font-weight: 800;font-family: "bluevBold";padding-left: 20rpx;padding-top: 20rpx;}
  214. .task-header .sub-logo{
  215. position: absolute;
  216. top: 40rpx;
  217. /* #ifdef MP-WEIXIN */
  218. right: 220upx;
  219. /* #endif */
  220. /* #ifdef MP-ALIPAY */
  221. right: 150upx;
  222. /* #endif */
  223. }
  224. .task-header .sub-logo image{width: 220rpx;max-height: 220rpx;}
  225. .task-content{background-image: linear-gradient(180deg, #ffffff 1%, #f8f8f8 100%);border-radius: 40upx 40upx 0 0;padding: 20rpx;}
  226. .home-search-loading{margin: 20rpx;height: 68rpx;}
  227. .home-search{display: flex;align-items: center;background-color: rgba(246, 246, 246, 1);border-radius: 10rpx;height: 68rpx;padding: 0 20rpx;gap: 20rpx;}
  228. .home-search image{width: 32rpx;height: 32rpx;}
  229. .home-search .search-input{font-size: 24rpx;width: 100%;border: 0;height: 100%;box-sizing: none;box-shadow: none;}
  230. </style>