官网文档：https://docs.strapi.io/dev-docs/quick-start#_1-install-strapi-and-create-a-new-project切换到当前支持的node版本，然后是用命令创建项目：npx create-strapi-app@latest strapi-learn --quickstart获取关系型数据的步骤1）访问此页：https://docs.strapi.io/dev-docs/api/rest/interactive-query-builder2）根据要获取的字段/组件名称，获取正确的访问URL3）指导文章：https://strapi.io/blog/demystifying-strapi-s-populate-and-filtering导出可以先用yarn strapi help export查看选项，然后用yarn strapi export --no-encrypt -f backup 导出数据到backup压缩包导出可以先用yarn strapi help import查看选项，然后用yarn strapi import -f backup.tar.gz 导入数据到backup压缩包一个api下面那些text、image之类的直接的属性，默认可以从api读到，但是如果是component和dynamic zone，就需要在url里添加populate才能够获得。访问此页：https://docs.strapi.io/dev-docs/api/rest/interactive-query-builder为了避免长长的URL，可以使用：yarn strapi generate，做一个中间件$ strapi generate ? Strapi Generators middleware - Generate a middleware for an API ? Middleware name landing-page-populate ? Where do you want to add this middleware? Add middleware to an existing API ? Which API is this for? landing-page 会创建一个中间件，找到那个中间件，把之前那个query builder里的东西复制进去：const populate = { metadata: { populate: { metaImage: { populate: true, fields: ["name", "alternativeText", "url"], }, }, }, blocks: { populate: { link: { pupulate: true, }, image: { fields: ["name", "alternativeText", "url"], }, card: { populate: { image: { fields: ["name", "alternativeText", "url"], }, }, }, plan: { populate: ["services", "link"], }, form: { populate: ["input", "button"], }, }, }, }; 然后在routes的landing-page里，添加中间件名字。module.exports = createCoreRouter('api::landing-page.landing-page', { config: { find: { middlewares: ['api::landing-page.landing-page-populate'] }, findOne: { middlewares: ['api::landing-page.landing-page-populate'] } } }); 重启就可以了（问题，这不就把获取数据的权限控制在后端了嘛，前端就没有这个灵活性了）可以把本地数据传到生产，首先去settings -> transfer token，创建一个token，type可以是push，复制token。然后回到终端，yarn strapi help transfer然后yarn strapi stransfer --to http://xxx.strapiapp.com/admin，注意是网址加上/admin然后会让你输入token，把刚才的token粘贴进来确认，就可以上传成功了