profit-cash.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <app-layout>
  3. <view class="price-show dir-top-nowrap main-center cross-center">
  4. <view class="title">可提现金额(元)</view>
  5. <view class="price">{{middleman.money}}</view>
  6. <view @click="toCash" class="cash-btn" :style="{'color': getTheme.color, 'border-color': getTheme.border}">去提现</view>
  7. </view>
  8. <view class="menu">
  9. <view @click="toDetail" class="menu-item main-between cross-center">
  10. <view>提现明细</view>
  11. <image src="/static/image/icon/arrow-right.png"></image>
  12. </view>
  13. </view>
  14. </app-layout>
  15. </template>
  16. <script>
  17. import {mapGetters, mapState} from 'vuex';
  18. import appMenu from '../components/app-menu';
  19. export default {
  20. data() {
  21. return {
  22. middleman: {},
  23. setting: {},
  24. middleman: {},
  25. apply_at: ''
  26. }
  27. },
  28. components: {
  29. "app-menu": appMenu
  30. },
  31. computed: {
  32. ...mapGetters('mallConfig', {
  33. getTheme: 'getTheme',
  34. }),
  35. ...mapState({
  36. stock: state => state.mallConfig.__wxapp_img.stock,
  37. bonusImg: state => state.mallConfig.__wxapp_img.bonus,
  38. userInfo: state => state.user.info,
  39. })
  40. },
  41. onShow: function (options) {
  42. this.getStatus();
  43. },
  44. methods: {
  45. toDetail() {
  46. uni.navigateTo({
  47. url: '/plugins/community/cash-detail/cash-detail'
  48. });
  49. },
  50. toCash() {
  51. uni.navigateTo({
  52. url: '/plugins/community/cash/cash'
  53. });
  54. },
  55. getStatus() {
  56. let that = this;
  57. that.$request({
  58. url: that.$api.community.index,
  59. }).then(response=>{
  60. if(response.code == 0) {
  61. this.setting = response.data.setting;
  62. this.middleman = response.data.middleman;
  63. if(response.data.middleman.id > 0) {
  64. this.middleman = response.data.middleman;
  65. this.apply_at = this.middleman.apply_at.substring(0,10)
  66. }else {
  67. uni.showToast({
  68. title: '您还不是团长,现在前往申请页面',
  69. icon: 'none',
  70. duration: 1000
  71. });
  72. setTimeout(function(){
  73. uni.redirectTo({
  74. url: '/plugins/community/apply/apply'
  75. });
  76. },1000)
  77. }
  78. }else {
  79. uni.showToast({
  80. title: response.msg,
  81. icon: 'none',
  82. duration: 1000
  83. });
  84. }
  85. }).catch(response => {
  86. that.$hideLoading();
  87. });
  88. },
  89. }
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. .price-show {
  94. width: 702rpx;
  95. height: 256rpx;
  96. margin: 24rpx 24rpx;
  97. border-radius: 16rpx;
  98. background-color: #fff;
  99. .title {
  100. color: #999999;
  101. font-size: 24rpx;
  102. margin-bottom: 10rpx;
  103. }
  104. .price {
  105. color: #353535;
  106. font-size: 40rpx;
  107. font-family: DIN;
  108. }
  109. .cash-btn {
  110. font-size: 28rpx;
  111. padding: 0 24rpx;
  112. height: 46rpx;
  113. line-height: 44rpx;
  114. border-radius: 23rpx;
  115. border: 2rpx solid;
  116. margin-top: 30rpx;
  117. display: inline-block;
  118. }
  119. }
  120. .menu {
  121. border-radius: 16rpx;
  122. background-color: #fff;
  123. width: 702rpx;
  124. margin: 0 24rpx;
  125. .menu-item {
  126. padding: 32rpx;
  127. height: 96rpx;
  128. border-top: 2rpx solid #e2e2e2;
  129. font-size: 26rpx;
  130. color: #353535;
  131. &:first-of-type {
  132. border-top: 0;
  133. }
  134. image {
  135. width: 12rpx;
  136. height: 22rpx;
  137. display: block;
  138. }
  139. }
  140. }
  141. </style>