绘图工坊支持 iframe 嵌入,可直接集成到你自己的页面中。
| 产品 | 嵌入地址 | 说明 |
|---|---|---|
| 绘图工坊 | /app.html?embed=1 |
AI 生图工作台需登录 |
把下面代码粘到你的页面里即可,高度会自动同步。
<iframe src="https://jierui.cloud/app.html?embed=1" style="width:100%;min-height:860px;border:0;border-radius:12px" allow="clipboard-write" loading="lazy"> </iframe>
子页面会通过 postMessage 上报高度,父页面监听后自动调整,避免出现双重滚动条。
<iframe id="jrApp"
src="https://jierui.cloud/app.html?embed=1"
style="width:100%;height:860px;border:0;border-radius:12px"
allow="clipboard-write">
</iframe>
<script>
window.addEventListener('message', function (e) {
var d = e.data;
if (d && d.type === 'jr-embed-height' && d.height) {
var f = document.getElementById('jrApp');
if (f) f.style.height = Math.max(720, d.height) + 'px';
}
});
</script>
?embed=1 也会自动生效。
跨域嵌入时登录态依赖浏览器第三方 Cookie 策略,若被拦截,让用户先在新窗口登录一次即可。