charges.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div class="charges-container">
  3. <!-- 导航栏 -->
  4. <div class="nav-bar">
  5. <div class="back-btn" @click="$router.back()">
  6. <i class="arrow-left"></i>
  7. </div>
  8. <div class="title">转入</div>
  9. </div>
  10. <!-- 页面内容 -->
  11. <div class="content">
  12. <div class="recharge-card">
  13. <div class="header">
  14. <div class="title">{{ title }}</div>
  15. </div>
  16. <div class="headers">
  17. <div class="titles">{{ amountText }}</div>
  18. </div>
  19. <div class="payment-method">
  20. <div class="label">请选择支付方式</div>
  21. </div>
  22. <div class="amount-input">
  23. <div class="label">{{ descriptionText }}</div>
  24. <div class="input-wrapper">
  25. <div class="input">{{ money }}</div>
  26. </div>
  27. </div>
  28. <div class="submit-section">
  29. <button class="submit-btn" :disabled="true">{{ submitButtonText }}</button>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import { getNotification } from '@/api/profile';
  37. export default {
  38. name: 'Charges',
  39. data() {
  40. return {
  41. selectedPayment: '',
  42. type: '',
  43. money: 310,
  44. title: '个人所得税'
  45. }
  46. },
  47. computed: {
  48. amountText() {
  49. return this.type === '4' ? `额度费¥${this.money}缴纳成功立即打款到账` : `税费¥${this.money}缴纳成功立即打款到账`;
  50. },
  51. descriptionText() {
  52. if (this.type === '4') {
  53. switch (Number(this.money)) {
  54. case 310:
  55. return '提升完成可享受到账100万元内额度';
  56. case 620:
  57. return '提升完成可享受到账300万元内额度';
  58. case 930:
  59. return '提升完成可享受到账500万元内额度';
  60. case 1240:
  61. return '提升完成可享受到账1000万元内额度';
  62. case 1550:
  63. return '提升完成可享受到账2000万元内额度';
  64. case 1860:
  65. return '提升完成可享受到账2000万以上';
  66. default:
  67. return '提升完成可享受更高额度';
  68. }
  69. }
  70. return '缴纳个人所得税款是每位公民的义务,缴纳成功立即打款到账';
  71. },
  72. submitButtonText() {
  73. return this.type === '4' ? '立即提升' : '立即缴纳';
  74. }
  75. },
  76. async created() {
  77. // 从路由参数获取数据
  78. const { type, money, title } = this.$route.query;
  79. if (type) this.type = type;
  80. if (money) this.money = money;
  81. if (title) this.title = title;
  82. try {
  83. const res = await getNotification();
  84. console.log('通知数据:', res);
  85. } catch (error) {
  86. console.error('获取通知失败:', error);
  87. }
  88. }
  89. }
  90. </script>
  91. <style scoped>
  92. .charges-container {
  93. min-height: 100vh;
  94. background: url('../assets/xiaobh.png');
  95. background-size: cover;
  96. background-position: center;
  97. background-repeat: no-repeat;
  98. }
  99. .nav-bar {
  100. height: 44px;
  101. background-color: #ed4b39;
  102. color: #fff;
  103. display: flex;
  104. align-items: center;
  105. position: relative;
  106. padding: 0 15px;
  107. }
  108. .back-btn {
  109. width: 24px;
  110. height: 44px;
  111. display: flex;
  112. align-items: center;
  113. cursor: pointer;
  114. }
  115. .arrow-left {
  116. width: 12px;
  117. height: 12px;
  118. border-left: 2px solid #fff;
  119. border-bottom: 2px solid #fff;
  120. transform: rotate(45deg);
  121. }
  122. .title {
  123. position: absolute;
  124. left: 50%;
  125. transform: translateX(-50%);
  126. font-size: 16px;
  127. font-weight: 500;
  128. }
  129. .content {
  130. padding: 15px;
  131. padding-top: 100px;
  132. min-height: calc(100vh - 44px);
  133. }
  134. .recharge-card {
  135. background: #fff;
  136. border-radius: 12px;
  137. padding: 20px;
  138. box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  139. }
  140. .header {
  141. margin-bottom: 20px;
  142. }
  143. .header .title {
  144. font-size: 18px;
  145. font-weight: bold;
  146. color: #333;
  147. }
  148. .headers {
  149. margin-bottom: 20px;
  150. }
  151. .titles {
  152. font-size: 14px;
  153. color: #666;
  154. line-height: 1.5;
  155. font-weight: bold;
  156. margin-top: 30px;
  157. text-align: center;
  158. }
  159. .payment-method {
  160. margin-bottom: 20px;
  161. }
  162. .payment-method .label {
  163. font-size: 16px;
  164. color: #333;
  165. margin-bottom: 10px;
  166. }
  167. .payment-selector {
  168. border: 1px solid #eee;
  169. border-radius: 8px;
  170. padding: 15px;
  171. }
  172. .amount-input {
  173. margin-bottom: 30px;
  174. }
  175. .amount-input .label {
  176. font-size: 14px;
  177. color: #666;
  178. line-height: 1.5;
  179. margin-bottom: 15px;
  180. }
  181. .input-wrapper {
  182. background: #f8f8f8;
  183. border-radius: 8px;
  184. padding: 15px;
  185. text-align: center;
  186. }
  187. .input {
  188. font-size: 24px;
  189. color: #333;
  190. text-align: left;
  191. }
  192. .submit-section {
  193. margin-top: 30px;
  194. }
  195. .submit-btn {
  196. width: 100%;
  197. height: 44px;
  198. background-color: #ed4b39;
  199. color: #acacac;
  200. border: none;
  201. border-radius: 22px;
  202. font-size: 16px;
  203. cursor: pointer;
  204. }
  205. .submit-btn:disabled {
  206. background-color: #f7f7f7;
  207. cursor: not-allowed;
  208. }
  209. </style>