<!doctype html>
|
<html lang="zh-CN">
|
<head><meta charset="UTF-8" /><title>门户视觉核验</title><style>body{margin:0;background:#e6edf4;font:13px system-ui;color:#284766}p{margin:12px 20px}.frame{position:relative;margin:0 20px;overflow:hidden}iframe{border:0;position:absolute;left:0;top:0;transform-origin:top left;background:#fff}</style></head>
|
<body><p id="caption"></p><div class="frame"><iframe title="实际组件预览"></iframe></div><script>
|
const query=new URLSearchParams(location.search),mobile=query.has('mobile'),surface=query.get('surface')||'home';
|
const width=mobile?390:1440,height=mobile?800:1080,scale=mobile?1:.5;
|
document.querySelector('.frame').style.cssText=`width:${width*scale}px;height:${height*scale}px;margin:${mobile?'0 auto':'0 20px'}`;
|
const frame=document.querySelector('iframe');frame.style.cssText=`width:${width}px;height:${height}px;transform:scale(${scale})`;frame.src=`/scripts/portal-preview.html?surface=${surface}&populated=${query.has('populated')?'1':'0'}&crowded=${query.has('crowded')?'1':'0'}`;
|
document.querySelector('#caption').textContent=`样式核验 · ${mobile?'手机 390px':'桌面 1440px'} · ${surface} · 演示菜单 / ${query.has('populated')?'示例业务数据':'空业务数据'}`;
|
document.getElementById('__app-loading__')?.remove();
|
</script></body></html>
|