diff --git a/.env.development b/.env.development
index 80e0348..1caa00f 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,5 @@
# VITE_API_BASE='http://54.251.137.151:10704/'
# VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_dev'
# VITE_API_BASE='http://54.251.137.151:10704/'
-# VITE_API_BASE='http://192.168.8.225:8080/'
-# VITE_API_BASE='http://192.168.8.94:8080/'
-VITE_API_BASE='http://18.143.76.3/'
+VITE_API_BASE='http://192.168.8.94:8081/'
diff --git a/src/router/index.js b/src/router/index.js
index f1ac976..2767e29 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -10,7 +10,6 @@ const router = createRouter({
meta: { requireAuth: true },
path: '/', component: () => import("../views/home.vue"),
children: [
-
// 工作台
{ path: '/workspace/:area?', name: "workspace", component: () => import("../views/workspace/index.vue") },
// 充值审核
diff --git a/src/views/audit/rechargeAudit.vue b/src/views/audit/rechargeAudit.vue
index 923b9a5..baaf7be 100644
--- a/src/views/audit/rechargeAudit.vue
+++ b/src/views/audit/rechargeAudit.vue
@@ -9,6 +9,9 @@ import moment from 'moment'
const adminData = ref({})
const Ref = ref(null)
+const rechargeVo = ref({
+
+})
const getAdminData = async function () {
try {
const result = await request({
diff --git a/src/views/audit/refundAudit.vue b/src/views/audit/refundAudit.vue
index 4143d4b..9c0822f 100644
--- a/src/views/audit/refundAudit.vue
+++ b/src/views/audit/refundAudit.vue
@@ -140,7 +140,7 @@ const searchForm = ref({
endDate: ''
})
-const checkTab = ref(1) // 能否不用STATUS常量,1是待审批,2是已通过,3是驳回,参数status需要Integer
+const checkTab = ref('pending') // 能否不用STATUS常量,1是待审批,2是已通过,3是驳回,参数status需要Integer
const dateRange = ref([])
const pagination = ref({
@@ -190,11 +190,7 @@ const getProducts = async () => {
// 查地区
const getAreas = async () => {
try {
-<<<<<<< HEAD
- const result = await request({ url: '' })
-=======
const result = await request({ url: 'http://192.168.8.247:8081/general/market' })
->>>>>>> milestone-20250623-金币前端
areaOptions.value = result.data || []
} catch (error) {
console.error('获取地区列表失败', error)
diff --git a/src/views/home.vue b/src/views/home.vue
index d4afd98..e1ac3f1 100644
--- a/src/views/home.vue
+++ b/src/views/home.vue
@@ -70,9 +70,9 @@ const message = function () {
// 挂载
onMounted(async function () {
// 获取用户信息
- getAdminData()
+ //getAdminData()
// 获取地区
- getAreas()
+ //getAreas()
})
// 处理地区点击事件,直接在组件内更新当前地区,包老师改的,直接传参
const changeDataByArea = (item) => {
@@ -199,7 +199,7 @@ const handleClose = (key, keyPath) => {
{{ adminData.name }}
查看个人信息
- 退出登录
+ 退出登录
diff --git a/src/views/managerecharge/rate.vue b/src/views/managerecharge/rate.vue
index 5aa0977..02437cd 100644
--- a/src/views/managerecharge/rate.vue
+++ b/src/views/managerecharge/rate.vue
@@ -2,7 +2,269 @@
import {onMounted, reactive, ref} from 'vue'
import {ElMessage, ElMessageBox} from 'element-plus'
import request from '@/util/http'
+
+// 查询当前登录的信息
+const adminData = ref({
+ adminId: '',
+ name: ''
+})
+
+const getAdminData = async function () {
+ try {
+ const result = await request({
+ url: '/admin/userinfo',
+ data: {}
+ })
+ adminData.value = result
+ rateEdit.value.adminId = adminData.value.adminId
+ console.log('请求成功', result)
+ } catch (error) {
+ console.log('请求失败', error)
+ }
+}
+
+// 默认 编辑板块是关的
+const regeEdit = ref(false)
+
+// 表单引用(根据id获取信息后 将内容存到编辑表单)
+const editFormRef = ref(null)
+
+//汇率表格数据
+const tableData = ref([])
+
+//搜索对象
+const getObj = ref({
+ pageNum: 1,
+ pageSize: 10
+})
+
+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://192.168.9.21:8081/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,
+ rateName: '',
+ num: null,
+ adminId: null,
+ updateTime: Date.now(),
+})
+
+//查询已有的数据
+const getEditData = async function (row) {
+ try {
+ console.log('搜索参数', getObj.value)
+ // 发送POST请求
+ const result = await request({
+ url: 'http://192.168.9.21:8081/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://192.168.9.21:8081/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 options = [
+ {
+ value: 'USD',
+ label: 'USD'
+ },
+ {
+ value: 'HKD',
+ label: 'HKD'
+ },
+ {
+ value: 'THB',
+ label: 'THB'
+ },
+ {
+ value: 'VND',
+ label: 'VND'
+ },
+ {
+ value: 'CAD',
+ label: 'CAD'
+ },
+ {
+ value: 'MYR',
+ label: 'MYR'
+ },
+ {
+ value: 'KRW',
+ label: 'KRW'
+ },
+ {
+ value: 'JPY',
+ label: 'JPY'
+ },
+ {
+ value: 'CNY',
+ label: 'CNY'
+ }
+]
+
+function formatDate(value) {
+ if (!value) return ''
+ const date = new Date(value)
+ const year = date.getFullYear()
+ const month = (date.getMonth() + 1).toString().padStart(2, '0')
+ const day = date.getDate().toString().padStart(2, '0')
+ const hours = date.getHours().toString().padStart(2, '0')
+ const minutes = date.getMinutes().toString().padStart(2, '0')
+ const seconds = date.getSeconds().toString().padStart(2, '0')
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+}
+
+
+const checkFreeGoldRadio = function (rule, value, callback) {
+ if (value == '0' || value == null || value == '') {
+ callback(new Error('请输入汇率比'))
+ } else if (value < 0 || isNaN(value)) {
+ callback(new Error('请输入正确的格式'))
+ } else {
+ callback()
+ }
+}
+const rules = reactive({
+ rateName: [{required: true, message: '请选择货币名称', trigger: 'blur'}],
+ num: [{validator: checkFreeGoldRadio, trigger: 'blur'}],
+})
+
+function handleInput(value) {
+ // 初始过滤非数字和小数点字符
+ let validValue = value.replace(/[^\d.]/g, '');
+
+ // 处理多个小数点的情况,保留第一个,移除后续的
+ const parts = validValue.split('.');
+ if (parts.length > 2) {
+ validValue = parts[0] + '.' + parts.slice(1).join('');
+ ElMessage.warning('请输入正确格式');
+ }
+
+ // 限制小数点后最多7位
+ const [integerPart, decimalPart = ''] = validValue.split('.');
+ if (decimalPart.length > 7) {
+ validValue = `${integerPart}.${decimalPart.slice(0, 7)}`;
+ ElMessage.warning('最多只能输入7位小数');
+ }
+
+ // 最终格式验证
+ const isValidFormat = /^\d+(\.\d{0,7})?$/.test(validValue);
+ if (value && !isValidFormat) {
+ ElMessage.warning('请输入正确的数字格式');
+ }
+
+ // 更新表单值
+ rateEdit.value.num = validValue;
+ return validValue;
+}
+
+// 表单大小
+const formSize = ref('default')
+
+
diff --git a/src/views/permissions/index.vue b/src/views/permissions/index.vue
index 3f205a1..2b8585e 100644
--- a/src/views/permissions/index.vue
+++ b/src/views/permissions/index.vue
@@ -1,10 +1,6 @@
@@ -402,9 +280,7 @@ onBeforeUnmount(() => {
}
.card-item {
- width: 24%;
height: 260px;
- margin-right: 10px;
display: flex;
flex-direction: column;
justify-content: center;
@@ -418,7 +294,15 @@ onBeforeUnmount(() => {
align-items: center;
}
-.margin-top{
- margin-top: 5px;
+.rank-card {
+ height: 500px;
}
+
+.card-large {
+ font-weight: bold;
+ font-size: 16px;
+ text-align: center;
+ margin-bottom: 15px;
+}
+
\ No newline at end of file