From abf2777b2e57943b283310592ca4878e5b67ca33 Mon Sep 17 00:00:00 2001
From: ahao <liuhaoai545@gmail.com>
Date: 星期三, 27 十二月 2023 14:28:04 +0800
Subject: [PATCH] fix 修复 页面警告
---
src/api/login.ts | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/api/login.ts b/src/api/login.ts
index ef7346b..100a5e9 100644
--- a/src/api/login.ts
+++ b/src/api/login.ts
@@ -4,7 +4,7 @@
import { UserInfo } from '@/api/system/user/types';
// pc绔浐瀹氬鎴风鎺堟潈id
-const clientId = 'e5cd7e4891bf95d1d19206ce24a7b32e';
+const clientId = import.meta.env.VITE_APP_CLIENT_ID;
/**
* @param data {LoginData}
@@ -29,13 +29,19 @@
// 娉ㄥ唽鏂规硶
export function register(data: any) {
+ const params = {
+ ...data,
+ clientId: clientId,
+ grantType: 'password'
+ };
return request({
url: '/auth/register',
headers: {
- isToken: false
+ isToken: false,
+ isEncrypt: true
},
method: 'post',
- data: data
+ data: params
});
}
--
Gitblit v1.9.3