修改userid要求为字符
This commit is contained in:
parent
0a61254d65
commit
ca0948d382
|
@ -11,7 +11,7 @@ export function createTableDataApi(data: Tables.CreateOrUpdateTableRequestData)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删 */
|
/** 删 */
|
||||||
export function deleteTableDataApi(id: number) {
|
export function deleteTableDataApi(id: string) {
|
||||||
return request({
|
return request({
|
||||||
url: `api/v1/users/${id}`,
|
url: `api/v1/users/${id}`,
|
||||||
method: "delete"
|
method: "delete"
|
||||||
|
@ -42,7 +42,7 @@ export function getTableDataApi(params: Tables.TableRequestData) {
|
||||||
* @param password 新密码
|
* @param password 新密码
|
||||||
* @returns BaseResponse
|
* @returns BaseResponse
|
||||||
*/
|
*/
|
||||||
export function resetPasswordApi(userId: number, password: string) {
|
export function resetPasswordApi(userId: string, password: string) {
|
||||||
return request({
|
return request({
|
||||||
url: `api/v1/users/${userId}/reset-password`,
|
url: `api/v1/users/${userId}/reset-password`,
|
||||||
method: "put",
|
method: "put",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export interface CreateOrUpdateTableRequestData {
|
export interface CreateOrUpdateTableRequestData {
|
||||||
id?: number
|
id?: string
|
||||||
username: string
|
username: string
|
||||||
email?: string
|
email?: string
|
||||||
password?: string
|
password?: string
|
||||||
|
@ -21,7 +21,7 @@ export interface TableRequestData {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TableData {
|
export interface TableData {
|
||||||
id: number
|
id: string
|
||||||
username: string
|
username: string
|
||||||
email: string
|
email: string
|
||||||
createTime: string
|
createTime: string
|
||||||
|
|
|
@ -39,7 +39,7 @@ const formRules: FormRules<CreateOrUpdateTableRequestData> = {
|
||||||
// #region 重置密码
|
// #region 重置密码
|
||||||
const resetPasswordDialogVisible = ref<boolean>(false)
|
const resetPasswordDialogVisible = ref<boolean>(false)
|
||||||
const resetPasswordFormRef = ref<FormInstance | null>(null)
|
const resetPasswordFormRef = ref<FormInstance | null>(null)
|
||||||
const currentUserId = ref<number | undefined>(undefined) // 用于存储当前要重置密码的用户ID
|
const currentUserId = ref<string | undefined>(undefined) // 用于存储当前要重置密码的用户ID
|
||||||
const resetPasswordFormData = reactive({
|
const resetPasswordFormData = reactive({
|
||||||
password: ""
|
password: ""
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue