diff --git a/gold-system/.env.development b/gold-system/.env.development index 8f4a152..04270cc 100644 --- a/gold-system/.env.development +++ b/gold-system/.env.development @@ -1 +1,2 @@ VITE_API_BASE='http://54.251.137.151:10704/' +# VITE_API_BASE='http://192.168.8.94:8080/' \ No newline at end of file diff --git a/gold-system/.env.test b/gold-system/.env.test index 8f4a152..04270cc 100644 --- a/gold-system/.env.test +++ b/gold-system/.env.test @@ -1 +1,2 @@ VITE_API_BASE='http://54.251.137.151:10704/' +# VITE_API_BASE='http://192.168.8.94:8080/' \ No newline at end of file diff --git a/gold-system/src/views/audit/rechargeAudit.vue b/gold-system/src/views/audit/rechargeAudit.vue index d54379d..1b74d17 100644 --- a/gold-system/src/views/audit/rechargeAudit.vue +++ b/gold-system/src/views/audit/rechargeAudit.vue @@ -98,6 +98,10 @@ const trueGold = ref(0) const trueCount = ref(0) const trueRGold = ref(0) const trueFGold = ref(0) +// 转化一下,保留两位小数,展示时填充转化后的变量名 +const formattedTrueGold = computed(() => trueGold.value.toFixed(2)) +const formattedTrueRGold = computed(() => trueRGold.value.toFixed(2)) +const formattedTrueFGold = computed(() => trueFGold.value.toFixed(2)) // 待审核条数 const pendingCount = ref(0) // 待审核金币数 @@ -215,6 +219,7 @@ const get = async function (val) { } // 搜索 const search = function () { + trimJwCode(); getObj.value.pageNum = 1 get() } @@ -410,7 +415,7 @@ const pass = function (row) { passObj.value = row passObj.value.adminId = adminData.value.adminId passObj.value.auditId = row.auditId - passObj.value.status = 1 + // passObj.value.status = 1 passObj.value.rechargeId = row.rechargeId passObj.value.detailId = row.detailId passObj.value.jwcode = row.jwcode @@ -424,6 +429,8 @@ const pass = function (row) { // 通过确认 const passConfirm = async function () { try { + // 也许大概应该在点击确认时改变状态 + passObj.value.status = 1 console.log('通过对象', passObj.value) // 发送POST请求 // passObj.value.flag = 0; @@ -442,8 +449,12 @@ const passConfirm = async function () { message: '通过成功!' }) } catch (error) { - console.log('请求失败', error) - // 在这里可以处理错误逻辑,比如显示错误提示等 + console.error('请求失败', error); + // 提示网络请求错误 + ElMessage({ + type: 'error', + message: '网络请求出错,请检查网络连接!' + }); } } @@ -538,6 +549,13 @@ const handleSortChange = (column) => { sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC' get() } + +// 精网号去空格 +const trimJwCode = () => { + if (rechargeVo.value.jwcode) { + rechargeVo.value.jwcode = rechargeVo.value.jwcode.replace(/\s/g, ''); + } +}