From 0ef9dfab57b5de346fc0ebb91f0e4cdf2c47f205 Mon Sep 17 00:00:00 2001 From: coward Date: Thu, 13 Jun 2024 11:28:34 +0800 Subject: [PATCH] =?UTF-8?q?:art:=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E6=9B=B4=E6=8D=A2=E3=80=81=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/clients.ts | 5 ++++ src/api/user.ts | 6 +++++ .../components/lay-navbar/component/user.vue | 19 ++++++++++++++ src/views/server/clients.vue | 25 ++++++++++++++++--- 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/api/clients.ts b/src/api/clients.ts index ebf771e..b0eaca8 100644 --- a/src/api/clients.ts +++ b/src/api/clients.ts @@ -47,3 +47,8 @@ export const getClientConnects = () => { export const offlineClient = (id: string) => { return http.request("post", baseUri("/client/offline/" + id)); }; + +// 发送邮件 +export const sendMail = (id: string) => { + return http.request("post", baseUri("/client/to-email/" + id)); +}; diff --git a/src/api/user.ts b/src/api/user.ts index 0f54116..285cfca 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -1,5 +1,6 @@ import { http } from "@/utils/http"; import { baseUri } from "@/api/utils"; +import { data } from "autoprefixer"; // 获取当前登陆用户信息 export const getUser = () => { @@ -30,3 +31,8 @@ export const deleteUser = (userId: string) => { export const changePassword = (data?: object) => { return http.request("post", baseUri("/user/change-password"), { data }); }; + +// 生成头像 +export const generateAvatar = () => { + return http.request("post", baseUri("/user/change-avatar")); +}; diff --git a/src/layout/components/lay-navbar/component/user.vue b/src/layout/components/lay-navbar/component/user.vue index 7920342..1dd3dea 100644 --- a/src/layout/components/lay-navbar/component/user.vue +++ b/src/layout/components/lay-navbar/component/user.vue @@ -1,6 +1,7 @@