|
@@ -27,7 +27,7 @@ import { ANNOUNCEMENT_STATUS, ROLE_TYPES } from '@/views/announcement/constants'
|
|
|
* @param {number} current - 当前页码(必须大于0)
|
|
|
* @param {number} size - 每页大小(建议10-100之间)
|
|
|
* @param {NoticeQueryParams} [params={}] - 查询参数
|
|
|
- * @returns {Promise<NoticeListResponse>} 分页公告列表
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<PageResult<NoticeRecord>>>>} 分页公告列表
|
|
|
* @throws {Error} 当请求失败时抛出错误
|
|
|
* @example
|
|
|
* // 获取第一页公告列表
|
|
@@ -49,7 +49,7 @@ export const getList = (current, size, params = /** @type {Partial<NoticeQueryPa
|
|
|
/**
|
|
|
* 新增公告
|
|
|
* @param {NoticeFormData} row - 公告表单数据
|
|
|
- * @returns {Promise<NoticeOperationResponse>} 操作结果
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<boolean>>>} 操作结果
|
|
|
* @throws {Error} 当请求失败或数据验证失败时抛出错误
|
|
|
* @example
|
|
|
* // 新增公告
|
|
@@ -72,7 +72,7 @@ export const add = (row) => {
|
|
|
/**
|
|
|
* 修改公告
|
|
|
* @param {NoticeFormData} row - 公告表单数据(必须包含id)
|
|
|
- * @returns {Promise<NoticeOperationResponse>} 操作结果
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<boolean>>>} 操作结果
|
|
|
* @throws {Error} 当请求失败、数据验证失败或公告不存在时抛出错误
|
|
|
* @example
|
|
|
* // 更新公告
|
|
@@ -94,7 +94,7 @@ export const update = (row) => {
|
|
|
/**
|
|
|
* 获取公告详情
|
|
|
* @param {string} id - 公告ID(必填)
|
|
|
- * @returns {Promise<NoticeDetailResponse>} 公告详情
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<NoticeRecord>>>} 公告详情
|
|
|
* @throws {Error} 当请求失败或公告不存在时抛出错误
|
|
|
* @example
|
|
|
* // 获取公告详情
|
|
@@ -115,7 +115,7 @@ export const getAnnouncement = (id) => {
|
|
|
|
|
|
/**
|
|
|
* 获取经销商列表(保留兼容性)
|
|
|
- * @returns {Promise<DealerListResponse>} 经销商列表
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<DealerOption[]>>>} 经销商列表
|
|
|
* @throws {Error} 当请求失败时抛出错误
|
|
|
* @deprecated 建议使用更具体的经销商API
|
|
|
*/
|
|
@@ -128,7 +128,7 @@ export const getDealerList = () => {
|
|
|
|
|
|
/**
|
|
|
* 获取品牌列表(保留兼容性)
|
|
|
- * @returns {Promise<BrandListResponse>} 品牌列表
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<BrandOption[]>>>} 品牌列表
|
|
|
* @throws {Error} 当请求失败时抛出错误
|
|
|
* @deprecated 建议使用更具体的品牌API
|
|
|
*/
|
|
@@ -143,7 +143,7 @@ export const getBrandList = () => {
|
|
|
|
|
|
/**
|
|
|
* 获取分类列表
|
|
|
- * @returns {Promise<CategoryListResponse>} 分类列表
|
|
|
+ * @returns {Promise<AxiosResponse<ApiResponse<CategoryItem[]>>>} 分类列表
|
|
|
* @throws {Error} 当请求失败时抛出错误
|
|
|
* @example
|
|
|
* // 获取分类列表
|