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

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months 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 class="">
  6. 提现金额
  7. </view>
  8. <view class="level">
  9. <view class="money level">
  10. <text>¥</text>
  11. <up-input class="amount" placeholderClass="placeInput" placeholder="请输入提现金额" clearable fontSize="34rpx"
  12. border="bottom" type="number" color="#FF2742" v-model="num"></up-input>
  13. </view>
  14. <!-- <DForm :list="state. " @submit="handleSubmit" /> -->
  15. </view>
  16. </view>
  17. </view>
  18. <view class="center">
  19. <view class="text">
  20. 提现说明
  21. </view>
  22. <view>
  23. 1单日提现次数上限为5次;单笔提现上限200元;
  24. </view>
  25. <view>
  26. 2直接提现至微信账户无法提现至支付宝;
  27. </view>
  28. <up-button class="buttom" type="warning" text="提现" shape="circle" @click="cashClick"></up-button>
  29. </view>
  30. <uni-popup ref="inputDialogRef" type="dialog">
  31. <uni-popup-dialog ref="inputClose" mode="input" title="提现" v-model="fullName" placeholder="请输入姓名"
  32. @confirm="dialogInputConfirm" @close="close" :before-close="true"></uni-popup-dialog>
  33. </uni-popup>
  34. </template>
  35. <script setup>
  36. import {
  37. ref
  38. } from "vue"
  39. const num = ref('');;
  40. const fullName = ref('')
  41. const inputDialogRef = ref(null)
  42. const inputClose = ref(null)
  43. const cashClick = () => {
  44. if (num.value) {
  45. fullName.value = ''
  46. inputDialogRef.value.open()
  47. } else {
  48. uni.showToast({
  49. icon: 'error',
  50. title: '金额不能为空',
  51. duration: 2000
  52. })
  53. }
  54. }
  55. const dialogInputConfirm = (val) => {
  56. if (val) {
  57. uni.showToast({
  58. icon: 'success',
  59. title: '提现成功',
  60. duration: 2000
  61. })
  62. fullName.value = val
  63. inputClose.value.close()
  64. fullName.value = ''
  65. } else {
  66. uni.showToast({
  67. icon: 'error',
  68. title: '请输入姓名',
  69. duration: 2000
  70. })
  71. }
  72. }
  73. const close = () => {
  74. inputDialogRef.value.close()
  75. fullName.value = ''
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .box {
  80. width: 750rpx;
  81. height: 180rpx;
  82. background-image: linear-gradient(to bottom, #FFBF60, #FFFFFF);
  83. padding: 60rpx 24rpx 0 24rpx;
  84. box-sizing: border-box;
  85. }
  86. .top {
  87. width: 702rpx;
  88. height: 227rpx;
  89. background-color: #FFFFFF;
  90. padding: 24rpx 34rpx 0 34rpx;
  91. box-sizing: border-box;
  92. }
  93. .money {
  94. width: 550rpx;
  95. height: 71rpx;
  96. /* background-color: #FFBF60; */
  97. color: red !important;
  98. font-size: 54rpx !important;
  99. margin: 3% 0 0 5%;
  100. font-weight: 700;
  101. .amount {
  102. margin-left: 5%;
  103. height: 71rpx;
  104. }
  105. .placeInput {
  106. font-weight: 100;
  107. }
  108. }
  109. .center {
  110. width: 100%;
  111. height: 100vh;
  112. background-color: #FFFFFF;
  113. font-size: 30rpx;
  114. color: #707070;
  115. padding: 0 50rpx;
  116. ;
  117. box-sizing: border-box;
  118. margin-top: 80rpx;
  119. }
  120. .text {
  121. color: #000000;
  122. font-weight: 700;
  123. margin-bottom: 30rpx;
  124. }
  125. .buttom {
  126. width: 544rpx;
  127. height: 89rpx;
  128. background-color: #FFBF60;
  129. color: #FFFFFF;
  130. font-size: 28rpx;
  131. border-radius: 41rpx;
  132. margin-top: 300rpx;
  133. }
  134. .level {
  135. display: flex;
  136. }
  137. </style>