changePhone.uvue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <text class="section-title">请验证以下信息</text>
  16. <!-- 当前手机号验证 -->
  17. <view class="section">
  18. <text class="section-subtitle">当前手机号验证</text>
  19. <view class="form-group">
  20. <view class="phone-display">18790654335</view>
  21. </view>
  22. <view class="form-group">
  23. <input class="input" type="text" placeholder="请输入验证码" />
  24. <button class="verify-btn">获取验证码</button>
  25. </view>
  26. </view>
  27. <!-- 新手机号绑定 -->
  28. <view class="section">
  29. <text class="section-subtitle">新手机号绑定</text>
  30. <view class="form-group">
  31. <input class="input" type="text" placeholder="请输入新手机号" />
  32. </view>
  33. <view class="form-group">
  34. <input class="input" type="text" placeholder="请输入验证码" />
  35. <button class="verify-btn disabled">58S</button>
  36. </view>
  37. </view>
  38. <!-- 确定按钮 -->
  39. <button class="confirm-btn" @click="confirmChange">确定</button>
  40. </view>
  41. </view>
  42. </template>
  43. <script setup lang="ts">
  44. const goBack = () => {
  45. uni.navigateBack();
  46. };
  47. const confirmChange = () => {
  48. uni.showToast({ title: '修改手机号成功', icon: 'success' });
  49. setTimeout(() => {
  50. uni.navigateBack();
  51. }, 1500);
  52. };
  53. </script>
  54. <style scoped>
  55. .page-container {
  56. background-color: #f5f5f5;
  57. min-height: 100vh;
  58. }
  59. .header {
  60. display: flex;
  61. align-items: center;
  62. justify-content: space-between;
  63. padding: 20rpx;
  64. background-color: #ffffff;
  65. border-bottom: 1rpx solid #f0f0f0;
  66. }
  67. .header-left, .header-right {
  68. width: 60rpx;
  69. }
  70. .header-title {
  71. font-size: 32rpx;
  72. font-weight: bold;
  73. color: #333;
  74. }
  75. .content {
  76. padding: 30rpx;
  77. }
  78. .section-title {
  79. font-size: 36rpx;
  80. font-weight: bold;
  81. color: #333;
  82. margin-bottom: 40rpx;
  83. display: block;
  84. }
  85. .section {
  86. background-color: #ffffff;
  87. border-radius: 16rpx;
  88. padding: 20rpx;
  89. margin-bottom: 30rpx;
  90. }
  91. .section-subtitle {
  92. font-size: 28rpx;
  93. color: #333;
  94. margin-bottom: 20rpx;
  95. display: block;
  96. }
  97. .form-group {
  98. display: flex;
  99. align-items: center;
  100. margin-bottom: 20rpx;
  101. }
  102. .form-group:last-child {
  103. margin-bottom: 0;
  104. }
  105. .phone-display {
  106. flex: 1;
  107. font-size: 28rpx;
  108. color: #333;
  109. padding: 20rpx;
  110. background-color: #f5f5f5;
  111. border-radius: 8rpx;
  112. }
  113. .input {
  114. flex: 1;
  115. font-size: 28rpx;
  116. color: #333;
  117. padding: 20rpx;
  118. background-color: #f5f5f5;
  119. border-radius: 8rpx;
  120. margin-right: 15rpx;
  121. }
  122. .verify-btn {
  123. font-size: 26rpx;
  124. color: #ffc107;
  125. padding: 15rpx 20rpx;
  126. border: 1rpx solid #ffc107;
  127. border-radius: 8rpx;
  128. background-color: transparent;
  129. }
  130. .verify-btn.disabled {
  131. color: #999;
  132. border-color: #d9d9d9;
  133. }
  134. .confirm-btn {
  135. width: 100%;
  136. background-color: #ffc107;
  137. color: #333;
  138. font-size: 30rpx;
  139. font-weight: bold;
  140. border-radius: 50rpx;
  141. padding: 20rpx;
  142. border: none;
  143. }
  144. </style>