瑶都万能墙
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.

224 lines
4.9 KiB

1 year ago
7 months ago
1 year ago
4 months ago
1 year ago
1 year ago
7 months ago
1 year ago
7 months ago
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
4 months ago
1 year ago
7 months ago
7 months ago
4 months ago
7 months ago
7 months ago
4 months ago
7 months ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="purse">
  3. <navbar title="立即提现" leftClick @leftClick="$utils.navigateBack" />
  4. <!-- 水洗店 -->
  5. <view class="userShop">
  6. <userShopCommission purse/>
  7. </view>
  8. <view class="from-body">
  9. <view>我要提现</view>
  10. <view class="from-line">
  11. <input placeholder="请输入提现金额" v-model="form.price"/>
  12. </view>
  13. <view class="from-line">
  14. <input placeholder="请输入姓名(选填)" v-model="form.name"/>
  15. </view>
  16. <!-- 手续费和最低提现金额提示 -->
  17. <view class="fee-info">
  18. <view class="fee-item">
  19. <text class="fee-label">手续费</text>
  20. <text class="fee-value">{{ withdrawalFeePercent }} ({{ withdrawalFeeAmount }})</text>
  21. </view>
  22. <view class="fee-item">
  23. <text class="fee-label">最低提现金额</text>
  24. <text class="fee-value">2</text>
  25. </view>
  26. </view>
  27. <!-- <view class="from-line">
  28. <input placeholder="请输入开户行" />
  29. </view>
  30. <view class="from-line">
  31. <input placeholder="请输入银行卡卡号" />
  32. </view> -->
  33. <!-- <view class="mt56">提现说明</view>
  34. <view
  35. style="line-height: 45rpx; font-size: 24rpx;color: #666666;"
  36. v-html="notice">
  37. </view> -->
  38. </view>
  39. <view style="padding: 30rpx;">
  40. <uv-parse :content="configListMax.withdraw_money.keyDetails"></uv-parse>
  41. </view>
  42. <view class="b-fiexd">
  43. <view class="button-submit"
  44. @click="submit">提交</view>
  45. </view>
  46. <!-- 加入我们 -->
  47. <certificationPopup ref="certificationPopup" />
  48. </view>
  49. </template>
  50. <script>
  51. import userShopCommission from '@/components/userShop/userShopCommission.vue'
  52. import certificationPopup from '@/components/user/certificationPopup.vue'
  53. import { mapState } from 'vuex'
  54. export default {
  55. components: {
  56. userShopCommission,
  57. certificationPopup,
  58. },
  59. computed: {
  60. ...mapState(['configListMax']),
  61. // 计算手续费百分比(从获取,转换为百分比显示)
  62. withdrawalFeePercent() {
  63. const feeRate = this.configListMax.withdraw_money?.keyMoney || 0
  64. return (feeRate * 100).toFixed(1) + '%'
  65. },
  66. // 计算实际手续费金额
  67. withdrawalFeeAmount() {
  68. if (!this.form.price) return '0.00'
  69. const feeRate = this.configListMax.withdraw_money?.keyMoney || 0
  70. const amount = parseFloat(this.form.price) * feeRate
  71. return amount.toFixed(2)
  72. }
  73. },
  74. data() {
  75. return {
  76. notice : '',
  77. form:{
  78. price:null,
  79. name:'',
  80. }
  81. }
  82. },
  83. methods: {
  84. submit() {
  85. if(this.userInfo.idCardOpen == 0){
  86. uni.showToast({
  87. title: '认证审核中...',
  88. icon:'none'
  89. })
  90. return
  91. }else if(!this.userInfo.idCardOpen){
  92. this.$refs.certificationPopup.open()
  93. return
  94. }
  95. if (this.$utils.verificationAll(this.form, {
  96. price: '请输入提现金额',
  97. // name: '请输入姓名',
  98. })) {
  99. return
  100. }
  101. // 验证最低提现金额
  102. if (!this.form.price || parseFloat(this.form.price) < 2) {
  103. uni.showToast({
  104. title: '最低提现金额为2元',
  105. icon: 'none'
  106. })
  107. return
  108. }
  109. this.$api('storeWithdrawalApplication', this.form, res => {
  110. if (res.code == 200) {
  111. uni.showToast({
  112. title: '提交成功,待后台审核!',
  113. icon: 'none',
  114. })
  115. this.$store.commit('getUserInfo')
  116. setTimeout(uni.redirectTo, 800, {
  117. url: '/pages_order/mine/runningWater?status=0'
  118. })
  119. }
  120. })
  121. },
  122. }
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. .purse{
  127. min-height: 100vh;
  128. background-color: #ffffff;
  129. .from-body {
  130. padding: 40rpx 20rpx;
  131. font-size: 28rpx;
  132. font-family: PingFang SC, PingFang SC-Bold;
  133. font-weight: 700;
  134. text-align: left;
  135. color: #333333;
  136. line-height: 40px;
  137. padding-bottom: 60rpx;
  138. .from-line {
  139. margin-top: 40rpx;
  140. }
  141. input {
  142. width: 612rpx;
  143. height: 90rpx;
  144. line-height: 90rpx;
  145. background: #F5F5F5;
  146. border-radius: 46rpx;
  147. padding: 0 50rpx;
  148. font-size: 28rpx;
  149. font-family: PingFang SC, PingFang SC-Regular;
  150. font-weight: 400;
  151. text-align: left;
  152. color: #333;
  153. }
  154. .fee-info {
  155. margin-top: 40rpx;
  156. padding: 30rpx;
  157. background: #F8F9FA;
  158. border-radius: 20rpx;
  159. .fee-item {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. margin-bottom: 20rpx;
  164. &:last-child {
  165. margin-bottom: 0;
  166. }
  167. .fee-label {
  168. font-size: 26rpx;
  169. color: #666666;
  170. }
  171. .fee-value {
  172. font-size: 26rpx;
  173. color: $uni-color;
  174. font-weight: 600;
  175. }
  176. }
  177. }
  178. }
  179. .button-submit {
  180. width: 596rpx;
  181. height: 90rpx;
  182. line-height: 90rpx;
  183. background: $uni-color;
  184. border-radius: 46rpx;
  185. margin: 20rpx auto;
  186. font-size: 28rpx;
  187. font-family: PingFang SC, PingFang SC-Regular;
  188. font-weight: 400;
  189. text-align: center;
  190. color: #ffffff;
  191. }
  192. }
  193. </style>