index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. <!-- 银行卡卡片 -->
  13. <view class="bank-card">
  14. <view class="card-top">
  15. <view class="bank-info">
  16. <view class="bank-icon-circle">
  17. <text class="bank-icon-text">招</text>
  18. </view>
  19. <text class="bank-name">招商银行</text>
  20. </view>
  21. <view class="card-type">储蓄卡</view>
  22. </view>
  23. <view class="card-number">622588******1234</view>
  24. <view class="card-bg-circle"></view>
  25. </view>
  26. <!-- 修改按钮 -->
  27. <button class="action-btn" @click="editBank">修改银行卡信息</button>
  28. <!-- 底部提示 -->
  29. <view class="security-tip">
  30. <image class="shield-icon" src="/static/icons/shield.svg" v-if="hasShieldIcon"></image>
  31. <text>信息已加密,仅用于收入发放</text>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. hasShieldIcon: false // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  40. }
  41. },
  42. methods: {
  43. navBack() {
  44. uni.navigateBack({
  45. delta: 1
  46. });
  47. },
  48. editBank() {
  49. uni.showToast({ title: '跳转修改银行卡页', icon: 'none' });
  50. }
  51. }
  52. }
  53. </script>
  54. <style>
  55. page {
  56. background-color: #F8F8F8;
  57. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  58. }
  59. .custom-header {
  60. position: fixed;
  61. top: 0;
  62. left: 0;
  63. width: 100%;
  64. height: 88rpx;
  65. padding-top: var(--status-bar-height);
  66. background-color: #fff;
  67. display: flex;
  68. align-items: center;
  69. justify-content: space-between;
  70. padding-left: 30rpx;
  71. padding-right: 30rpx;
  72. box-sizing: content-box;
  73. z-index: 100;
  74. }
  75. .header-placeholder {
  76. height: calc(88rpx + var(--status-bar-height));
  77. }
  78. .back-icon {
  79. width: 40rpx;
  80. height: 40rpx;
  81. }
  82. .header-title {
  83. font-size: 28rpx;
  84. font-weight: bold;
  85. color: #333;
  86. }
  87. .header-right {
  88. width: 40rpx;
  89. }
  90. .container {
  91. padding: 30rpx;
  92. }
  93. .bank-card {
  94. background: linear-gradient(135deg, #E53935, #C62828);
  95. border-radius: 20rpx;
  96. padding: 40rpx;
  97. color: #fff;
  98. margin-bottom: 60rpx;
  99. position: relative;
  100. overflow: hidden;
  101. box-shadow: 0 10rpx 30rpx rgba(229, 57, 53, 0.3);
  102. }
  103. .card-top {
  104. display: flex;
  105. justify-content: space-between;
  106. align-items: center;
  107. margin-bottom: 60rpx;
  108. position: relative;
  109. z-index: 2;
  110. }
  111. .bank-info {
  112. display: flex;
  113. align-items: center;
  114. }
  115. .bank-icon-circle {
  116. width: 60rpx;
  117. height: 60rpx;
  118. background-color: #fff;
  119. border-radius: 50%;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. margin-right: 20rpx;
  124. }
  125. .bank-icon-text {
  126. color: #C62828;
  127. font-weight: bold;
  128. font-size: 32rpx;
  129. }
  130. .bank-name {
  131. font-size: 32rpx;
  132. font-weight: bold;
  133. }
  134. .card-type {
  135. font-size: 24rpx;
  136. border: 1px solid rgba(255,255,255,0.6);
  137. padding: 4rpx 12rpx;
  138. border-radius: 8rpx;
  139. }
  140. .card-number {
  141. font-size: 48rpx;
  142. font-family: monospace;
  143. letter-spacing: 4rpx;
  144. position: relative;
  145. z-index: 2;
  146. text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.2);
  147. }
  148. .card-bg-circle {
  149. position: absolute;
  150. top: -50rpx;
  151. right: -50rpx;
  152. width: 300rpx;
  153. height: 300rpx;
  154. background-color: rgba(255,255,255,0.1);
  155. border-radius: 50%;
  156. z-index: 1;
  157. }
  158. .action-btn {
  159. background-color: #FF5722;
  160. color: #fff;
  161. font-size: 32rpx;
  162. border-radius: 44rpx;
  163. height: 88rpx;
  164. line-height: 88rpx;
  165. margin-bottom: 30rpx;
  166. }
  167. .security-tip {
  168. display: flex;
  169. align-items: center;
  170. justify-content: center;
  171. font-size: 24rpx;
  172. color: #999;
  173. }
  174. .shield-icon {
  175. width: 24rpx;
  176. height: 24rpx;
  177. margin-right: 10rpx;
  178. }
  179. </style>