From 5bf38c2f1a85191d91e8ddcf254d39d809437314 Mon Sep 17 00:00:00 2001 From: Cxx0822 <1556464090@qq.com> Date: Tue, 10 Jun 2025 20:01:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/bill.ts | 13 +++++++------ src/apis/session.ts | 6 ++++++ src/components/Home/Login/CommonLogin.vue | 17 +++++++++++++---- src/layout/admin/components/SideBar/Logo.vue | 2 +- src/layout/home/components/Navbar/index.vue | 2 +- src/store/auth.ts | 5 ++++- src/types/auth.ts | 2 +- src/views/home/meta.ts | 5 ----- src/views/home/others/admin.vue | 7 ------- src/views/login/index.vue | 1 + 10 files changed, 34 insertions(+), 26 deletions(-) delete mode 100644 src/views/home/others/admin.vue diff --git a/src/apis/bill.ts b/src/apis/bill.ts index d52bc74..5fa6281 100644 --- a/src/apis/bill.ts +++ b/src/apis/bill.ts @@ -7,6 +7,7 @@ import { IBillRecord, IBillSummaryStats } from '@/types/bill' +import { IStatsChart } from 'vue3-common/dist/types' export const addBillRecordApi = (billRecord: IBillRecord): Promise => cloudService({ @@ -41,7 +42,7 @@ export const queryBillSummaryApi = (query: IBillQuery): Promise = params: query }) -export const queryBillStatsApi = (type: string, query: IBillQuery): Promise => +export const queryBillStatsApi = (type: string, query: IBillQuery): Promise => cloudService({ url: `/home-service/bill/stats/${type}`, method: 'get', @@ -73,35 +74,35 @@ export const addBillPayApi = (billPay: IBillPay): Promise => data: billPay }) -export const updateBillPayApi = (id: number, billPay: IBillPay): Promise => +export const updateBillPayApi = (id: number, billPay: IBillPay): Promise => cloudService({ url: `/admin-service/bill-manage/pay/${id}`, method: 'put', data: billPay }) -export const addBillBookApi = (billBook: IBillBook): Promise => +export const addBillBookApi = (billBook: IBillBook): Promise => cloudService({ url: '/admin-service/bill-manage/book', method: 'post', data: billBook }) -export const updateBillBookApi = (id: number, billBook: IBillBook): Promise => +export const updateBillBookApi = (id: number, billBook: IBillBook): Promise => cloudService({ url: `/admin-service/bill-manage/book/${id}`, method: 'put', data: billBook }) -export const addBillCategoryApi = (billCategory: IBillCategory): Promise => +export const addBillCategoryApi = (billCategory: IBillCategory): Promise => cloudService({ url: '/admin-service/bill-manage/category', method: 'post', data: billCategory }) -export const updateBillCategoryApi = (id: number, billCategory: IBillCategory): Promise => +export const updateBillCategoryApi = (id: number, billCategory: IBillCategory): Promise => cloudService({ url: `/admin-service/bill-manage/category/${id}`, method: 'put', diff --git a/src/apis/session.ts b/src/apis/session.ts index f8ca0d4..f2b6c60 100644 --- a/src/apis/session.ts +++ b/src/apis/session.ts @@ -8,3 +8,9 @@ export const loginHomeApi = (name: string, password: string): Promise params: { name, password } }) +export const loginAdminApi = (name: string, password: string): Promise => + cloudService({ + url: '/admin-service/session', + method: 'post', + params: { name, password } + }) diff --git a/src/components/Home/Login/CommonLogin.vue b/src/components/Home/Login/CommonLogin.vue index 0f9b0cf..c5cdaa5 100644 --- a/src/components/Home/Login/CommonLogin.vue +++ b/src/components/Home/Login/CommonLogin.vue @@ -43,7 +43,13 @@ 登录 + @click.prevent="handleLogin('common')">登录 + +
+ 登录管理系统