taskCompleteSuccess.vue 4.1 KB

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