index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="container">
  3. <!-- 自定义头部 -->
  4. <view class="custom-header">
  5. <view class="header-left" @click="navBack">
  6. <image class="back-icon" src="/static/icons/chevron_right_dark.svg" style="transform: rotate(180deg);"></image>
  7. </view>
  8. <text class="header-title">账号与安全</text>
  9. <view class="header-right"></view>
  10. </view>
  11. <view class="header-placeholder"></view>
  12. <view class="section-title-security">安全设置</view>
  13. <view class="group-card">
  14. <view class="list-item" @click="changeMobile">
  15. <text class="item-title">手机号</text>
  16. <view class="item-right">
  17. <text class="item-value">136****5678</text>
  18. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  19. </view>
  20. </view>
  21. <view class="list-item">
  22. <text class="item-title">登录密码</text>
  23. <view class="item-right">
  24. <text class="item-value">未设置</text>
  25. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="section-title-security">高级设置</view>
  30. <view class="group-card">
  31. <view class="list-item no-border" @click="deleteAccount">
  32. <text class="item-title">注销账号</text>
  33. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {}
  42. },
  43. methods: {
  44. navBack() {
  45. uni.navigateBack({
  46. delta: 1
  47. });
  48. },
  49. changeMobile() {
  50. // 跳转修改手机号
  51. },
  52. deleteAccount() {
  53. uni.showModal({
  54. title: '警示',
  55. content: '注销账号后将无法恢复,确定要继续吗?',
  56. success: function (res) {
  57. if (res.confirm) {
  58. uni.showToast({ title: '已提交注销申请', icon: 'none' });
  59. }
  60. }
  61. });
  62. }
  63. }
  64. }
  65. </script>
  66. <style>
  67. page {
  68. background-color: #F8F8F8;
  69. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  70. }
  71. .custom-header {
  72. position: fixed;
  73. top: 0;
  74. left: 0;
  75. width: 100%;
  76. height: 88rpx;
  77. padding-top: var(--status-bar-height);
  78. background-color: #fff;
  79. display: flex;
  80. align-items: center;
  81. justify-content: space-between;
  82. padding-left: 30rpx;
  83. padding-right: 30rpx;
  84. box-sizing: content-box;
  85. z-index: 100;
  86. }
  87. .header-placeholder {
  88. height: calc(88rpx + var(--status-bar-height));
  89. }
  90. .back-icon {
  91. width: 40rpx;
  92. height: 40rpx;
  93. }
  94. .header-title {
  95. font-size: 28rpx;
  96. font-weight: bold;
  97. color: #333;
  98. }
  99. .header-right {
  100. width: 40rpx;
  101. }
  102. .container {
  103. padding: 20rpx 30rpx;
  104. }
  105. .section-title-security {
  106. font-size: 24rpx;
  107. color: #999;
  108. margin-bottom: 20rpx;
  109. margin-top: 20rpx;
  110. padding-left: 10rpx;
  111. }
  112. .group-card {
  113. background-color: #fff;
  114. border-radius: 20rpx;
  115. padding: 0 30rpx;
  116. margin-bottom: 30rpx;
  117. }
  118. .list-item {
  119. display: flex;
  120. justify-content: space-between;
  121. align-items: center;
  122. height: 100rpx;
  123. border-bottom: 1px solid #F5F5F5;
  124. }
  125. .list-item.no-border {
  126. border-bottom: none;
  127. }
  128. .item-title {
  129. font-size: 28rpx;
  130. color: #333;
  131. }
  132. .item-right {
  133. display: flex;
  134. align-items: center;
  135. }
  136. .arrow-icon {
  137. width: 28rpx;
  138. height: 28rpx;
  139. opacity: 0.5;
  140. margin-left: 10rpx;
  141. }
  142. .item-value {
  143. font-size: 28rpx;
  144. color: #999;
  145. }
  146. </style>