Procházet zdrojové kódy

充值点数,一块钱十点数,且至少充值10点数

lifanagju_citu před 9 měsíci
rodič
revize
7d753478a3

+ 3 - 1
src/utils/position.js

@@ -90,12 +90,14 @@ const getRation = async () => {
 }
 getRation()
 
+export const rechargeRatio = () => { return 10 }
+
 export const commissionCalculation = (count, type) => {
   if (!data || !Object.keys(data).length) return
   // 所占的百分比
   const ratio = parseFloat(data[list[type]]) / 100 // 所占的百分比-> 50%变为0.5 (不能改)
   // 积分变成金额
-  const value = count * ratio / 10
+  const value = count * ratio / rechargeRatio()
   return value % 1 === 0 ? Math.floor(value) : value.toFixed(2)
 }
 

+ 4 - 3
src/views/recruit/enterprise/memberCenter/tradingOrder/index.vue

@@ -31,7 +31,7 @@ import {
 import { ref } from 'vue'
 import { timesTampChange } from '@/utils/date'
 import { getDict } from '@/hooks/web/useDictionaries'
-import { payCalculation } from '@/utils/position'
+import { payCalculation, rechargeRatio } from '@/utils/position'
 
 const tab = ref('tab_transaction')
 const total = ref(0)
@@ -81,10 +81,11 @@ const headersList = {
     { title: '更新时间', key: 'updateTime', value: item =>  timesTampChange(item.updateTime), sortable: false },
   ],
   tab_recharge: [
+    { title: '充值点数', key: '点数', value: item => rechargeRatio()*payCalculation(item.payPrice, 'realPay'), sortable: false },
+    { title: '支付金额', key: 'payPrice', value: item => payCalculation(item.payPrice, 'realPay'), sortable: false },
     { title: '订单支付时间', key: 'payTime', value: item =>  timesTampChange(item.payTime), sortable: false },
-    { title: '实际支付金额', key: 'payPrice', value: item => payCalculation(item.payPrice, 'realPay'), sortable: false },
-    { title: '支付渠道名', key: 'payChannelName', sortable: false },
     { title: '支付成功的外部订单号', key: 'payOrderChannelOrderNo', sortable: false },
+    { title: '支付渠道名', key: 'payChannelName', sortable: false },
     // { title: '支付状态', key: 'payStatus', sortable: false },
     { title: '退款状态', key: 'refundStatus', value: item => pay_refund_status.value.find(e => e.value-0 === item.refundStatus-0)?.label, sortable: false },
     // { title: '用户实际到账余额', key: 'totalPrice', value: item => payCalculation(item.totalPrice, 'realPay'), sortable: false },