index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="success-container">
  3. <!-- 成功图标 -->
  4. <view class="success-icon">
  5. <view class="check-mark"></view>
  6. </view>
  7. <!-- 成功提示文字 -->
  8. <view class="success-text">
  9. <view class="title">绑定成功</view>
  10. <view class="desc">您的账号已完成绑定,可正常使用相关功能</view>
  11. </view>
  12. <!-- 操作按钮 -->
  13. <!-- <view class="btn-group">
  14. <button class="btn home-btn" @click="handleClose">关闭</button>
  15. </view> -->
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {};
  22. },
  23. methods: {
  24. // 前往首页(可替换为你的首页地址)
  25. handleClose() {
  26. window.close();
  27. }
  28. }
  29. };
  30. </script>
  31. <style lang="scss" scoped>
  32. /* 页面容器:全屏居中 */
  33. .success-container {
  34. width: 100vw;
  35. min-height: 100vh;
  36. padding: 0 20px;
  37. box-sizing: border-box;
  38. display: flex;
  39. flex-direction: column;
  40. align-items: center;
  41. justify-content: center;
  42. background-color: #f8f9fa;
  43. }
  44. /* 成功图标:绿色圆形+对勾 */
  45. .success-icon {
  46. width: 100px;
  47. height: 100px;
  48. border-radius: 50%;
  49. background-color: #e6f4ea;
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. margin-bottom: 30px;
  54. .check-mark {
  55. width: 16px;
  56. height: 30px;
  57. border-right: 4px solid #38a169;
  58. border-bottom: 4px solid #38a169;
  59. transform: rotate(45deg);
  60. }
  61. }
  62. /* 文字区域:标题粗体+描述浅灰 */
  63. .success-text {
  64. text-align: center;
  65. margin-bottom: 40px;
  66. .title {
  67. font-size: 24px;
  68. font-weight: 600;
  69. color: #2d3748;
  70. margin-bottom: 10px;
  71. }
  72. .desc {
  73. font-size: 16px;
  74. color: #718096;
  75. max-width: 300px;
  76. margin: 0 auto;
  77. }
  78. }
  79. /* 按钮组:横向排列+间距 */
  80. .btn-group {
  81. width: 100%;
  82. max-width: 320px;
  83. display: flex;
  84. gap: 15px;
  85. }
  86. /* 按钮样式:绿色主按钮+白色次按钮 */
  87. .btn {
  88. flex: 1;
  89. height: 46px;
  90. border-radius: 8px;
  91. font-size: 16px;
  92. font-weight: 500;
  93. border: none;
  94. cursor: pointer;
  95. transition: opacity 0.2s;
  96. }
  97. .btn:hover {
  98. opacity: 0.9;
  99. }
  100. /* 次要按钮(返回):白色边框+浅灰文字 */
  101. .back-btn {
  102. background-color: #fff;
  103. color: #2d3748;
  104. border: 1px solid #e2e8f0;
  105. }
  106. /* 主要按钮(首页):绿色背景+白色文字 */
  107. .home-btn {
  108. background-color: #38a169;
  109. color: #fff;
  110. }
  111. </style>