From b9a7e1f348f77af7ce51ec679ba61f24e4b0c20e Mon Sep 17 00:00:00 2001 From: hongxilin <17663930442@163.com> Date: Tue, 17 Dec 2024 17:53:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E5=85=85=E5=80=BC=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E5=8F=AA=E6=9C=89=E7=99=BB=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E8=87=AA=E5=B7=B1=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/recharge/adminRecharge.vue | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/vue/gold-system/src/views/recharge/adminRecharge.vue b/vue/gold-system/src/views/recharge/adminRecharge.vue index 851dd3f..af66f35 100644 --- a/vue/gold-system/src/views/recharge/adminRecharge.vue +++ b/vue/gold-system/src/views/recharge/adminRecharge.vue @@ -6,20 +6,29 @@ import { AiFillRead } from "vue-icons-plus/ai"; import axios from "axios"; import moment from "moment"; import API from "../../api/index.js"; +//这是获取用户信息的接口 +const adminData = ref({}); +const getAdminData = async function () { + try { + const result = await API.post( + "http://192.168.8.93:10010/admin/userinfo", + {} + ); + adminData.value = result; + rechargeVo.value.adminId = adminData.value.adminId; + console.log("请求成功", result); + console.log("用户信息", adminData.value); + } catch (error) { + console.log("请求失败", error); + } +}; // 变量 -// 用户对象假的 -const admin = ref({ - adminId: 1, - name: "赵刚", - area: "中国", -}); - // 充值明细表格 const tableData = ref([]); // 搜索=========================================== // 搜索recharge const rechargeVo = ref({ - adminId: admin.value.adminId, + adminId: adminData.value.adminId, }); // 搜索对象 const getObj = ref({ @@ -313,6 +322,7 @@ const checkNumber = function () { // 挂载 onMounted(async function () { + await getAdminData(); await get(); getActivity(); await getArea();