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

157 lines
2.9 KiB

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