cash.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="">
  3. <view class="cash-card mlr-36 mt-20">
  4. <view class="size-32 pl-30 pt-22 pb-22 bb">
  5. 提现额度
  6. </view>
  7. <view class="size-40 pl-30 pt-32 pb-32 bb">
  8. <input type="number" v-model="money" value="" placeholder="请输入金额" @blur="getnum"/>
  9. </view>
  10. <!-- <view v-if="userInfo.property" class="u-font-24 pl-30 pt-22 pb-22">
  11. 可用余额{{userInfo.property.bonus}}蜜币,最小提现金额1000蜜币
  12. </view> -->
  13. <view class="size-24 pl-30 pt-22 pb-22">
  14. 可提现余额{{price}}元
  15. </view>
  16. </view>
  17. <view class="plr-36 mt-50">
  18. 提现
  19. </view>
  20. <view class="cash-ul plr-36 flex">
  21. <view class="cash-li mt-34 center pt-32 pb-32 border-pink">
  22. <image src="../../static/zfb.png" mode=""></image>
  23. <text class="u-m-l-20">支付宝提现</text>
  24. </view>
  25. </view>
  26. <view class="cash-card1 mlr-36 mt-50">
  27. <view class="size-32 pl-30 pt-22 pb-22 bb">
  28. 提现账号
  29. </view>
  30. <view class="pl-30 pr-30 pt-22 pb-22 bb flex">
  31. <view class="u-font-26">
  32. 支付宝账号
  33. </view>
  34. <view class="">
  35. <input type="text" v-model="account" value="" placeholder="请输入支付宝账号" class="u-font-26 text-right" />
  36. </view>
  37. </view>
  38. <view class="pl-30 pr-30 pt-22 pb-22 flex">
  39. <view class="u-font-26">
  40. 真实姓名
  41. </view>
  42. <view class="">
  43. <input type="text" value="" v-model="name" placeholder="请输入真实姓名" class="u-font-26 text-right" />
  44. </view>
  45. </view>
  46. </view>
  47. <view class="plr-36 mt-30 size-26 gray-2">
  48. *单笔限额{{cash.withdraw_min}}-{{cash.withdraw_max}}元
  49. </view>
  50. <u-button @click="submit" type="primary" :disabled="!money || !account || !name" class="mlr-36 mt-80">确认提现</u-button>
  51. <u-modal v-model="show" :content="content" :show-title="false" @confirm="confirm"></u-modal>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. mapState
  57. } from 'vuex'
  58. export default {
  59. data() {
  60. return {
  61. price:'',
  62. balance:'',
  63. money: '',
  64. account: '',
  65. name: '',
  66. show: false,
  67. content: '提现成功',
  68. cash:''
  69. }
  70. },
  71. computed: {
  72. ...mapState(["userInfo"])
  73. },
  74. onLoad() {
  75. this.getmoney()
  76. this.init()
  77. },
  78. methods: {
  79. init(){//提现手续费
  80. this.$http('/addons/ddrive/user/cash_set',"POST").then(data=>{
  81. console.log(data);
  82. this.cash = data.cash_set
  83. })
  84. },
  85. // 我的收入
  86. getmoney() {
  87. this.$http('/addons/ddrive/user/userIncome', "POST").then(data => {
  88. console.log(data);
  89. this.price = data.withdraw_money
  90. })
  91. },
  92. getnum(e){
  93. if(parseFloat(e.detail.value) < this.cash.withdraw_min){
  94. uni.showToast({
  95. title:'单笔限额最小' + this.cash.withdraw_min + '元',
  96. icon:'none'
  97. })
  98. this.money = ''
  99. }else if(parseFloat(e.detail.value) > this.cash.withdraw_max){
  100. uni.showToast({
  101. title:'单笔限额最大' + this.cash.withdraw_max + '元',
  102. icon:'none'
  103. })
  104. this.money = ''
  105. }
  106. },
  107. confirm(){
  108. uni.navigateBack({
  109. })
  110. },
  111. submit() {
  112. this.$http('/addons/ddrive/money/sbCash', {
  113. money: this.money,
  114. account_number: this.account,
  115. payee: this.name
  116. }, "POST").then(data => {
  117. this.show = true
  118. this.getmoney()
  119. }).catch(data=>{
  120. })
  121. }
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. /deep/.u-btn {
  127. height: 96rpx !important;
  128. }
  129. /deep/.u-btn--primary--disabled {
  130. background-color: $bg-1 !important;
  131. }
  132. /deep/.u-primary-hover {
  133. background-color: $blue !important;
  134. }
  135. page {
  136. background: #F8F8F8;
  137. }
  138. .cash-card {
  139. background: #fff;
  140. border-radius: 10rpx;
  141. box-shadow: 0px 0px 24px 0px rgba(187, 187, 187, 0.36);
  142. }
  143. .cash-li {
  144. width: 48%;
  145. background: #fff;
  146. border-radius: 10rpx;
  147. box-shadow: 0px 0px 24px 0px rgba(187, 187, 187, 0.36);
  148. image {
  149. width: 55rpx;
  150. height: 55rpx;
  151. border-radius: 50%;
  152. }
  153. }
  154. .cash-card1 {
  155. background: #fff;
  156. border-radius: 10rpx;
  157. box-shadow: 0px 0px 24px 0px rgba(187, 187, 187, 0.36);
  158. }
  159. </style>