猫妈狗爸伴宠师小程序前端代码
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.

141 lines
2.7 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <!-- <div>提现</div> -->
  3. <view class="box">
  4. <view class="top" :style="{ borderRadius: '16rpx' }">
  5. <view class="">
  6. 提现金额
  7. </view>
  8. <view class="level">
  9. <view class="money level">
  10. <text>¥</text>
  11. <input v-model="form.amount" type="text" />
  12. </view>
  13. <!-- <DForm :list="state. " @submit="handleSubmit" /> -->
  14. </view>
  15. </view>
  16. </view>
  17. <view class="center">
  18. <view class="text">
  19. 提现说明
  20. </view>
  21. <view>
  22. 1单日提现次数上限为5次;·单笔提现上限200元;
  23. </view>
  24. <view>
  25. 2直接提现至微信账户无法提现至支付宝;
  26. </view>
  27. <view @click="handleSubmit" class="buttom level" :style="{ borderRadius: '41rpx' }">
  28. 提现
  29. </view>
  30. </view>
  31. <view class="">
  32. <!-- <u-popup :show="show" mode="center" @close="close" @open="open"> -->
  33. </view>
  34. </template>
  35. <script setup>
  36. import {
  37. reactive, ref , computed
  38. } from "vue";
  39. import DForm from "@/components/dForm/index.vue"
  40. import { cashOut } from "@/api/amount/index.js"
  41. import { useStore } from "vuex"
  42. const state = reactive({
  43. list: [{
  44. type: "input",
  45. key: "提现金额",
  46. placeholder: "请输入提现金额",
  47. }, ]
  48. })
  49. const store = useStore();
  50. const userInfo = computed(() => {
  51. return store.getters.userInfo
  52. })
  53. const form = ref({
  54. amount : ''
  55. })
  56. const handleSubmit = async (val) => {
  57. if(!form.value.amount) {
  58. return uni.showToast({
  59. title: '请填写提现金额',
  60. icon: "none"
  61. })
  62. }
  63. let response = await cashOut({
  64. ...form.value,
  65. type : 0,
  66. userId : userInfo.value.userId
  67. })
  68. }
  69. </script>
  70. <style scoped lang="scss">
  71. .box {
  72. width: 750rpx;
  73. height: 180rpx;
  74. background-image: linear-gradient(to bottom, #FFBF60, #FFFFFF);
  75. padding: 60rpx 24rpx 0 24rpx;
  76. box-sizing: border-box;
  77. }
  78. .top {
  79. width: 702rpx;
  80. height: 227rpx;
  81. background-color: #FFFFFF;
  82. padding: 24rpx 34rpx 0 34rpx;
  83. box-sizing: border-box;
  84. }
  85. .money {
  86. width: 550rpx;
  87. height: 71rpx;
  88. /* background-color: #FFBF60; */
  89. color: #FFBF60 !important;
  90. font-size: 54rpx !important;
  91. ;
  92. height: 71rpx;
  93. /* background-color: #FFBF60; */
  94. color: #FFBF60 !important;
  95. font-size: 54rpx !important;
  96. margin: 3% 0 0 5%;
  97. }
  98. .money input {
  99. margin-left: 5%;
  100. font-size: 61rpx;
  101. height: 71rpx;
  102. }
  103. .center {
  104. width: 100%;
  105. height: 1265rpx;
  106. background-color: #FFFFFF;
  107. font-size: 30rpx;
  108. color: #707070;
  109. padding: 84rpx 0 0 54rpx;
  110. box-sizing: border-box;
  111. line-height: 45rpx;
  112. }
  113. .text {
  114. color: #000000;
  115. font-weight: 700;
  116. margin-bottom: 30rpx;
  117. }
  118. .buttom {
  119. width: 544rpx;
  120. height: 89rpx;
  121. background-color: #FFBF60;
  122. color: #FFFFFF;
  123. font-size: 28rpx;
  124. line-height: 89rpx;
  125. margin: 800rpx 0 0 50rpx;
  126. justify-content: center;
  127. }
  128. .level {
  129. display: flex;
  130. }
  131. </style>