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

153 lines
2.8 KiB

3 months ago
2 months ago
3 months ago
3 months ago
3 months ago
2 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 >
  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 >
  32. <!-- <u-popup :show="show" mode="center" @close="close" @open="open"> -->
  33. </view>
  34. </template>
  35. <script setup>
  36. import {
  37. reactive,
  38. ref,
  39. computed
  40. } from "vue";
  41. import DForm from "@/components/dForm/index.vue"
  42. import {
  43. cashOut
  44. } from "@/api/amount/index.js"
  45. import {
  46. useStore
  47. } from "vuex"
  48. const state = reactive({
  49. list: [{
  50. type: "input",
  51. key: "提现金额",
  52. placeholder: "请输入提现金额",
  53. }, ]
  54. })
  55. const store = useStore();
  56. const userInfo = computed(() => {
  57. return store.getters.userInfo
  58. })
  59. const form = ref({
  60. amount: ''
  61. })
  62. const handleSubmit = async (val) => {
  63. if (!form.value.amount) {
  64. return uni.showToast({
  65. title: '请填写提现金额',
  66. icon: "none"
  67. })
  68. }
  69. let response = await cashOut({
  70. ...form.value,
  71. type: 0,
  72. userId: userInfo.value.userId
  73. })
  74. if (response.code == 200) {
  75. uni.showToast({
  76. title: response.msg,
  77. icon: "none"
  78. })
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .box {
  84. width: 750rpx;
  85. height: 180rpx;
  86. background-image: linear-gradient(to bottom, #FFBF60, #FFFFFF);
  87. padding: 60rpx 24rpx 0 24rpx;
  88. box-sizing: border-box;
  89. }
  90. .top {
  91. width: 702rpx;
  92. height: 227rpx;
  93. background-color: #FFFFFF;
  94. padding: 24rpx 34rpx 0 34rpx;
  95. box-sizing: border-box;
  96. }
  97. .money {
  98. width: 550rpx;
  99. height: 71rpx;
  100. /* background-color: #FFBF60; */
  101. color: #FFBF60 !important;
  102. font-size: 54rpx !important;
  103. ;
  104. height: 71rpx;
  105. /* background-color: #FFBF60; */
  106. color: #FFBF60 !important;
  107. font-size: 54rpx !important;
  108. margin: 3% 0 0 5%;
  109. }
  110. .money input {
  111. margin-left: 5%;
  112. font-size: 61rpx;
  113. height: 71rpx;
  114. }
  115. .center {
  116. width: 100%;
  117. height: 1265rpx;
  118. background-color: #FFFFFF;
  119. font-size: 30rpx;
  120. color: #707070;
  121. padding: 84rpx 0 0 54rpx;
  122. box-sizing: border-box;
  123. line-height: 45rpx;
  124. }
  125. .text {
  126. color: #000000;
  127. font-weight: 700;
  128. margin-bottom: 30rpx;
  129. }
  130. .buttom {
  131. width: 544rpx;
  132. height: 89rpx;
  133. background-color: #FFBF60;
  134. color: #FFFFFF;
  135. font-size: 28rpx;
  136. line-height: 89rpx;
  137. margin: 800rpx 0 0 50rpx;
  138. justify-content: center;
  139. }
  140. .level {
  141. display: flex;
  142. }
  143. </style>