- 消耗金额:{{ Math.abs(sumGold) }}新币,永久金币:{{ Math.abs(permanentGolds) }},免费金币:{{
- Math.abs(freeGolds)
- }},任务金币:{{ Math.abs(taskGolds) }}
+ 消耗金额:{{ Math.abs(sumGold) / 100 }}新币,永久金币:{{ Math.abs(permanentGolds) / 100 }},免费金币:{{
+ Math.abs(freeGolds) / 100
+ }},任务金币:{{ Math.abs(taskGolds) / 100 }}
@@ -607,10 +603,15 @@ onMounted(async function () {
{{ scope.row.payPlatform }}
-
+
+
-
+
@@ -628,11 +629,11 @@ onMounted(async function () {
- {{ scope.row.permanentGold }}
+ {{ scope.row.permanentGold / 100 }}
- {{ scope.row.freeGold }}
+ {{ scope.row.freeGold / 100 }}
- {{ scope.row.taskGold }}
+ {{ scope.row.taskGold / 100 }}
@@ -666,7 +667,7 @@ onMounted(async function () {
diff --git a/src/views/managerecharge/rate.vue b/src/views/managerecharge/rate.vue
index 5d5a4a5..6938fb2 100644
--- a/src/views/managerecharge/rate.vue
+++ b/src/views/managerecharge/rate.vue
@@ -35,48 +35,6 @@ const getObj = ref({
const total = ref(0)
-
-const getAllRate = async function (val) {
- try {
- // 搜索参数页码赋值
- if (typeof val === 'number') {
- getObj.value.pageNum = val;
- }
-
- // 发送POST请求
- const result = await request({
- url: 'http://18.143.76.3:10704/rate/selectAll',
- method: 'POST',
- data: {
- pageNum: getObj.value.pageNum,
- pageSize: getObj.value.pageSize,
- }
- });
-
- // 将响应结果存储到响应式数据中
- console.log('这是汇率列表 请求成功', result);
-
- // 存储表格数据
- tableData.value = result.data.list;
- // 存储分页总条目
- total.value = result.data.total;
-
- } catch (error) {
- console.log('请求失败', error);
- ElMessage.error('请求失败');
- }
-}
-
-const handlePageSizeChange = function (val) {
- getObj.value.pageSize = val
- getAllRate()
-}
-
-const handleCurrentChange = function (val) {
- getObj.value.pageNum = val
- getAllRate()
-}
-
// 编辑方法 表单
const rateEdit = ref({
id: null,
@@ -85,82 +43,8 @@ const rateEdit = ref({
adminId: null,
updateTime: Date.now(),
})
-
-//查询已有的数据
-const getEditData = async function (row) {
- try {
- console.log('搜索参数', getObj.value)
- // 发送POST请求
- const result = await request({
- url: 'http://18.143.76.3:10704/rate/selectById',
- data: {id: row.id}
- })
-
- // 将响应结果存储到响应式数据中
- console.log('根据id查 请求成功', result)
- // 存储表格数据
- // rateEdit.value = result.data
- // 只赋部分的
- rateEdit.value.id = row.id
- rateEdit.value.rateName = row.rateName
- rateEdit.value.num = row.num
- console.log('根据id获取的数据', rateEdit.value)
- rateEdit.value.adminId = adminData.value.adminId
-
- } catch (error) {
- console.log('请求失败', error)
- }
-}
-
-const editRate = async function () {
- try {
- console.log('搜索参数', rateEdit.value)
- // 发送POST请求
- const result = await request({
- url: 'http://18.143.76.3:10704/rate/update',
- data: rateEdit.value
- })
- // 将响应结果存储到响应式数据中
- console.log('请求成功', result)
- await getAllRate()
- } catch (error) {
- console.log('请求失败', error)
- }
-}
-const edit = () => {
- ElMessageBox.confirm('确认修改?')
- .then(() => {
- editRate()
- regeEdit.value = false
- })
- .catch(() => {
- regeEdit.value = false
- })
-}
-
-// 关闭编辑弹窗时重置表单
-const cancelEdit = () => {
- regeEdit.value = false
-
-}
-
-
-const handleEditDialogClose = () => {
- if (editFormRef.value) {
- getAllRate()
- }
-}
-
-
-// 挂载
-onMounted(async function () {
- await getAllRate()
- await getAdminData()
-})
-
-
//货币条目
-const rateName = [
+const rateNames = [
{
value: 'USD',
label: 'USD'
@@ -246,7 +130,7 @@ const getAllRate = async function (val) {
// 发送POST请求
const result = await request({
- url: 'http://192.168.9.21:8081/rate/selectAll',
+ url: 'http://18.143.76.3:10704/rate/selectAll',
method: 'POST',
data: {
pageNum: getObj.value.pageNum,
@@ -286,7 +170,7 @@ const getEditData = async function (row) {
console.log('搜索参数', getObj.value)
// 发送POST请求
const result = await request({
- url: 'http://192.168.9.21:8081/rate/selectById',
+ url: 'http://18.143.76.3:10704/rate/selectById',
data: {id: row.id}
})
@@ -311,7 +195,7 @@ const editRate = async function () {
console.log('搜索参数', rateEdit.value)
// 发送POST请求
const result = await request({
- url: 'http://192.168.9.21:8081/rate/update',
+ url: 'http://18.143.76.3:10704/rate/update',
data: rateEdit.value
})
// 将响应结果存储到响应式数据中
@@ -510,11 +394,7 @@ onMounted(async function () {
style="width: 240px"
>
>>>>>> zhangrenyuan/feature-20250623164058-金币前端
:key="item.value"
:label="item.label"
:value="item.value"