index.vue 5.0 KB

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