index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <app-layout>
  3. <view class="container dir-top-wrap cross-center">
  4. <view class="price-box dir-top-wrap cross-center ">
  5. <view class="title">账户剩余金额</view>
  6. <view class="price">¥{{overage}}</view>
  7. <view class="desc">微信线下打款</view>
  8. </view>
  9. <view class="tips dir-top-wrap cross-center">
  10. <text>{{desc}}</text>
  11. </view>
  12. <u-button shape="circle"
  13. type="success"
  14. hover-class="none"
  15. :custom-style="btnStyle"
  16. @click="handleWithdraw"
  17. >提现</u-button>
  18. </view>
  19. </app-layout>
  20. </template>
  21. <script>
  22. import appLayout from "@/components/app-layout"
  23. export default {
  24. components:{
  25. appLayout,
  26. },
  27. data() {
  28. return {
  29. overage: 0,
  30. desc: '',
  31. }
  32. },
  33. methods: {
  34. handleWithdraw(){
  35. if(this.overage > 0){
  36. this.$jump({url:'/pages/price/apply',type:'to'})
  37. }else{
  38. this.$u.toast("暂无可提现金额");
  39. }
  40. },
  41. getSetting(){
  42. this.$u.api.settingGet().then(data => {
  43. this.setting = data;
  44. })
  45. },
  46. getOverage(){
  47. this.$u.api.userOverage().then(res => {
  48. this.overage = res.overage
  49. this.desc = res.desc
  50. })
  51. }
  52. },
  53. computed:{
  54. btnStyle() {
  55. return {
  56. border:'none',
  57. background:'linear-gradient(90deg, rgba(196,146,68,1) 0%, rgba(225,193,117,1) 100%, rgba(225,193,117,1) 100%)',
  58. width: '600rpx',
  59. padding: '36rpx 0',
  60. height: '100rpx',
  61. fontSize: '36rpx',
  62. fontWeight: 600
  63. };
  64. }
  65. },
  66. onLoad(){
  67. this.getOverage();
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .price-box{
  73. background: #fff;
  74. width: 650rpx;
  75. border-radius: 16rpx;
  76. margin: 32rpx 0;
  77. padding: 48rpx 0;
  78. .title{
  79. color: #333333;
  80. font-weight: 600;
  81. font-size: 30rpx;
  82. }
  83. .price{
  84. color: #c49244;
  85. font-size: 64rpx;
  86. font-weight: bold;
  87. margin: 24rpx 0 12rpx;
  88. &:first-letter{
  89. font-size: .6em;
  90. }
  91. }
  92. .desc{
  93. color: #c49244;
  94. font-size: 28rpx;
  95. }
  96. }
  97. .tips{
  98. color: #666666;
  99. margin: 12rpx 0 52rpx;
  100. line-height: 1.8em;
  101. }
  102. </style>