index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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>提现说明:提现后将在7个工作日打款</text>
  11. <text>客服热线:32429</text>
  12. </view>
  13. <u-button shape="circle"
  14. type="success"
  15. hover-class="none"
  16. :custom-style="btnStyle"
  17. @click="handleWithdraw"
  18. >提现</u-button>
  19. </view>
  20. </app-layout>
  21. </template>
  22. <script>
  23. import appLayout from "@/components/app-layout"
  24. export default {
  25. components:{
  26. appLayout,
  27. },
  28. data() {
  29. return {
  30. overage: 0
  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. })
  50. }
  51. },
  52. computed:{
  53. btnStyle() {
  54. return {
  55. border:'none',
  56. background:'linear-gradient(90deg, rgba(196,146,68,1) 0%, rgba(225,193,117,1) 100%, rgba(225,193,117,1) 100%)',
  57. width: '600rpx',
  58. padding: '36rpx 0',
  59. height: '100rpx',
  60. fontSize: '36rpx',
  61. fontWeight: 600
  62. };
  63. }
  64. },
  65. onLoad(){
  66. this.getOverage();
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .price-box{
  72. background: #fff;
  73. width: 650rpx;
  74. border-radius: 16rpx;
  75. margin: 32rpx 0;
  76. padding: 48rpx 0;
  77. .title{
  78. color: #333333;
  79. font-weight: 600;
  80. font-size: 30rpx;
  81. }
  82. .price{
  83. color: #c49244;
  84. font-size: 64rpx;
  85. font-weight: bold;
  86. margin: 24rpx 0 12rpx;
  87. &:first-letter{
  88. font-size: .6em;
  89. }
  90. }
  91. .desc{
  92. color: #c49244;
  93. font-size: 28rpx;
  94. }
  95. }
  96. .tips{
  97. color: #666666;
  98. margin: 12rpx 0 52rpx;
  99. line-height: 1.8em;
  100. }
  101. </style>