index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="content pdx-30">
  3. <view @click="toPage('/pages/login/index')">
  4. 登录
  5. </view>
  6. <view @click="toPage('/pages/login/register')">
  7. 注册
  8. </view>
  9. <view @click="toPage('/pages/login/forget')">
  10. 忘记密码
  11. </view>
  12. <view class="w h-80 mgt-100" @click="toPage('/pages/index/search')">
  13. <view class="input flex ai_center jc_between">
  14. <view>任务标题、用户ID</view>
  15. <image class="w-40 h-40" src="/static/logo.png" mode="scaleToFill" />
  16. </view>
  17. </view>
  18. <view class="w h-300 mgy-20">
  19. <u-swiper :list="list6" @change="e => currentNum = e.current" :autoplay="false"
  20. indicatorStyle="right: 20px">
  21. <view slot="indicator" class="indicator-num">
  22. <text class="indicator-num__text">{{ currentNum + 1 }}/{{ list6.length }}</text>
  23. </view>
  24. </u-swiper>
  25. </view>
  26. <view class="w h-80 flex jc_between ai_center" @click="toPage('/pages/index/notice')">
  27. <view class="flex ai_center">
  28. <image class="w-40 h-40 mgr-30" src="/static/logo.png" mode="scaleToFill" />
  29. <view>我是公告</view>
  30. </view>
  31. <view>2025.1.1</view>
  32. </view>
  33. <view class="w flex mgt-20 jc_between text-24">
  34. <view class="flex fd_c ai_center" v-for="item in menu" :key="item.name" @click="toPage(item.pagePath)">
  35. <image class="w-60 h-60" :src="item.icon" mode="scaleToFill" />
  36. <view class="mgt-10">{{ item.name }}</view>
  37. </view>
  38. </view>
  39. <view class="w h-200 bg-444 text-white mgy-20" @click="toPage('/pages/index/newcomerTasks')">新人任务</view>
  40. <view class="w">
  41. <view>推荐悬赏</view>
  42. <view class="w mgt-20">
  43. <scroll-view scroll-y>
  44. <view class="flex jc_between pdy-10" v-for="item in 5">
  45. <image class="w-60 h-60" src="/static/logo.png" mode="scaleToFill" />
  46. <view class="flex1 mgl-10">
  47. <view class="flex jc_between mgb-10">
  48. <view class="flex">
  49. <view>这是一条悬赏任务</view>
  50. <view class="flex">
  51. <view>顶</view>
  52. <view>快审</view>
  53. <view>热</view>
  54. <view>新</view>
  55. </view>
  56. </view>
  57. <view>+3.02元</view>
  58. </view>
  59. <view class="flex jc_between">
  60. <view class="flex">
  61. <view>671已赚</view>
  62. <view></view>
  63. <view>剩余21个</view>
  64. </view>
  65. <view>支持设备:苹果</view>
  66. </view>
  67. </view>
  68. </view>
  69. </scroll-view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. export default {
  76. data() {
  77. return {
  78. title: '首页',
  79. menu: [
  80. { icon: '/static/logo.png', name: '新手入门', pagePath: '/pages/index/gettingStarted' },
  81. { icon: '/static/logo.png', name: '热门悬赏', pagePath: '/pages/index/popularBounty' },
  82. { icon: '/static/logo.png', name: '最新悬赏', pagePath: '/pages/index/newestBounty' },
  83. { icon: '/static/logo.png', name: '急速快审', pagePath: '/pages/index/quickCheck' },
  84. { icon: '/static/logo.png', name: '邀请赚钱', pagePath: '/pages/index/inviteEarnMoney' },
  85. ],
  86. currentNum: 0,
  87. list6: [
  88. "https://uviewui.com/swiper/swiper2.png",
  89. "https://uviewui.com/swiper/swiper3.png",
  90. "https://uviewui.com/swiper/swiper1.png",
  91. ],
  92. }
  93. },
  94. onLoad() {
  95. },
  96. methods: {
  97. toPage(url) {
  98. uni.navigateTo({ url });
  99. }
  100. },
  101. }
  102. </script>
  103. <style>
  104. .content {
  105. height: calc(100vh - 120rpx);
  106. /* background-color: red; */
  107. display: flex;
  108. flex-direction: column;
  109. align-items: center;
  110. /* justify-content: center; */
  111. .input {
  112. width: 100%;
  113. height: 80rpx;
  114. background-color: rgb(233, 233, 233);
  115. padding: 10rpx 30rpx;
  116. border-radius: 40rpx;
  117. }
  118. }
  119. .indicator {
  120. @include flex(row);
  121. justify-content: center;
  122. &__dot {
  123. height: 6px;
  124. width: 6px;
  125. border-radius: 100px;
  126. background-color: rgba(255, 255, 255, 0.35);
  127. margin: 0 5px;
  128. transition: background-color 0.3s;
  129. &--active {
  130. background-color: #ffffff;
  131. }
  132. }
  133. }
  134. .indicator-num {
  135. padding: 2px 0;
  136. background-color: rgba(0, 0, 0, 0.35);
  137. border-radius: 100px;
  138. width: 35px;
  139. display: flex;
  140. justify-content: center;
  141. &__text {
  142. color: #ffffff;
  143. font-size: 12px;
  144. }
  145. }
  146. </style>