-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
92 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* 根据当前环境(开发或生产)确定正确的后端地址。 | ||
* @returns 正确的后端地址。 | ||
*/ | ||
export default function getCorrectUri() { | ||
return environment.production ? "https://rosales.kirakira.moe" : "https://localhost:9999"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
/** | ||
* 用户注册提交的参数 | ||
* @param username 用户名 | ||
* @param passwordHash 在前端已经 Hash 过一次的的密码 | ||
* @param passwordHint 密码提示 | ||
*/ | ||
export type UserRegistrationDataDto = { | ||
/** 用户名 */ | ||
username: string; | ||
/** 在前端已经 Hash 过一次的的密码 */ | ||
passwordHash: string; | ||
/** 密码提示 */ | ||
passwordHint?: string; | ||
}; | ||
|
||
/** | ||
* 用户注册的返回参数 | ||
* @param success 执行结果,程序执行成功,返回 true,程序执行失败,返回 false | ||
* @param uid 用户 ID | ||
* @param token 如果注册成功,则返回一个 token,如果注册失败,则 token 是一个假值(undefined、null 或 '') | ||
* @param message 附加的文本消息 | ||
*/ | ||
export type UserRegistrationResultDto = { | ||
/** 执行结果,程序执行成功,返回 true,程序执行失败,返回 false */ | ||
success: boolean; | ||
/** 用户 ID */ | ||
uid?: number; | ||
/** 如果注册成功,则返回一个 token,如果注册失败,则 token 是一个假值(undefined、null 或 "") */ | ||
token?: string; | ||
/** 附加的文本消息 */ | ||
message?: string; | ||
}; | ||
|
||
/** | ||
* 用户登录提交的参数 | ||
* @param username 用户名 | ||
* @param passwordHash 在前端已经 Hash 过一次的的密码 | ||
*/ | ||
export type UserLoginDataDto = { | ||
/** 用户名 */ | ||
username: string; | ||
/** 在前端已经 Hash 过一次的的密码 */ | ||
passwordHash: string; | ||
}; | ||
|
||
/** | ||
* 用户登录的返回参数 | ||
* @param success 执行结果,程序执行成功,返回 true,程序执行失败,返回 false | ||
* @param username 用户名 | ||
* @param uid 用户 ID | ||
* @param token 如果登录成功,则返回一个 token,如果登录失败,则 token 是一个假值(undefined、null 或 '') | ||
* @param passwordHint 密码提示 | ||
* @param message 附加的文本消息 | ||
*/ | ||
export type UserLoginResultDto = { | ||
/** 执行结果,程序执行成功,返回 true,程序执行失败,返回 false */ | ||
success: boolean; | ||
/** 用户名 */ | ||
username?: string; | ||
/** 用户 ID */ | ||
uid?: number; | ||
/** 如果登录成功,则返回一个 token,如果登录失败,则 token 是一个假值(undefined、null 或 '') */ | ||
token?: string; | ||
/** 密码提示 */ | ||
passwordHint?: string; | ||
/** 附加的文本消息 */ | ||
message?: string; | ||
}; | ||
|
||
/** | ||
* 验证用户是否存在提交的参数 | ||
* @param username 用户名 | ||
*/ | ||
export type UserExistsCheckDataDto = { | ||
/** 用户名 */ | ||
username: string; | ||
}; | ||
|
||
/** | ||
* 验证用户是否已经存在的返回参数 | ||
* @param success 执行结果,程序执行成功,返回 true,程序执行失败,返回 false | ||
* @param exists 用户存在或者查询失败(悲观)都会返回 true,不存在返回 false // WARN 注意:用户存在或查询失败时都会返回 true | ||
* @param message 附加的文本消息 | ||
*/ | ||
export type UserExistsCheckResultDto = { | ||
/** 执行结果,程序执行成功,返回 true,程序执行失败,返回 false */ | ||
success: boolean; | ||
exists: boolean; | ||
/** 用户存在或者查询失败(悲观)都会返回 true,不存在返回 false */ | ||
exists: boolean; // WARN 注意:用户存在或查询失败时都会返回 true | ||
/** 附加的文本消息 */ | ||
message?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters