From 2a8c9a116fc114e37ce743288ff3422571c529b5 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期日, 19 十月 2025 17:25:13 +0800
Subject: [PATCH] feat: 1.2.0.1
---
src/store/modules/user.ts | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 40aa7bf..d2204f3 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -18,7 +18,7 @@
export interface UserState {
token: string;
- userInfo: API.PasswordLoginCommandCallback;
+ userInfo: API.LoginCommandCallback;
}
function getDefaultState() {
@@ -42,28 +42,30 @@
return state.userInfo;
},
- // userId(state) {
- // return state.accountInfo.sub;
- // },
+ userId(state) {
+ //TODO
+ return '';
+ },
},
actions: {
setToken(token: string) {
this.token = token;
setToken(token);
},
- setUserInfo(userInfo: API.PasswordLoginCommandCallback) {
+ setUserInfo(userInfo: API.LoginCommandCallback) {
this.userInfo = userInfo;
setUserInfo(userInfo);
},
// 鐢ㄦ埛鐧诲叆
async loginByUsername(params: API.PasswordLoginCommand) {
- let res = await authServices.authPasswordLogin(
+ let res = await authServices.passwordLogin(
{
...params,
- password: md5Encrypt(params.password),
- type: EnumUserType.Operation,
- clientType: EnumClientType.PcWeb,
+ password: params.password,
+ // password: md5Encrypt(params.password),
+ type: AppLocalConfig.userType,
+ clientType: AppLocalConfig.clientType,
},
{
showLoading: false,
@@ -107,7 +109,7 @@
Object.assign(this, getDefaultState());
},
- async refreshToken(params: API.AccessRefreshToken) {
+ async refreshToken(params: any) {
return Promise.resolve({
accessToken: '1222',
expiresIn: 1000 * 60 * 24 * 60,
--
Gitblit v1.9.1