index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="content">
  3. <view class="top_bg pdx-32">
  4. <view class="w h-88 mgt-88" @click="$navTo('/pages/index/search')">
  5. <view class="input_box flex ai_center jc_between">
  6. <view class="text-32 text-400 text-C0C0C0">任务标题、用户ID</view>
  7. <image
  8. class="w-48 h-48"
  9. src="/static/image/index/search_icon.png"
  10. mode="scaleToFill"
  11. />
  12. </view>
  13. </view>
  14. </view>
  15. <view class="banner">
  16. <u-swiper
  17. :list="bannerList"
  18. @change="(e) => (currentNum = e.current)"
  19. :autoplay="true"
  20. :circular="true"
  21. indicatorStyle="right: 30rpx"
  22. >
  23. <view slot="indicator" class="indicator">
  24. <view v-for="(item, index) in bannerList.length" :key="item">
  25. <view v-if="currentNum === index" class="indicator_check"></view>
  26. <view v-else class="indicator_no_check"></view>
  27. </view>
  28. </view>
  29. </u-swiper>
  30. </view>
  31. <view
  32. class="w h-88 pdx-32 flex jc_between ai_center mgt-24"
  33. @click="$navTo('/pages/index/notice')"
  34. >
  35. <view class="flex ai_center">
  36. <image
  37. class="w-48 h-48"
  38. src="/static/image/index/affiche_icon.png"
  39. mode="scaleToFill"
  40. />
  41. <view class="mgl-24 text-32 text-500 text-070602">这是一条公告</view>
  42. </view>
  43. <view class="text-28 text-400 text-7E7E7E">2025.1.1</view>
  44. </view>
  45. <view class="affiche"></view>
  46. <view class="w h-196 pdx-32 flex mgt-24 jc_between ai_center text-24">
  47. <view
  48. class="flex fd_c ai_center"
  49. v-for="item in menu"
  50. :key="item.name"
  51. @click="$navTo(item.pagePath)"
  52. >
  53. <image class="w-96 h-96" :src="item.icon" mode="scaleToFill" />
  54. <view class="mgt-16 text-26 text-400 text-303030">{{ item.name }}</view>
  55. </view>
  56. </view>
  57. <view
  58. class="w h-224 pdx-32 text-white mgt-16"
  59. @click="$navTo('/pages/index/newcomerTasks')"
  60. >
  61. <image
  62. class="w h radio-24"
  63. src="/static/image/index/newbie_tasks.png"
  64. mode="scaleToFill"
  65. />
  66. </view>
  67. <view class="w flex1 pdx-32 mgt-16">
  68. <view class="h-72 text-32 text-500 text-070602 flex ai_center">
  69. 推荐悬赏
  70. </view>
  71. <view class="w flex1">
  72. <scroll-view scroll-y class="scroll">
  73. <view v-for="item in 10" :key="item" class="bounty">
  74. <BountyItem class="mgb-10"></BountyItem>
  75. </view>
  76. <view class="loading">上拉加载更多 ></view>
  77. </scroll-view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import BountyItem from "components/bountyItem.vue";
  84. export default {
  85. components: { BountyItem },
  86. data() {
  87. return {
  88. title: "首页",
  89. menu: [
  90. {
  91. icon: "/static/image/index/new_hand_icon.png",
  92. name: "新手入门",
  93. pagePath: "/pages/index/gettingStarted",
  94. },
  95. {
  96. icon: "/static/image/index/hot_bounty_icon.png",
  97. name: "热门悬赏",
  98. pagePath: "/pages/index/popularBounty",
  99. },
  100. {
  101. icon: "/static/image/index/newest_bounty_icon.png",
  102. name: "最新悬赏",
  103. pagePath: "/pages/index/newestBounty",
  104. },
  105. {
  106. icon: "/static/image/index/quick_check_icon.png",
  107. name: "急速快审",
  108. pagePath: "/pages/index/quickCheck",
  109. },
  110. {
  111. icon: "/static/image/index/invite_earnmoney_icon.png",
  112. name: "邀请赚钱",
  113. pagePath: "/pages/index/inviteEarnMoney",
  114. },
  115. ],
  116. currentNum: 0,
  117. bannerList: [
  118. "/static/image/index/newbie_tasks.png",
  119. "/static/image/index/newbie_tasks.png",
  120. "/static/image/index/newbie_tasks.png",
  121. ],
  122. };
  123. },
  124. onLoad() {},
  125. methods: {},
  126. };
  127. </script>
  128. <style lang="scss" scope>
  129. .content {
  130. // height: calc(100vh - 120rpx);
  131. /* background-color: red; */
  132. display: flex;
  133. flex-direction: column;
  134. align-items: center;
  135. /* justify-content: center; */
  136. .top_bg {
  137. width: 100%;
  138. height: 358rpx;
  139. flex-shrink: 0;
  140. /* background: linear-gradient(181deg, #ffffff00 39.21%, #fff 99.52%),
  141. linear-gradient(107deg, #fe6505 0%, #ff883d 106.14%); */
  142. background: linear-gradient(to bottom, #fe6505, #ffffff);
  143. .input_box {
  144. width: 100%;
  145. height: 88rpx;
  146. background-color: #fff;
  147. padding: 0 32rpx;
  148. border-radius: 40rpx;
  149. }
  150. }
  151. .banner {
  152. margin-top: -158rpx;
  153. padding: 0 32rpx;
  154. width: 100%;
  155. height: 272rpx;
  156. }
  157. }
  158. .affiche {
  159. width: 100%;
  160. height: 2rpx;
  161. background: linear-gradient(
  162. 90deg,
  163. #fe650500 0%,
  164. #fe65051a 46.15%,
  165. #fe650500 100%
  166. );
  167. }
  168. .scroll {
  169. flex: 1;
  170. // height: calc(100vh - 1250rpx);
  171. // height: 1010rpx;
  172. overflow: hidden;
  173. }
  174. .loading {
  175. text-align: center;
  176. margin-top: 50rpx;
  177. padding-bottom: 86rpx;
  178. font-size: 20rpx;
  179. font-weight: 400;
  180. color: #c0c0c0;
  181. }
  182. .indicator {
  183. /* @include flex(row);
  184. justify-content: center;
  185. &__dot {
  186. height: 6px;
  187. width: 6px;
  188. border-radius: 100px;
  189. background-color: rgba(255, 255, 255, 0.35);
  190. margin: 0 5px;
  191. transition: background-color 0.3s;
  192. &--active {
  193. background-color: #ffffff;
  194. }
  195. } */
  196. }
  197. .indicator {
  198. display: flex;
  199. .indicator_check {
  200. width: 32rpx;
  201. height: 8rpx;
  202. flex-shrink: 0;
  203. border-radius: 48rpx;
  204. background: #fff;
  205. margin: 0 2rpx;
  206. }
  207. .indicator_no_check {
  208. width: 16rpx;
  209. height: 8rpx;
  210. flex-shrink: 0;
  211. border-radius: 48rpx;
  212. background: #ffffff80;
  213. margin: 0 2rpx;
  214. }
  215. }
  216. </style>