withdraw.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="page">
  3. <view class="title flex-col">
  4. <!--#ifdef H5-->
  5. <view class="flex-row justify-center">
  6. <text class="title1">收益提现</text>
  7. </view>
  8. <!--#endif-->
  9. <text class="title2" @click="navigateTo('/pages/withdrawalRecord/withdrawalRecord')">提现记录</text>
  10. </view>
  11. <view class="flex-col justify-center" :style="{marginTop:'150rpx'}">
  12. <view class="flex-row justify-center">
  13. <text class="priceTitle">可提现金额</text>
  14. </view>
  15. <view class="flex-row justify-center marginTop">
  16. <text class="price">{{statistics.myEarning || '0.00'}}</text>
  17. </view>
  18. </view>
  19. <view class="flex-row justify-start ":style="{marginTop:'150rpx'}">
  20. <checkbox-group @change="checkboxChange">
  21. <checkbox :checked="checked" color="#000000" :style="{'transform':'scale(0.7)'}"/>
  22. <text class="read">请阅读并同意</text>
  23. <text @click.stop="gotoTermOfService(8)" class="read">《娇骄儿拓客活动规则》</text>
  24. </checkbox-group>
  25. </view>
  26. <view class="flex-row justify-center marginTop">
  27. <view class="withdrawButton" @click="apply">
  28. <text>立即提现</text>
  29. </view>
  30. </view>
  31. <!--#ifdef H5-->
  32. <liu-drag-button @clickBtn="back">返回</liu-drag-button>
  33. <!--#endif-->
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. checked:false,
  41. statistics:{},
  42. }
  43. },
  44. onShow() {
  45. this.exStatistics()
  46. },
  47. methods: {
  48. // 查看储值协议
  49. gotoTermOfService(type){
  50. uni.navigateTo({
  51. url: '/pages/agreement/agreement?name='+'娇骄儿拓客活动规则'+'&type=' + 10,
  52. })
  53. },
  54. apply(){
  55. if (!this.checked){
  56. uni.showToast({
  57. icon: 'none',
  58. duration: 3000,
  59. title: '请同意《娇骄儿拓客活动规则》'
  60. });
  61. return
  62. }
  63. this.$api.service.apply({
  64. amount:null
  65. }).then(res=>{
  66. uni.showToast({
  67. icon: 'success',
  68. duration: 3000,
  69. title: '申请成功'
  70. });
  71. })
  72. },
  73. exStatistics(){
  74. this.$api.service.exStatistics().then(res=>{
  75. this.statistics = res.data.data
  76. })
  77. },
  78. navigateTo(url) {
  79. uni.navigateTo({
  80. url: url
  81. })
  82. },
  83. back() {
  84. uni.navigateBack({
  85. delta: 1
  86. })
  87. },
  88. checkboxChange(){
  89. this.checked = !this.checked
  90. },
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. @import './index.rpx.css';
  96. </style>