当我向http://localhost/wordpress/wp-json/wp/v2/posts/?_embed&categories=${categoryId}&per_page=${state.perPage}
我得到以下结果
[
{
id: 3,
date: \'2019-04-20T16:10:00\',
date_gmt: \'2019-04-20T16:10:00\',
guid: {
rendered: \'http://localhost/wordpress/?p=3\'
},
modified: \'2019-04-20T16:36:30\',
modified_gmt: \'2019-04-20T16:36:30\',
slug: \'slug-title\',
status: \'publish\',
type: \'post\',
link: \'http://localhost/wordpress/2019/04/20/slug-title/\',
title: {
rendered: \'title\'
},
content: {
rendered: \'\\n<figure class="wp-block-image"><img \' +
\'src="http://localhost/wordpress/wp-content/uploads/2019/04/sirius.jpg" \' +
\'alt="" class="wp-image-4" \' +
\'srcset="http://localhost/wordpress/wp-content/uploads/2019/04/sirius.jpg \' +
\'370w, \' +
\'http://localhost/wordpress/wp-content/uploads/2019/04/sirius-217x300.jpg \' +
\'217w" sizes="(max-width: 370px) 100vw, 370px" \' +
\'/></figure>\\n\',
protected: false
},
excerpt: {
rendered: \'\',
protected: false
},
author: 1,
featured_media: 0,
comment_status: \'open\',
ping_status: \'open\',
sticky: false,
template: \'\',
format: \'standard\',
meta: [],
categories: [
3
],
tags: [],
_links: {
self: [Array],
collection: [Array],
about: [Array],
author: [Array],
replies: [Array],
\'version-history\': [Array],
\'predecessor-version\': [Array],
\'wp:attachment\': [Array],
\'wp:term\': [Array],
curies: [Array]
},
_embedded: {
author: [Array],
\'wp:term\': [Array]
}
}
]
但正如您所看到的,没有特色的\\ U媒体。我是否对featured\\u media有误解?我的帖子里有一幅你在
content.rendered