success.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="success-page">
  3. <u-navbar title="创建队伍" :autoBack="true" bgColor="#fff" leftIconColor="#333" titleStyle="font-weight:bold;"></u-navbar>
  4. <view class="success-content u-f u-f-jsb u-f-ac es-ver">
  5. <image src="/static/images/enter/activity/img_success.png" class="success-icon" mode="aspectFit"></image>
  6. <view class="title">队伍创建成功!</view>
  7. <view class="desc">赶紧分享队伍码,邀请队员加入吧</view>
  8. <view class="code-box u-f u-f-ac" @click="copyCode">
  9. <text class="label">队伍码:</text>
  10. <text class="code">{{teamCode}}</text>
  11. <image class="es-icon-32" src="/static/images/enter/activity/icon_copy.png" mode=""></image>
  12. </view>
  13. <view class="return-btn" @click="handleReturn">
  14. 返回
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. teamCode: 'zkzh202604021235'
  24. }
  25. },
  26. onLoad(options) {
  27. if (options.teamCode) {
  28. this.teamCode = options.teamCode;
  29. }
  30. },
  31. methods: {
  32. copyCode() {
  33. uni.setClipboardData({
  34. data: this.teamCode,
  35. success: () => {
  36. uni.showToast({title: '复制成功', icon: 'success'});
  37. }
  38. });
  39. },
  40. handleReturn() {
  41. uni.redirectTo({
  42. url: '/pages_enter/activity/detail'
  43. });
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .success-page {
  50. min-height: 100vh;
  51. background-color: #fff;
  52. padding: 40rpx;
  53. }
  54. .success-content {
  55. padding-top: 100rpx;
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. .success-icon {
  60. width: 240rpx;
  61. height: 240rpx;
  62. margin-bottom: 60rpx;
  63. }
  64. .title {
  65. font-size: 44rpx;
  66. font-weight: bold;
  67. color: #333;
  68. margin-bottom: 30rpx;
  69. }
  70. .desc {
  71. font-size: 32rpx;
  72. color: #666;
  73. margin-bottom: 60rpx;
  74. }
  75. .code-box {
  76. background-color: #f8f8f8;
  77. padding: 24rpx 40rpx;
  78. border-radius: 40rpx;
  79. margin-bottom: 120rpx;
  80. display: flex;
  81. align-items: center;
  82. .label {
  83. font-size: 32rpx;
  84. color: #666;
  85. }
  86. .code {
  87. font-size: 32rpx;
  88. color: #333;
  89. font-weight: bold;
  90. margin-right: 20rpx;
  91. }
  92. .copy-icon {
  93. margin-left: 10rpx;
  94. }
  95. }
  96. .return-btn {
  97. width: 500rpx;
  98. height: 100rpx;
  99. border: 2rpx solid #D9D9D9;
  100. border-radius: 50rpx;
  101. color: #666;
  102. font-size: 32rpx;
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. &:active {
  107. background-color: #f8f8f8;
  108. }
  109. }
  110. }
  111. </style>