hookehuyr

docs(api): 同步搜索 API 文档,将 file 类型改为 article

- 更新搜索 API 响应字段:files → article
- 字段名规范化:name/value/extension → post_title/post_excerpt/post_link
- 文章详情 API 添加 file_list 字段类型定义
- 计划书 API 完善参数文档说明

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This diff is collapsed. Click to expand it.
...@@ -24,9 +24,28 @@ const Api = { ...@@ -24,9 +24,28 @@ const Api = {
24 post_date: string; // 发布日期 24 post_date: string; // 发布日期
25 post_author: integer; // 发布人id 25 post_author: integer; // 发布人id
26 author_name: string; // 发布人 26 author_name: string; // 发布人
27 + file_list: {
28 + icon: {
29 + meta_type: string; //
30 + id: integer; //
31 + object_id: null; //
32 + name: string; //
33 + value: string; //
34 + description: null; //
35 + extension: string; //
36 + post_date: string; //
37 + icon: null; //
38 + master_client_id: null; //
39 + hash: string; //
40 + height: string; //
41 + width: string; //
42 + author: integer; //
43 + size: null; //
44 + };
45 + };
27 is_favorite: integer; // 46 is_favorite: integer; //
28 * }; 47 * };
29 - * } >} 48 + * }>}
30 */ 49 */
31 export const articleDetailAPI = (params) => fn(fetch.get(Api.ArticleDetail, params)); 50 export const articleDetailAPI = (params) => fn(fetch.get(Api.ArticleDetail, params));
32 51
......
...@@ -13,8 +13,8 @@ const Api = { ...@@ -13,8 +13,8 @@ const Api = {
13 * @param {Object} params 请求参数 13 * @param {Object} params 请求参数
14 * @param {string} params.customer_name 申请人 14 * @param {string} params.customer_name 申请人
15 * @param {string} params.customer_gender 性别 15 * @param {string} params.customer_gender 性别
16 - * @param {integer} params.customer_age 年龄 16 + * @param {integer} params.customer_age (可选) 与 customer_birthday 二选一,至少提供一个
17 - * @param {string} params.customer_birthday 出生年月日 17 + * @param {string} params.customer_birthday (可选) 与 customer_age 二选一,至少提供一个。格式:YYYY-MM-DD
18 * @param {integer} params.annual_premium 保额 18 * @param {integer} params.annual_premium 保额
19 * @param {string} params.payment_years 繳費年期 19 * @param {string} params.payment_years 繳費年期
20 * @param {string} params.currency_type 币种 20 * @param {string} params.currency_type 币种
......
...@@ -9,7 +9,7 @@ const Api = { ...@@ -9,7 +9,7 @@ const Api = {
9 * @remark 9 * @remark
10 * @param {Object} params 请求参数 10 * @param {Object} params 请求参数
11 * @param {string} params.keyword (可选) 11 * @param {string} params.keyword (可选)
12 - * @param {string} params.type (可选) product=产品,file=文档 12 + * @param {string} params.type (可选) product=产品,article=文章
13 * @returns {Promise<{ 13 * @returns {Promise<{
14 * code: number; // 状态码 14 * code: number; // 状态码
15 * msg: string; // 消息 15 * msg: string; // 消息
...@@ -33,18 +33,16 @@ const Api = { ...@@ -33,18 +33,16 @@ const Api = {
33 }>; 33 }>;
34 total: integer; // 产品总数 34 total: integer; // 产品总数
35 }; 35 };
36 - files: { 36 + article: {
37 list: Array<{ 37 list: Array<{
38 - id: integer; // 附件id 38 + id: integer; //
39 - name: string; // 附件名 39 + post_title: string; // 文章标题
40 - value: string; // 附件地址 40 + post_excerpt: null; // 文章简介
41 - extension: string; // 附件类型 41 + post_link: string; //
42 - post_date: string; // 发布时间 42 + post_date: string; // 发布日期
43 - size: string; // 附件大小
44 is_favorite: integer; // 是否收藏 43 is_favorite: integer; // 是否收藏
45 - type: string; //
46 }>; 44 }>;
47 - total: integer; // 附件 45 + total: integer; //
48 }; 46 };
49 * }; 47 * };
50 * }>} 48 * }>}
......