index.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <view class="container page-bg">
  3. <view class="header-container">
  4. <navigator url="/pages/login/login">
  5. <view class="user-info">
  6. <uni-icons type="person" size="30" color="#FFFFFF"></uni-icons>
  7. </view>
  8. </navigator>
  9. </view>
  10. <view class="settle-container">
  11. <view class="settle-text-container">
  12. <view class="settle-title">待领取奖励数</view>
  13. <view class="settle-num">3</view>
  14. </view>
  15. <view class="settle-btn">领取</view>
  16. </view>
  17. <view class="task-container">
  18. <view class="task-header">
  19. <view class="task-title">任务(3个)</view>
  20. <view class="task-add-btn">
  21. <navigator url="/pages/detail/detail">
  22. <uni-icons type="plusempty" size="30" color="#406CE7"></uni-icons>
  23. </navigator>
  24. </view>
  25. </view>
  26. <view class="task-item" v-for="item in 10">
  27. <view class="item-header">
  28. <view class="item-title">锻炼身体</view>
  29. <navigator url="/pages/detail/detail">
  30. <uni-icons class="item-icon" type="settings" size="30" color="#C4C4C4"></uni-icons>
  31. </navigator>
  32. <view class="item-tag-container">
  33. <view class="item-tag">全勤奖励</view>
  34. <view class="item-tag">周末双倍</view>
  35. </view>
  36. <view class="item-btn">完成</view>
  37. </view>
  38. <view class="item-detail-list">
  39. <view class="item-detail">
  40. <view class="detail-text">11月20日</view>
  41. <view class="detail-box"></view>
  42. </view>
  43. <view class="item-detail">
  44. <view class="detail-text">11月21日</view>
  45. <view class="detail-box"></view>
  46. </view>
  47. <view class="item-detail">
  48. <view class="detail-text">11月22日</view>
  49. <view class="detail-box"></view>
  50. </view>
  51. <view class="item-detail">
  52. <view class="detail-text">11月22日</view>
  53. <view class="detail-box"></view>
  54. </view>
  55. <view class="item-detail">
  56. <view class="detail-text">11月22日</view>
  57. <view class="detail-box"></view>
  58. </view>
  59. <view class="item-detail">
  60. <view class="detail-text">11月22日</view>
  61. <view class="detail-box"></view>
  62. </view>
  63. <view class="item-detail">
  64. <view class="detail-text">11月22日</view>
  65. <view class="detail-box"></view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script setup>
  73. </script>
  74. <style lang="scss" scoped>
  75. .container {
  76. width: 100vw;
  77. height: 100vh;
  78. padding: 16rpx;
  79. .header-container {
  80. position: relative;
  81. height: 83rpx;
  82. .user-info {
  83. width: 83rpx;
  84. height: 83rpx;
  85. display: flex;
  86. justify-content: center; /* 水平居中 */
  87. align-items: center; /* 垂直居中 */
  88. position: absolute;
  89. right: 0rpx;
  90. top: 0rpx;
  91. border-radius: 50%;
  92. background: rgba(210, 239, 243, 1);
  93. }
  94. }
  95. .settle-container {
  96. margin-top: 16rpx;
  97. height: 228rpx;
  98. position: relative;
  99. border-radius: 20rpx;
  100. background: rgba(64, 108, 231, 1);
  101. box-shadow: 1rpx 2rpx 4rpx rgba(0, 0, 0, 0.25);
  102. .settle-text-container {
  103. position: absolute;
  104. left: 108rpx;
  105. top: 20rpx;
  106. .settle-title {
  107. font-size: 24rpx;
  108. line-height: 34.75rpx;
  109. color: rgba(255, 255, 255, 1);
  110. }
  111. .settle-num {
  112. font-size: 100rpx;
  113. font-weight: 700;
  114. line-height: 144.8rpx;
  115. color: rgba(255, 255, 255, 1);
  116. display: flex;
  117. justify-content: center; /* 水平居中 */
  118. align-items: center; /* 垂直居中 */
  119. }
  120. }
  121. .settle-btn {
  122. position: absolute;
  123. left: 503rpx;
  124. top: 76rpx;
  125. width: 164rpx;
  126. height: 99rpx;
  127. border-radius: 40rpx;
  128. background: rgba(242, 247, 255, 1);
  129. font-size: 48rpx;
  130. font-weight: 700;
  131. line-height: 69.5px;
  132. color: rgba(64, 108, 231, 1);
  133. display: flex;
  134. justify-content: center; /* 水平居中 */
  135. align-items: center; /* 垂直居中 */
  136. }
  137. }
  138. .task-container {
  139. margin-top: 16rpx;
  140. .task-header {
  141. position: relative;
  142. height: 80rpx;
  143. display: flex;
  144. justify-content: center; /* 水平居中 */
  145. align-items: center; /* 垂直居中 */
  146. .task-title {
  147. position: absolute;
  148. left: 0rpx;
  149. font-size: 30rpx;
  150. font-weight: 400;
  151. line-height: 43.44rpx;
  152. color: rgba(0, 0, 0, 1);
  153. }
  154. .task-add-btn {
  155. display: inline-flex;
  156. justify-content: center;
  157. align-items: center;
  158. position: absolute;
  159. right: 0rpx;
  160. width: 60rpx;
  161. height: 60rpx;
  162. border-radius: 10rpx;
  163. border: 3px solid rgba(64, 108, 231, 1);
  164. }
  165. }
  166. .task-item {
  167. margin-top: 16rpx;
  168. width: 100%;
  169. height: 201rpx;
  170. border-radius: 20px;
  171. background: #FFFFFF;
  172. box-shadow: 1px 2px 4px #000000;
  173. box-sizing: border-box;
  174. padding: 16rpx;
  175. .item-header {
  176. position: relative;
  177. display: flex;
  178. align-items: center;
  179. .item-title {
  180. display: inline-block;
  181. // margin-left: 20rpx;
  182. font-size: 36rpx;
  183. font-weight: 400;
  184. letter-spacing: 0rpx;
  185. line-height: 52.13rpx;
  186. color: rgba(0, 0, 0, 1);
  187. }
  188. .item-icon {
  189. margin-left: 10rpx;
  190. }
  191. .item-tag-container {
  192. display: inline-block;
  193. margin-left: 10rpx;
  194. .item-tag:not(:first-child) {
  195. margin-left: 10rpx;
  196. }
  197. .item-tag {
  198. display: inline-block;
  199. background-color: #F2F7FF;
  200. padding: 10rpx;
  201. border-radius: 40rpx;
  202. background: #F2F7FF;
  203. font-size: 16rpx;
  204. font-weight: 400;
  205. line-height: 23.17rpx;
  206. color: rgba(0, 0, 0, 1);
  207. text-align: center;
  208. vertical-align: top;
  209. }
  210. }
  211. .item-btn {
  212. display: inline-flex;
  213. position: absolute;
  214. right: 0rpx;
  215. width: 123rpx;
  216. height: 42rpx;
  217. border-radius: 30rpx;
  218. border: 1rpx solid #2A82E4;
  219. justify-content: center;
  220. align-items: center;
  221. font-size: 20rpx;
  222. font-weight: 400;
  223. line-height: 28.96px;
  224. color: rgba(64, 108, 231, 1);
  225. }
  226. }
  227. .item-detail-list {
  228. margin-top: 16rpx;
  229. display: grid;
  230. grid-template-columns: repeat(7, 1fr);
  231. .item-detail {
  232. display: flex;
  233. flex-direction: column;
  234. justify-content: center;
  235. align-items: center;
  236. .detail-text {
  237. font-size: 20rpx;
  238. font-weight: 400;
  239. letter-spacing: 0rpx;
  240. line-height: 28.96rpx;
  241. color: rgba(0, 0, 0, 1);
  242. }
  243. .detail-box {
  244. // display: block;
  245. width: 42rpx;
  246. height: 42rpx;
  247. margin-top: 5rpx;
  248. border: 5rpx solid #000000;
  249. }
  250. }
  251. }
  252. }
  253. }
  254. }
  255. </style>