index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view title="提现" ref="pageRef">
  3. <view class="paddingX12 paddingT16">
  4. <view class="cu-form-group">
  5. <view class="title">真实姓名:</view>
  6. <input placeholder="请输入真实姓名" v-model="form.idName" name="input" />
  7. </view>
  8. <view class="cu-form-group">
  9. <view class="title">身份证号:</view>
  10. <input placeholder="请输入身份证号" v-model="form.idNum" name="input" />
  11. </view>
  12. <view class="cu-form-group">
  13. <view class="title">银行账户:</view>
  14. <input placeholder="请输入银行账户" v-model="form.bankNum" name="input" />
  15. </view>
  16. <view class="cu-form-group">
  17. <view class="title">所属银行:</view>
  18. <input placeholder="请输入所属银行" v-model="form.bankName" name="input" />
  19. </view>
  20. <view class="cu-form-group">
  21. <view class="title">所属支行:</view>
  22. <input placeholder="请输入所属支行" v-model="form.bankNameBranch" name="input" />
  23. </view>
  24. <view class="cu-form-group">
  25. <view class="title">预留手机:</view>
  26. <input placeholder="请输入预留手机" v-model="form.bankPhone" name="input" />
  27. </view>
  28. <view class="tip paddingT15" style="color: #ff0000;">
  29. * 请您务必保证输入的账号和姓名匹配,且该账号已实名认证。若因您输入信息错误,导致提现到他人账号,因此造成的后果,平台不承担任何责任,
  30. </view>
  31. </view>
  32. <view class="paddingX26 paddingT15 marginT15 radius2" style="background-color: #f6f6f6">
  33. <cm-button :height="37" @click="apply">保存</cm-button>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import { throttle } from '@/utils/utils.js'
  39. export default {
  40. data() {
  41. return {
  42. pre: null,
  43. balance: null,
  44. desc: '',
  45. type: 'ALIPAY',
  46. money: '',
  47. form: {
  48. idName: '', //真实姓名
  49. idNum: '', //身份证号
  50. bankNum: '', //银行卡号
  51. bankName: '', //所属银行
  52. bankNameBranch: '', //所属支行
  53. bankPhone: '' //银行预留手机号
  54. },
  55. idName: null,
  56. idNum: null,
  57. accountNo: ''
  58. }
  59. },
  60. onLoad(option) {
  61. this.type = option.type || 'ALIPAY'
  62. },
  63. onShow() {
  64. this.getWithdraw()
  65. },
  66. methods: {
  67. async getWithdraw() {
  68. const res = await this.$service.wallet.getWithdraw()
  69. this.form = res
  70. },
  71. async getPre() {
  72. // const res = await this.$service.wallet.withdrawPre(this.type, 'MAGIC_PROMOTION')
  73. // if (res) {
  74. // if (res.account && res.account.idName) {
  75. // this.idName = res.account.idName
  76. // this.idNum = res.account.idNum
  77. // this.accountNo = res.account.accountNo
  78. // }
  79. // this.balance = res.avaliableWithdraw.amount
  80. // this.desc = res.avaliableWithdraw.desc
  81. // }
  82. },
  83. apply() {
  84. if (!this.form.idName) {
  85. this.$message.warn('请输入真实姓名')
  86. return
  87. }
  88. if (!this.form.idNum) {
  89. this.$message.warn('请输入身份证号')
  90. return
  91. }
  92. if (!this.form.bankNum) {
  93. this.$message.warn('请输入银行账户')
  94. return
  95. }
  96. if (!this.form.bankName) {
  97. this.$message.warn('请输入所属银行')
  98. return
  99. }
  100. if (!this.form.bankNameBranch) {
  101. this.$message.warn('请输入所属支行')
  102. return
  103. }
  104. if (!this.form.bankPhone) {
  105. this.$message.warn('请输入预留手机')
  106. return
  107. }
  108. this.realApply()
  109. },
  110. async realApply() {
  111. const res = await this.$service.wallet.saveBank(this.form)
  112. if (res) {
  113. this.$router.back()
  114. }
  115. }
  116. }
  117. }
  118. </script>
  119. <style>
  120. page {
  121. background: #fff;
  122. }
  123. </style>
  124. <style lang="scss" scoped>
  125. .input-wrapper {
  126. width: 100%;
  127. height: 104rpx;
  128. border-radius: 16rpx;
  129. padding: 0 15rpx;
  130. .left {
  131. width: 160rpx;
  132. }
  133. }
  134. .un-check {
  135. width: 36rpx;
  136. height: 36rpx;
  137. border: 2rpx solid $color-theme;
  138. border-radius: 4rpx;
  139. }
  140. .check {
  141. width: 36rpx;
  142. height: 36rpx;
  143. }
  144. .cu-form-group{
  145. border-top: none;
  146. }
  147. </style>