diff --git a/vue/gold-system/src/views/recharge/addRecharge.vue b/vue/gold-system/src/views/recharge/addRecharge.vue
index 1980aaf..b71a006 100644
--- a/vue/gold-system/src/views/recharge/addRecharge.vue
+++ b/vue/gold-system/src/views/recharge/addRecharge.vue
@@ -35,7 +35,7 @@ const addRecharge = ref({
rechargeWay: "客服充值",
freeGold: 0,
rechargeGold: 0,
- paidGold: "",
+ paidGold: 0,
});
// 这是添加充值信息的接口
const add = async function () {
@@ -411,8 +411,13 @@ const calculatedFreeGold = computed(() => {
if (!addRecharge.value.rechargeRatio == 0) {
const paidGold = Number(addRecharge.value.paidGold) || 0;
const activityId = Number(addRecharge.value.rechargeRatio) || 1; // 避免除以0
- console.log("看看有没拿到", addRecharge.value);
- return Math.ceil(paidGold / activityId);
+ const number = Number(paidGold / activityId); //计算总数
+ console.log("看看", number);
+ if (number < 1) {
+ return 0;
+ } else {
+ return Number(Math.ceil(number));
+ }
}
if (addRecharge.value.rechargeRatio == 0) {
const paidGold = Number(addRecharge.value.paidGold) || 0;
@@ -423,7 +428,7 @@ const calculatedRechargeGold = computed(() => {
if (!Rate.value == 0) {
const paidGold = Number(addRecharge.value.paidGold) || 0;
const rate = Number(Rate.value) || 1; // 避免乘以0
- return Math.ceil(paidGold * rate);
+ return Number(Math.ceil(paidGold * rate));
}
});
@@ -444,9 +449,10 @@ const deleteRecharge = function () {
rechargeWay: "客服充值",
freeGold: Number(0),
rechargeGold: 0,
- paidGold: "",
+ paidGold: Number(0),
};
imageUrl.value = "";
+ Rate.value = "";
};
// 批量充值
@@ -589,7 +595,7 @@ const calculatedRowRechargeGold = computed(() => {
if (!Rate.value == 0) {
const paidGold = Number(addRecharge.value.paidGold) || 0;
const rate = Number(Rate.value) || 1; // 避免乘以0
- return Math.ceil(paidGold * rate);
+ return Number(Math.ceil(paidGold * rate));
}
});
diff --git a/vue/gold-system/src/views/usergold/index.vue b/vue/gold-system/src/views/usergold/index.vue
index 02a1f6e..ff4466a 100644
--- a/vue/gold-system/src/views/usergold/index.vue
+++ b/vue/gold-system/src/views/usergold/index.vue
@@ -33,15 +33,15 @@ const getObj = ref({
// 支付方式选项
const updateType = [
{
- value: "充值",
+ value: "0",
label: "充值",
},
{
- value: "消费",
+ value: "1",
label: "消费",
},
{
- value: "退款",
+ value: "2",
label: "退款",
},
];
@@ -277,9 +277,11 @@ onMounted(async function () {
{{
- scope.row.rechargeCoin +
- scope.row.freeCoin +
- scope.row.taskCoin
+ Math.abs(
+ scope.row.rechargeCoin +
+ scope.row.freeCoin +
+ scope.row.taskCoin
+ )
}}
@@ -297,9 +299,21 @@ onMounted(async function () {
-
-
-
+
+
+ {{ Math.abs(scope.row.freeCoin) }}
+
+
+
+
+ {{ Math.abs(scope.row.rechargeCoin) }}
+
+
+
+
+ {{ Math.abs(scope.row.taskCoin) }}
+
+