地址路径修改
This commit is contained in:
@@ -109,6 +109,38 @@ class EmployeeService {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传员工头像
|
||||
* @param employeeId 员工ID
|
||||
* @param filePath 头像文件路径
|
||||
* @returns 上传结果
|
||||
*/
|
||||
async uploadAvatar(employeeId: number, filePath: string): Promise<{ success: boolean; message?: string; avatarUrl?: string }> {
|
||||
try {
|
||||
return await apiService.uploadEmployeeAvatar(employeeId, filePath);
|
||||
} catch (error) {
|
||||
console.error('上传头像失败:', error);
|
||||
return {
|
||||
success: false,
|
||||
message: '上传头像失败,请稍后重试'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工头像URL
|
||||
* @param employeeId 员工ID
|
||||
* @returns 头像URL
|
||||
*/
|
||||
async getAvatarUrl(employeeId: number): Promise<string> {
|
||||
try {
|
||||
return await apiService.getEmployeeAvatar(employeeId);
|
||||
} catch (error) {
|
||||
console.error('获取头像失败:', error);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user