taskCompleteSuccess.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view class="container">
  3. <!-- 状态栏占位 -->
  4. <view class="status-bar" :style="{height: statusBarHeight}"></view>
  5. <!-- 顶部导航栏 -->
  6. <view class="header">
  7. <view class="back-btn" @click="goBack">
  8. <image src="@/static/image/back.png" mode="aspectFill"></image>
  9. </view>
  10. <view class="title">完成任务</view>
  11. <view class="header-right">
  12. <text class="more-icon">⋯</text>
  13. <text class="more-icon">○</text>
  14. </view>
  15. </view>
  16. <view class="content">
  17. <view class="success-content">
  18. <view class="success-icon-wrapper">
  19. <view class="success-icon">
  20. <text class="checkmark">✓</text>
  21. </view>
  22. <view class="success-ring ring1"></view>
  23. <view class="success-ring ring2"></view>
  24. <view class="decoration dot1"></view>
  25. <view class="decoration dot2"></view>
  26. <view class="decoration plus"></view>
  27. <view class="decoration dot3"></view>
  28. </view>
  29. <view class="success-text">任务已完成</view>
  30. </view>
  31. <view class="back-btn-large" @click="goBackToList">
  32. 返回任务列表
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px'
  42. }
  43. },
  44. methods: {
  45. goBack() {
  46. uni.navigateBack()
  47. },
  48. goBackToList() {
  49. uni.navigateBack({
  50. delta: 2
  51. })
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .container {
  58. min-height: 100vh;
  59. background: #fff;
  60. display: flex;
  61. flex-direction: column;
  62. }
  63. .status-bar {
  64. width: 100%;
  65. background: #fff;
  66. }
  67. .header {
  68. position: relative;
  69. height: 88rpx;
  70. display: flex;
  71. align-items: center;
  72. justify-content: center;
  73. background: #fff;
  74. border-bottom: 1rpx solid #f0f0f0;
  75. .back-btn {
  76. position: absolute;
  77. left: 24rpx;
  78. width: 40rpx;
  79. height: 40rpx;
  80. image {
  81. width: 100%;
  82. height: 100%;
  83. }
  84. }
  85. .title {
  86. font-size: 36rpx;
  87. font-weight: bold;
  88. color: #333;
  89. }
  90. .header-right {
  91. position: absolute;
  92. right: 24rpx;
  93. display: flex;
  94. align-items: center;
  95. gap: 16rpx;
  96. .more-icon {
  97. font-size: 32rpx;
  98. color: #333;
  99. }
  100. }
  101. }
  102. .content {
  103. flex: 1;
  104. display: flex;
  105. flex-direction: column;
  106. align-items: center;
  107. justify-content: center;
  108. padding: 48rpx;
  109. }
  110. .success-content {
  111. display: flex;
  112. flex-direction: column;
  113. align-items: center;
  114. margin-bottom: 80rpx;
  115. .success-icon-wrapper {
  116. position: relative;
  117. width: 200rpx;
  118. height: 200rpx;
  119. margin-bottom: 48rpx;
  120. .success-icon {
  121. position: absolute;
  122. top: 50%;
  123. left: 50%;
  124. transform: translate(-50%, -50%);
  125. width: 120rpx;
  126. height: 120rpx;
  127. background: #4CAF50;
  128. border-radius: 50%;
  129. display: flex;
  130. align-items: center;
  131. justify-content: center;
  132. z-index: 3;
  133. .checkmark {
  134. font-size: 80rpx;
  135. color: #fff;
  136. font-weight: bold;
  137. }
  138. }
  139. .success-ring {
  140. position: absolute;
  141. top: 50%;
  142. left: 50%;
  143. transform: translate(-50%, -50%);
  144. border-radius: 50%;
  145. border: 2rpx solid rgba(76, 175, 80, 0.3);
  146. &.ring1 {
  147. width: 160rpx;
  148. height: 160rpx;
  149. z-index: 2;
  150. }
  151. &.ring2 {
  152. width: 200rpx;
  153. height: 200rpx;
  154. z-index: 1;
  155. }
  156. }
  157. .decoration {
  158. position: absolute;
  159. &.dot1 {
  160. top: 20rpx;
  161. left: 20rpx;
  162. width: 12rpx;
  163. height: 12rpx;
  164. background: rgba(76, 175, 80, 0.3);
  165. border-radius: 50%;
  166. }
  167. &.dot2 {
  168. top: 30rpx;
  169. right: 40rpx;
  170. width: 8rpx;
  171. height: 8rpx;
  172. background: #FFC107;
  173. border-radius: 50%;
  174. }
  175. &.plus {
  176. top: 10rpx;
  177. right: 20rpx;
  178. width: 16rpx;
  179. height: 16rpx;
  180. color: rgba(76, 175, 80, 0.3);
  181. font-size: 16rpx;
  182. }
  183. &.dot3 {
  184. bottom: 30rpx;
  185. right: 30rpx;
  186. width: 8rpx;
  187. height: 8rpx;
  188. background: #FFC107;
  189. border-radius: 50%;
  190. }
  191. }
  192. }
  193. .success-text {
  194. font-size: 36rpx;
  195. font-weight: bold;
  196. color: #333;
  197. }
  198. }
  199. .back-btn-large {
  200. width: 100%;
  201. max-width: 600rpx;
  202. height: 88rpx;
  203. background: #388BFF;
  204. border-radius: 44rpx;
  205. display: flex;
  206. align-items: center;
  207. justify-content: center;
  208. font-size: 32rpx;
  209. color: #fff;
  210. font-weight: 500;
  211. }
  212. </style>