From eaf90724fd51bc955b59b281569ff5d5cb6b51c2 Mon Sep 17 00:00:00 2001 From: zry <18990852002@163.com> Date: Mon, 28 Apr 2025 14:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=A1=B5=E6=95=B0100?= =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=8C=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gold-system/.env.development | 4 +- gold-system/.env.production | 3 +- gold-system/.env.test | 6 +-- gold-system/src/views/login.vue | 2 +- gold-system/src/views/managerecharge/activity.vue | 57 +++++++++++++++++------ gold-system/stats.html | 2 +- 6 files changed, 52 insertions(+), 22 deletions(-) diff --git a/gold-system/.env.development b/gold-system/.env.development index f7cc6fc..ca5f87e 100644 --- a/gold-system/.env.development +++ b/gold-system/.env.development @@ -1,5 +1,5 @@ -#VITE_API_BASE='http://54.251.137.151:10704/' +# VITE_API_BASE='http://54.251.137.151:10704/' # VITE_API_BASE='http://192.168.8.94:8080/' 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.232:8080/' \ No newline at end of file +# VITE_API_BASE='http://192.168.8.220:8080/' \ No newline at end of file diff --git a/gold-system/.env.production b/gold-system/.env.production index 9362454..e7f0d4a 100644 --- a/gold-system/.env.production +++ b/gold-system/.env.production @@ -1,2 +1,3 @@ # VITE_API_BASE='http://54.251.137.151:10702/' -VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_dev' \ No newline at end of file +VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_prod' +# VITE_API_BASE='http://192.168.8.220:8080/' \ No newline at end of file diff --git a/gold-system/.env.test b/gold-system/.env.test index f7cc6fc..7d38ae7 100644 --- a/gold-system/.env.test +++ b/gold-system/.env.test @@ -1,5 +1,5 @@ -#VITE_API_BASE='http://54.251.137.151:10704/' +# VITE_API_BASE='http://54.251.137.151:10704/' # VITE_API_BASE='http://192.168.8.94:8080/' -VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_dev' +VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_prod' # VITE_API_BASE='http://54.251.137.151:10704/' -# VITE_API_BASE='http://192.168.8.232:8080/' \ No newline at end of file +# VITE_API_BASE='http://192.168.8.220:8080/' \ No newline at end of file diff --git a/gold-system/src/views/login.vue b/gold-system/src/views/login.vue index d218e38..e1f3aa1 100644 --- a/gold-system/src/views/login.vue +++ b/gold-system/src/views/login.vue @@ -49,7 +49,7 @@ const login = async function () { result.data.permission == '2' || result.data.permission == '3' ) { - router.push('/usergold') + router.push('/workspace') } else if (result.data.permission == '4') { router.push('/noPermission') } diff --git a/gold-system/src/views/managerecharge/activity.vue b/gold-system/src/views/managerecharge/activity.vue index 21254c4..d7c5fce 100644 --- a/gold-system/src/views/managerecharge/activity.vue +++ b/gold-system/src/views/managerecharge/activity.vue @@ -61,22 +61,26 @@ const get = async function (val) { activity.value.endDate = null } - console.log('搜索参数', getObj.value) + const requestData = { + pageNum: getObj.value.pageNum, + pageSize: getObj.value.pageSize, + activity: { + ...activity.value, + activityName: activity.value.activityName, + status: activity.value.status + } + }; + console.log('搜索参数', requestData) // 发送POST请求 const result = await request({ url: '/recharge/activity/select', method: 'post', - data: { - pageNum: getObj.value.pageNum, - pageSize: getObj.value.pageSize, - activity: { - ...activity.value, - activityName: activity.value.activityName, - status: activity.value.status - } - } + data: requestData }) + // 打印响应数据 + console.log('响应数据', result); + // 将响应结果存储到响应式数据中 console.log('请求成功', result) // 存储表格数据 @@ -87,7 +91,7 @@ const get = async function (val) { console.log('total', total.value) } catch (error) { console.log('请求失败', error) -ElMessage.error('请求失败') + ElMessage.error('请求失败') } } // 搜索 @@ -160,6 +164,31 @@ const throttledAdd = async () => { ElMessage.error('新增活动失败') } } + +// 删除确认方法 +const delConfirm = async (row) => { + try { + delObj.value = row + // 发送删除请求 + const result = await request({ + url: '/recharge/activity/delete', // 假设这是删除活动的接口 + method: 'post', + data: delObj.value + }) + console.log('删除活动成功', result) + ElMessage.success('删除活动成功') + // 重新获取数据 + get() + } catch (error) { + console.log('删除活动失败', error) + ElMessage.error('删除活动失败') + } +} + +// 删除方法 +const del = (row) => { + delObj.value = row +}