Browse Source

feat(提现): 添加提现手续费和最低金额限制

在提现页面添加手续费计算和最低提现金额验证
更新用户佣金组件以支持积分显示
将外卖配送选项改为线上发货并移除到店自提
master
主管理员 3 days ago
parent
commit
293e1b3468
5 changed files with 96 additions and 17 deletions
  1. +9
    -3
      components/userShop/userShopCommission.vue
  2. +10
    -7
      pages_order/components/list/gourmet/productSubmit.vue
  3. +7
    -5
      pages_order/components/product/submitUnitSelect.vue
  4. +69
    -1
      pages_order/mine/purse.vue
  5. +1
    -1
      pages_order/mine/runningWater.vue

+ 9
- 3
components/userShop/userShopCommission.vue View File

@ -3,10 +3,10 @@
<image src="/static/image/center/10.png" mode=""></image>
<view class="price">
<view class="title">
余额
{{ type == '1' ? '积分' : '余额(元)' }}
</view>
<view class="num">
{{ userInfo.price }}
{{ type == '1' ? userInfo.integerPrice : userInfo.price + '元' }}
</view>
</view>
@ -18,7 +18,7 @@
</view> -->
<view class="btn"
v-if="!purse"
v-if="!purse && type != '1'"
@click="toPurse">
提现
</view>
@ -32,6 +32,12 @@
purse : {
default : false,
},
type : {
type : String,
default : '0',
},
},
computed: {
},
data() {
return {


+ 10
- 7
pages_order/components/list/gourmet/productSubmit.vue View File

@ -12,20 +12,23 @@
:class="['option', { active: deliveryMethod == '0' }]"
@click="selectDeliveryMethod('0')"
>
<view class="icon">🚚</view>
<view class="text">外卖配送</view>
<!-- <view class="icon">🚚</view>
<view class="text">外卖配送</view> -->
<view class="icon">📦</view>
<view class="text">线上发货</view>
</view>
<view
<!-- <view
:class="['option', { active: deliveryMethod == '1' }]"
@click="selectDeliveryMethod('1')"
>
<view class="icon">🏪</view>
<view class="text">到店自提</view>
</view>
</view> -->
</view>
</view>
<!-- 地址外卖显示 -->
<!-- 地址线上发货显示 -->
<view class="address" @click="openAddress" v-if="deliveryMethod == '0'">
<image src="/static/image/address/selectIcon.png" mode=""></image>
<view>
@ -97,7 +100,7 @@
</view>
</view>
<view v-if="deliveryMethod === '0'">
<view v-if="deliveryMethod === '0' && priceMap.pei_money > 0">
<view class="">
配送费
</view>
@ -260,7 +263,7 @@
deliveryMethod: this.deliveryMethod
}
//
// 线
if (this.deliveryMethod === '0') {
if (!this.address.id) {
return uni.showToast({


+ 7
- 5
pages_order/components/product/submitUnitSelect.vue View File

@ -12,9 +12,10 @@
:class="['option', { active: deliveryMethod === '0' }]"
@click="selectDeliveryMethod('0')"
>
<view class="icon">🚚</view>
<view class="text">外卖配送</view>
<view class="icon">📦</view>
<view class="text">线上发货</view>
</view>
<!-- 注释掉到店自提选项
<view
:class="['option', { active: deliveryMethod === '1' }]"
@click="selectDeliveryMethod('1')"
@ -22,10 +23,11 @@
<view class="icon">🏪</view>
<view class="text">到店自提</view>
</view>
-->
</view>
</view>
<!-- 地址外卖显示 -->
<!-- 地址线上发货显示 -->
<view class="address"
@click="openAddress"
v-if="deliveryMethod === '0'">
@ -228,7 +230,7 @@
deliveryMethod: this.deliveryMethod
}
//
// 线
if (this.deliveryMethod === 'delivery') {
if (!this.address.id) {
return uni.showToast({
@ -257,7 +259,7 @@
deliveryMethod: this.deliveryMethod
}
//
// 线
if (this.deliveryMethod == '0') {
if (!this.address.id) {
return uni.showToast({


+ 69
- 1
pages_order/mine/purse.vue View File

@ -15,6 +15,19 @@
<view class="from-line">
<input placeholder="请输入姓名(选填)" v-model="form.name"/>
</view>
<!-- 手续费和最低提现金额提示 -->
<view class="fee-info">
<view class="fee-item">
<text class="fee-label">手续费</text>
<text class="fee-value">{{ withdrawalFeePercent }} ({{ withdrawalFeeAmount }})</text>
</view>
<view class="fee-item">
<text class="fee-label">最低提现金额</text>
<text class="fee-value">2</text>
</view>
</view>
<!-- <view class="from-line">
<input placeholder="请输入开户行" />
</view>
@ -29,7 +42,7 @@
</view>
<view style="padding: 30rpx;">
<uv-parse :content="configList.withdraw_money"></uv-parse>
<uv-parse :content="configListMax.withdraw_money.keyDetails"></uv-parse>
</view>
@ -47,11 +60,27 @@
<script>
import userShopCommission from '@/components/userShop/userShopCommission.vue'
import certificationPopup from '@/components/user/certificationPopup.vue'
import { mapState } from 'vuex'
export default {
components: {
userShopCommission,
certificationPopup,
},
computed: {
...mapState(['configListMax']),
//
withdrawalFeePercent() {
const feeRate = this.configListMax.withdraw_money?.keyMoney || 0
return (feeRate * 100).toFixed(1) + '%'
},
//
withdrawalFeeAmount() {
if (!this.form.price) return '0.00'
const feeRate = this.configListMax.withdraw_money?.keyMoney || 0
const amount = parseFloat(this.form.price) * feeRate
return amount.toFixed(2)
}
},
data() {
return {
notice : '',
@ -81,6 +110,16 @@
})) {
return
}
//
if (!this.form.price || parseFloat(this.form.price) < 2) {
uni.showToast({
title: '最低提现金额为2元',
icon: 'none'
})
return
}
this.$api('storeWithdrawalApplication', this.form, res => {
if (res.code == 200) {
uni.showToast({
@ -135,6 +174,35 @@
text-align: left;
color: #333;
}
.fee-info {
margin-top: 40rpx;
padding: 30rpx;
background: #F8F9FA;
border-radius: 20rpx;
.fee-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
.fee-label {
font-size: 26rpx;
color: #666666;
}
.fee-value {
font-size: 26rpx;
color: $uni-color;
font-weight: 600;
}
}
}
}
.button-submit {


+ 1
- 1
pages_order/mine/runningWater.vue View File

@ -2,7 +2,7 @@
<view class="running-water">
<navbar :title="title[status]" leftClick @leftClick="leftClick" />
<userShopCommission/>
<userShopCommission :type="status" />
<view class="tab-box">
<view class="tab-box1">


Loading…
Cancel
Save