裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
3.6 KiB

  1. <template>
  2. <view class="page">
  3. <navbar title="提现" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="content">
  5. <view class="card info">
  6. <view class="info-row">
  7. <view class="flex">
  8. <text class="unit"></text>
  9. <uv-input
  10. v-model="money"
  11. placeholder="请输入提现金额"
  12. :placeholderStyle="{
  13. color: '#999999',
  14. fontSize: '38rpx',
  15. fontWight: 900,
  16. }"
  17. :customStyle="{
  18. flex: 1,
  19. padding: 0,
  20. fontWight: 900,
  21. }"
  22. fontSize="38rpx"
  23. color="#1B1B1B"
  24. border="none"
  25. focus
  26. ></uv-input>
  27. <button plain class="btn-simple btn-withdraw" @click="allIn">全部提现</button>
  28. </view>
  29. <view class="account">{{ `可用金额:¥${userInfoVip.money || 0}` }}</view>
  30. </view>
  31. <!-- 不需要授权 -->
  32. <!-- <view class="info-row">
  33. <view class="flex title">
  34. <text>提现至</text>
  35. <image class="icon-wx" src="../static/center/wx.png"></image>
  36. <text>微信</text>
  37. <txt>本人已实名微信账号</txt>
  38. </view>
  39. <view class="flex">
  40. <view class="desc">余额提现至微信钱包提现限额2000元/日次日00:00恢复提现额度</view>
  41. <button plain class="btn-auth">去授权</button>
  42. </view>
  43. </view> -->
  44. </view>
  45. <button class="btn-submit" @click="onConfirm">确定</button>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import { mapState } from 'vuex'
  51. export default {
  52. data() {
  53. return {
  54. money: null,
  55. }
  56. },
  57. computed: {
  58. ...mapState(['userInfoVip']),
  59. },
  60. methods: {
  61. allIn() {
  62. this.money = this.userInfoVip.money || 0
  63. },
  64. async onConfirm() {
  65. try {
  66. await this.$fetch('openMoney', { money: this.money })
  67. uni.showToast({
  68. title: '提现成功',
  69. icon: 'none'
  70. })
  71. setTimeout(uni.navigateBack, 1000, -1)
  72. } catch (err) {
  73. }
  74. },
  75. },
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .page {
  80. background-color: $uni-bg-color;
  81. }
  82. .content {
  83. padding: 20rpx;
  84. }
  85. .info {
  86. border-radius: 16rpx;
  87. padding: 60rpx 24rpx 50rpx 24rpx;
  88. color: #999999;
  89. font-size: 28rpx;
  90. &-row {
  91. padding: 0 17rpx 0 19rpx;
  92. & + & {
  93. margin-top: 30rpx;
  94. border-top: 1rpx solid #CCCCCC;
  95. padding-top: 33rpx;
  96. }
  97. .title {
  98. justify-content: flex-start;
  99. color: #666666;
  100. font-weight: 700;
  101. margin-bottom: 15rpx;
  102. }
  103. .desc {
  104. flex: 1;
  105. font-size: 24rpx;
  106. }
  107. }
  108. .unit {
  109. color: #1B1B1B;
  110. font-size: 38rpx;
  111. font-weight: 900;
  112. margin-right: 13rpx;
  113. }
  114. .account {
  115. padding-left: 19rpx;
  116. margin-top: 21rpx;
  117. }
  118. .icon-wx {
  119. width: 40rpx;
  120. height: 34rpx;
  121. margin: 0 8rpx;
  122. }
  123. .btn {
  124. &-withdraw {
  125. color: #04D6A3;
  126. font-weight: 700;
  127. font-size: 28rpx;
  128. }
  129. &-auth {
  130. color: #04D6A3;
  131. border-color: #04D6A3;
  132. font-size: 28rpx;
  133. line-height: 1;
  134. padding: 12rpx 34rpx;
  135. width: auto;
  136. height: auto;
  137. box-sizing: border-box;
  138. border-radius: 33rpx;
  139. margin-left: 22rpx;
  140. }
  141. }
  142. }
  143. .btn-submit {
  144. width: calc(100% - 40rpx);
  145. height: 90rpx;
  146. background-color: $uni-bg-color-highlight;
  147. color: $uni-text-color-highlight;
  148. font-size: 36rpx;
  149. border-radius: 45rpx;
  150. position: fixed;
  151. bottom: 159rpx;
  152. left: 20rpx;
  153. }
  154. </style>