From 1e6e731cad76077d004db1377f73954074e05d8f Mon Sep 17 00:00:00 2001 From: zjl Date: Tue, 17 Dec 2024 12:51:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/api/system/user.ts b/src/api/system/user.ts index f4eb1f4..3eab0e3 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -26,14 +26,16 @@ export function getUserInfo() { * @description: 用户注册 */ export function register(params) { - return http.request({ - url: `/register`, - method: 'POST', - params, - }, - { - isTransformResponse: false, - }); + return http.request( + { + url: `/register`, + method: 'POST', + params, + }, + { + isTransformResponse: false, + }, + ); } /** From 01b43a1877bf5d041c1cc180c1a620fff3231509 Mon Sep 17 00:00:00 2001 From: zjl Date: Tue, 17 Dec 2024 13:25:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dashboard/console.ts | 38 +- .../console/components/NewVisitAmount.vue | 9 +- src/views/dashboard/console/index.vue | 718 ++++++++---------- 3 files changed, 373 insertions(+), 392 deletions(-) diff --git a/src/api/dashboard/console.ts b/src/api/dashboard/console.ts index 753788d..13011a9 100644 --- a/src/api/dashboard/console.ts +++ b/src/api/dashboard/console.ts @@ -31,8 +31,38 @@ export interface TypeConsole { //获取主控台信息 export function getConsoleInfo() { - return http.request({ - url: '/dashboard/console', - method: 'get', - }); + return consoleInfo; } + +/** + * 模拟控制台数据 + */ +const consoleInfo = { + //访问量 + visits: { + dayVisits: 32335, + rise: 48, + decline: 85, + amount: 948113, + }, + //销售额 + saleroom: { + weekSaleroom: 90758, + amount: 411553, + degree: 38.245882, + }, + //订单量 + orderLarge: { + weekLarge: 35704, + rise: 28, + decline: 28, + amount: 480578, + }, + //成交额度 + volume: { + weekLarge: 67800, + rise: 96, + decline: 81, + amount: 826814, + }, +}; diff --git a/src/views/dashboard/console/components/NewVisitAmount.vue b/src/views/dashboard/console/components/NewVisitAmount.vue index 039b28d..5ac5d00 100644 --- a/src/views/dashboard/console/components/NewVisitAmount.vue +++ b/src/views/dashboard/console/components/NewVisitAmount.vue @@ -18,12 +18,15 @@ const chartRef = ref(null); const { setOptions } = useECharts(chartRef as Ref); + /** + * 定义选项 + */ const option = { tooltip: { trigger: 'axis', - axisPointer:{ - type:'shadow' - } + axisPointer: { + type: 'shadow', + }, }, grid: { top: '10%', diff --git a/src/views/dashboard/console/index.vue b/src/views/dashboard/console/index.vue index e425a9e..63c037b 100644 --- a/src/views/dashboard/console/index.vue +++ b/src/views/dashboard/console/index.vue @@ -1,233 +1,205 @@