四零语境前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
3.9 KiB

1 month ago
  1. <template>
  2. <view class="cash-page">
  3. <!-- 顶部标题栏 -->
  4. <!-- 表单内容 -->
  5. <view class="form-container">
  6. <view class="header">
  7. <view class="title">微信提现</view>
  8. <view class="flow-link">过往流水 ></view>
  9. </view>
  10. <!-- 真实姓名 -->
  11. <view class="form-item">
  12. <view class="label">真实姓名</view>
  13. <uv-input
  14. v-model="realName"
  15. placeholder="请输入"
  16. border="none"
  17. :custom-style="inputStyle"
  18. ></uv-input>
  19. </view>
  20. <!-- 提现金额 -->
  21. <view class="form-item">
  22. <view class="label">提现金额</view>
  23. <uv-input
  24. v-model="amount"
  25. placeholder="请输入"
  26. type="number"
  27. border="none"
  28. :custom-style="inputStyle"
  29. ></uv-input>
  30. </view>
  31. </view>
  32. <!-- 说明文字 -->
  33. <view class="notice-text">
  34. 请仔细检查并确认相关信息因用户个人疏忽导致的充值错误需由用户自行承担
  35. <text class="link-text" @click="showWithdrawRules">提现须知</text>
  36. </view>
  37. <!-- 固定底部按钮 -->
  38. <view class="fixed-bottom">
  39. <uv-button
  40. type="primary"
  41. :custom-style="buttonStyle"
  42. @click="handleWithdraw"
  43. >
  44. 提现
  45. </uv-button>
  46. <uv-safe-bottom></uv-safe-bottom>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. realName: '',
  55. amount: '',
  56. inputStyle: {
  57. backgroundColor: 'transparent',
  58. fontSize: '32rpx',
  59. color: '#333'
  60. },
  61. buttonStyle: {
  62. backgroundColor: '#22F2EB',
  63. borderRadius: '50rpx',
  64. height: '88rpx',
  65. fontSize: '32rpx',
  66. fontWeight: 'bold'
  67. }
  68. }
  69. },
  70. methods: {
  71. handleWithdraw() {
  72. if (!this.realName) {
  73. uni.showToast({
  74. title: '请输入真实姓名',
  75. icon: 'none'
  76. })
  77. return
  78. }
  79. if (!this.amount) {
  80. uni.showToast({
  81. title: '请输入提现金额',
  82. icon: 'none'
  83. })
  84. return
  85. }
  86. // 提现逻辑
  87. console.log('提现信息:', {
  88. realName: this.realName,
  89. amount: this.amount
  90. })
  91. uni.showToast({
  92. title: '提现申请已提交',
  93. icon: 'success'
  94. })
  95. },
  96. showWithdrawRules() {
  97. // 显示提现须知
  98. uni.showModal({
  99. title: '提现须知',
  100. content: '1. 提现金额最低10元\n2. 工作日24小时内到账\n3. 手续费按平台规定收取',
  101. showCancel: false
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. // @import '@/uni.scss';
  109. .cash-page {
  110. min-height: 100vh;
  111. background-color: #F2F2F2;
  112. padding-bottom: 200rpx;
  113. padding-top: 40rpx;
  114. .header {
  115. background-color: #fff;
  116. padding: 40rpx 40rpx 30rpx;
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. .title {
  121. font-size: 36rpx;
  122. font-weight: bold;
  123. color: #333;
  124. }
  125. .flow-link {
  126. font-size: 28rpx;
  127. color: #999;
  128. }
  129. }
  130. .form-container {
  131. background-color: #fff;
  132. margin: 20rpx 40rpx;
  133. border-radius: 32rpx;
  134. margin-top: 20rpx;
  135. .form-item {
  136. padding: 40rpx;
  137. border-bottom: 1rpx solid #f0f0f0;
  138. &:last-child {
  139. border-bottom: none;
  140. }
  141. .label {
  142. font-size: 32rpx;
  143. color: #333;
  144. margin-bottom: 20rpx;
  145. font-weight: 500;
  146. }
  147. }
  148. }
  149. .notice-text {
  150. padding: 40rpx;
  151. font-size: 24rpx;
  152. color: #999;
  153. line-height: 1.6;
  154. .link-text {
  155. color: #22F2EB;
  156. }
  157. }
  158. .fixed-bottom {
  159. position: fixed;
  160. bottom: 0;
  161. left: 0;
  162. right: 0;
  163. padding: 30rpx 40rpx;
  164. background-color: #fff;
  165. border-top: 1rpx solid #f0f0f0;
  166. z-index: 999;
  167. }
  168. }
  169. </style>