logout.uvue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view class="page-container">
  3. <!-- 头部 -->
  4. <view class="header">
  5. <view class="header-left" @click="goBack">
  6. <u-icon name="arrow-left" size="24" color="#333"/>
  7. </view>
  8. <view class="header-title">
  9. 注销账号
  10. </view>
  11. <view class="header-right"></view>
  12. </view>
  13. <!-- 内容区域 -->
  14. <view class="content">
  15. <!-- 提示信息 -->
  16. <view class="tip-text">
  17. 为保证你的账号安全,在你提交的注销申请生效前,需同时满足以下条件
  18. </view>
  19. <!-- 条件列表 -->
  20. <view class="conditions">
  21. <view class="condition-item">
  22. <text class="condition-number">1.</text>
  23. <view class="condition-content">
  24. <text class="condition-title">账号订单均已完成</text>
  25. <text class="condition-desc">本账号在平台交易的订单均已完成,若存在未完成的订单状态将无法注销。</text>
  26. </view>
  27. </view>
  28. <view class="condition-item">
  29. <text class="condition-number">2.</text>
  30. <view class="condition-content">
  31. <text class="condition-title">账号无任何纠纷</text>
  32. <text class="condition-desc">包括投诉举报,均已处理完结</text>
  33. </view>
  34. </view>
  35. <view class="condition-item">
  36. <text class="condition-number">3.</text>
  37. <view class="condition-content">
  38. <text class="condition-title">账号内的余额、资产自愿放弃</text>
  39. <text class="condition-desc">若注销平台将视为你自愿放弃账户的余额、资产。</text>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 确认注销按钮 -->
  44. <button class="logout-btn" :disabled="!agree" @click="confirmLogout">确认注销</button>
  45. <!-- 协议勾选 -->
  46. <view class="agreement">
  47. <checkbox :value="agree" @change="agree = !agree"></checkbox>
  48. <text class="agreement-text">我已同意阅读并同意《小丁到家注销协议》</text>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script setup lang="ts">
  54. import { ref } from 'vue';
  55. const agree = ref(false);
  56. const goBack = () => {
  57. uni.navigateBack();
  58. };
  59. const confirmLogout = () => {
  60. uni.showModal({
  61. title: '确认注销',
  62. content: '您确定要注销账号吗?注销后将无法恢复!',
  63. success: (res) => {
  64. if (res.confirm) {
  65. uni.showToast({ title: '注销成功', icon: 'success' });
  66. setTimeout(() => {
  67. uni.navigateTo({ url: '/pages/login/login' });
  68. }, 1500);
  69. }
  70. }
  71. });
  72. };
  73. </script>
  74. <style scoped>
  75. .page-container {
  76. background-color: #f5f5f5;
  77. min-height: 100vh;
  78. }
  79. .header {
  80. display: flex;
  81. align-items: center;
  82. justify-content: space-between;
  83. padding: 20rpx;
  84. background-color: #ffffff;
  85. border-bottom: 1rpx solid #f0f0f0;
  86. }
  87. .header-left, .header-right {
  88. width: 60rpx;
  89. }
  90. .header-title {
  91. font-size: 32rpx;
  92. font-weight: bold;
  93. color: #333;
  94. }
  95. .content {
  96. padding: 30rpx;
  97. }
  98. .tip-text {
  99. font-size: 28rpx;
  100. color: #333;
  101. line-height: 1.5;
  102. margin-bottom: 40rpx;
  103. }
  104. .conditions {
  105. background-color: #ffffff;
  106. border-radius: 16rpx;
  107. padding: 30rpx;
  108. margin-bottom: 40rpx;
  109. }
  110. .condition-item {
  111. display: flex;
  112. margin-bottom: 30rpx;
  113. }
  114. .condition-item:last-child {
  115. margin-bottom: 0;
  116. }
  117. .condition-number {
  118. font-size: 28rpx;
  119. font-weight: bold;
  120. color: #ff6b35;
  121. margin-right: 15rpx;
  122. }
  123. .condition-content {
  124. flex: 1;
  125. }
  126. .condition-title {
  127. font-size: 28rpx;
  128. color: #333;
  129. font-weight: bold;
  130. display: block;
  131. margin-bottom: 8rpx;
  132. }
  133. .condition-desc {
  134. font-size: 26rpx;
  135. color: #666;
  136. line-height: 1.4;
  137. }
  138. .logout-btn {
  139. width: 100%;
  140. background-color: #ffc107;
  141. color: #333;
  142. font-size: 30rpx;
  143. font-weight: bold;
  144. border-radius: 50rpx;
  145. padding: 20rpx;
  146. border: none;
  147. margin-bottom: 30rpx;
  148. }
  149. .logout-btn[disabled] {
  150. background-color: #d9d9d9;
  151. color: #999;
  152. }
  153. .agreement {
  154. display: flex;
  155. align-items: center;
  156. justify-content: center;
  157. }
  158. .agreement-text {
  159. font-size: 26rpx;
  160. color: #666;
  161. margin-left: 10rpx;
  162. }
  163. </style>