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/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, + }, + ); } /** 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 @@