获取草稿详情

  • 接口地址: /api/fresns/editor/detail
  • 请求方式: POST
  • 请求格式: JSON

header 可选参数:

参数名公开模式(是否必传)私有模式(是否必传)
uidYESYES
midYESYES
tokenYESYES

body 参数:

参数名类型是否必传说明
typeNumberYES1.帖子 / 2.评论
logIdNumberYES日志表 post_logs 或 comment_logs

返回结果:

成功-帖子

{
    "code": 0,
    "message": "ok",
    "data": {
        "detail": {
            "id": "post_logs > id",
            "pid": "post_logs > post_id >> posts > uuid",
            "isPluginEditor": "post_logs > is_plugin_editor",
            "editorUrl": "post_logs > editor_unikey 输出为 URL",
            "gid": "post_logs > group_id",
            "types": "post_logs > types",
            "title": "post_logs > title",
            "content": "post_logs > content",
            "isMarkdown": "post_logs > is_markdown",
            "isAnonymous": "post_logs > is_anonymous",
            "commentSetting": {
                // 原样输出 post_logs > comment_set_json
                // 无配置时,输出为 null
                "btnStatus": "post_appends > comment_btn_status",
                "pluginUnikey": "post_appends > comment_btn_plugin_unikey",
                "btnName": [
                    {
                        "langTag": "en 语言标签",
                        "name": "post_appends > comment_btn_name 按钮名称"
                    }
                ]
            },
            "memberList": {
                // 原样输出 post_logs > member_list_json
                // 无配置时,输出为 null
                "memberListStatus": "post_appends > member_list_status",
                "pluginUnikey": "post_appends > member_list_plugin_unikey",
                "memberListName": [
                    {
                        "langTag": "en 语言标签",
                        "name": "post_appends > member_list_name 特定成员名称"
                    }
                ]
            },
            "allow": {
                // 原样输出 post_logs > allow_json
                // 无配置时,输出为 null
                "isAllow": "posts > is_allow",
                "pluginUnikey": "post_appends > allow_plugin_unikey",
                "btnName": [
                    {
                        "langTag": "en 语言标签",
                        "name": "post_appends > allow_btn_name 按钮名称"
                    }
                ],
                "proportion": "post_appends > allow_proportion",
                "permission": {
                    "members": [
                        {
                            "mid": "members > uuid 根据 mid 获取真实 id 存到 post_allows > object_id 字段",
                            "membername": "members > name",
                            "nickname": "members > nickname"
                        }
                    ],
                    "roles": [
                        {
                            "rid": "member_roles > id 存到 post_allows > object_id 字段",
                            "name": "member_roles > name"
                        }
                    ]
                }
            },
            "location": {
                // 原样输出 post_logs > location_json
                // 无配置时,输出为 null
                "isLbs": "posts > is_lbs",
                "mapId": "posts > map_id",
                "latitude": "posts > map_latitude",
                "longitude": "posts > map_longitude",
                "scale": "post_appends > map_scale",
                "poi": "post_appends > map_poi",
                "poiId": "post_appends > map_poi_id",
                "nation": "post_appends > map_nation",
                "province": "post_appends > map_province",
                "city": "post_appends > map_city",
                "district": "post_appends > map_district",
                "adcode": "post_appends > map_adcode",
                "address": "post_appends > map_address"
            },
            "files": [
                // 输出 post_logs > files_json
                // 需判断是否开启防盗链
                {
                    "fid": "files > uuid",
                    "type": "files > file_type",
                    "name": "files > file_name",
                    "extension": "files > file_extension",
                    "mime": "file_appends > file_mime",
                    "size": "file_appends > file_size",
                    "rankNum": "排序数字",
                    "imageWidth": "file_appends > image_width",
                    "imageHeight": "file_appends > image_height",
                    "imageLong": "图片专用:file_appends > image_is_long",
                    "imageRatioUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_ratio",
                    "imageSquareUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_square",
                    "imageBigUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_big",
                    "videoTime": "视频专用:file_appends > video_time",
                    "videoCover": "视频专用:videos_bucket_domain + 文件 video_cover 字段",
                    "videoGif": "视频专用:videos_bucket_domain + 文件 video_gif 字段",
                    "videoUrl": "视频专用:videos_bucket_domain + 文件 file_path 字段",
                    "audioTime": "音频专用:file_appends > audio_time",
                    "audioUrl": "音频专用:audios_bucket_domain + 文件 file_path 字段",
                    "transcodingState": "音视频专用 file_appends > transcoding_state",
                    "moreJson": {
                        //延伸信息 file_appends > more_json
                    }
                }
            ],
            "extends": [
                // 输出 post_logs > extends_json
                // 多个扩展内容,根据 rankNum 升序
                {
                    "eid": "extend_linkeds > extend_id >> extends > uuid",
                    "canDelete": "extend_linkeds > extend_id >> extends > post_id 布尔型。有值,在编辑器不能删",
                    "rankNum": "排序数字",

                    //以下为字段没有的内容,输出的时候根据 eid 获取
                    "plugin": "extends > plugin_unikey",
                    "frame": "extends > frame",
                    "position": "extends > position",
                    "content": "extends > text_content",
                    "files": [
                        //frame=1 专用
                        //来源 extends > text_files
                        //判断是否开启了防盗链,如果开启了,涉及 URL 的参数,跟插件索要 URL
                    ],
                    "cover": "extends > cover_file_url", //判断是否开启了防盗链,如果开启了,涉及 URL 的参数,跟插件索要 URL
                    "title": "extends > title 多语言",
                    "titleColor": "extends > title_color",
                    "descPrimary": "extends > desc_primary 多语言",
                    "descPrimaryColor": "extends > desc_primary_color",
                    "descSecondary": "extends > desc_secondary 多语言",
                    "descSecondaryColor": "extends > desc_secondary_color",
                    "btnName": "extends > btn_name 多语言",
                    "btnColor": "extends > btn_color",
                    "type": "extends > extend_type",
                    "target": "extends > extend_target",
                    "value": "extends > extend_value 根据内容类型,输出对应的 URL",
                    "support": "extends > extend_support",
                    "moreJson": {
                        // extends > more_json
                    }
                }
            ],
            "state": "post_logs > state", //1.未发表(草稿) 2.已发表(审核中) 3.已发表(审核通过并封存) 4.已发表(审核未通过,又为草稿状态)
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153

成功-评论

{
    "code": 0,
    "message": "ok",
    "data": {
        "detail": {
            "id": "comment_logs > id",
            "cid": "comment_logs > comment_id >> comments > uuid",
            "isPluginEditor": "comment_logs > is_plugin_editor",
            "editorUrl": "comment_logs > editor_unikey 输出为 URL",
            "types": "comment_logs > types",
            "content": "comment_logs > content",
            "isMarkdown": "comment_logs > is_markdown",
            "isAnonymous": "comment_logs > is_anonymous",
            "location": {
                // 原样输出 comment_logs > location_json
                // 无配置时,输出为 null
                "isLbs": "comments > is_lbs",
                "mapId": "comments > map_id",
                "latitude": "comments > map_latitude",
                "longitude": "comments > map_longitude",
                "scale": "comment_appends > map_scale",
                "poi": "comment_appends > map_poi",
                "poiId": "comment_appends > map_poi_id",
                "nation": "comment_appends > map_nation",
                "province": "comment_appends > map_province",
                "city": "comment_appends > map_city",
                "district": "comment_appends > map_district",
                "adcode": "comment_appends > map_adcode",
                "address": "comment_appends > map_address"
            },
            "files": [
                // 输出 comment_logs > files_json
                // 需判断是否开启防盗链
                {
                    "fid": "files > uuid",
                    "type": "files > file_type",
                    "name": "files > file_name",
                    "extension": "files > file_extension",
                    "mime": "file_appends > file_mime",
                    "size": "file_appends > file_size",
                    "rankNum": "排序数字",
                    "imageWidth": "file_appends > image_width",
                    "imageHeight": "file_appends > image_height",
                    "imageLong": "图片专用:file_appends > image_is_long",
                    "imageRatioUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_ratio",
                    "imageSquareUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_square",
                    "imageBigUrl": "图片专用:images_bucket_domain + 文件 file_path 字段 + images_thumb_big",
                    "videoTime": "视频专用:file_appends > video_time",
                    "videoCover": "视频专用:videos_bucket_domain + 文件 video_cover 字段",
                    "videoGif": "视频专用:videos_bucket_domain + 文件 video_gif 字段",
                    "videoUrl": "视频专用:videos_bucket_domain + 文件 file_path 字段",
                    "audioTime": "音频专用:file_appends > audio_time",
                    "audioUrl": "音频专用:audios_bucket_domain + 文件 file_path 字段",
                    "transcodingState": "音视频专用 file_appends > transcoding_state",
                    "moreJson": {
                        //延伸信息 file_appends > more_json
                    }
                }
            ],
            "extends": [
                // 输出 comment_logs > extends_json
                // 多个扩展内容,根据 rankNum 升序
                {
                    "eid": "extends > uuid",
                    "canDelete": true, // false 不可删除 / true 可以删除
                    "rankNum": "排序数字",

                    //以下为字段没有的内容,输出的时候根据 eid 获取
                    "plugin": "extends > plugin_unikey",
                    "frame": "extends > frame",
                    "position": "extends > position",
                    "content": "extends > text_content",
                    "files": [
                        //frame=1 专用
                        //来源 extends > text_files
                        //判断是否开启了防盗链,如果开启了,涉及 URL 的参数,跟插件索要 URL
                    ],
                    "cover": "extends > cover_file_url", //判断是否开启了防盗链,如果开启了,涉及 URL 的参数,跟插件索要 URL
                    "title": "extends > title 多语言",
                    "titleColor": "extends > title_color",
                    "descPrimary": "extends > desc_primary 多语言",
                    "descPrimaryColor": "extends > desc_primary_color",
                    "descSecondary": "extends > desc_secondary 多语言",
                    "descSecondaryColor": "extends > desc_secondary_color",
                    "btnName": "extends > btn_name 多语言",
                    "btnColor": "extends > btn_color",
                    "type": "extends > extend_type",
                    "target": "extends > extend_target",
                    "value": "extends > extend_value 根据内容类型,输出对应的 URL",
                    "support": "extends > extend_support",
                    "moreJson": {
                        // extends > more_json
                    }
                }
            ],
            "state": "comment_logs > state", //1.未发表(草稿) 2.已发表(审核中) 3.已发表(审核通过并封存) 4.已发表(审核未通过,又为草稿状态)
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

失败

{
    "code": "code_messages > code",
    "message": "code_messages > message"
}
1
2
3
4

开发说明

  • 无论日志表 state 字段是什么值,均可获得详情,是否可以编辑,则由 /api/fresns/editor/update 接口处理。