feat: 本次提交更新内容如下
新版本样式完成
This commit is contained in:
@@ -131,6 +131,14 @@
|
||||
justify-content: center;
|
||||
margin: 0 auto 6px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scene-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.scene-value {
|
||||
|
||||
@@ -16,33 +16,6 @@ import style from "./index.module.scss";
|
||||
import LineChart from "@/components/LineChart";
|
||||
import { getPlanStats } from "./api";
|
||||
|
||||
const sceneStats = [
|
||||
{
|
||||
label: "公众号",
|
||||
value: 234,
|
||||
icon: <ShopbagOutline style={{ fontSize: 20, color: "white" }} />,
|
||||
gradient: "linear-gradient(135deg, #4caf50 0%, #45a049 100%)",
|
||||
},
|
||||
{
|
||||
label: "海报",
|
||||
value: 167,
|
||||
icon: <AppOutline style={{ fontSize: 20, color: "white" }} />,
|
||||
gradient: "linear-gradient(135deg, #ff9800 0%, #f57c00 100%)",
|
||||
},
|
||||
{
|
||||
label: "抖音",
|
||||
value: 156,
|
||||
icon: <PieOutline style={{ fontSize: 20, color: "white" }} />,
|
||||
gradient: "linear-gradient(135deg, #2196f3 0%, #1976d2 100%)",
|
||||
},
|
||||
{
|
||||
label: "小红书",
|
||||
value: 89,
|
||||
icon: <UserOutline style={{ fontSize: 20, color: "white" }} />,
|
||||
gradient: "linear-gradient(135deg, #e91e63 0%, #c2185b 100%)",
|
||||
},
|
||||
];
|
||||
|
||||
const todayStats = [
|
||||
{
|
||||
label: "朋友圈",
|
||||
@@ -71,9 +44,11 @@ const todayStats = [
|
||||
];
|
||||
|
||||
const Home: React.FC = () => {
|
||||
const [sceneStats, setSceneStats] = useState<any[]>([]);
|
||||
useEffect(() => {
|
||||
getPlanStats({ num: 4 }).then((res: any) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
setSceneStats(res);
|
||||
});
|
||||
}, []);
|
||||
|
||||
@@ -133,15 +108,16 @@ const Home: React.FC = () => {
|
||||
</div>
|
||||
<div className={style["scene-grid"]}>
|
||||
{sceneStats.map((item) => (
|
||||
<div key={item.label} className={style["scene-item"]}>
|
||||
<div
|
||||
className={style["scene-icon"]}
|
||||
style={{ background: item.gradient }}
|
||||
>
|
||||
{item.icon}
|
||||
<div key={item.id} className={style["scene-item"]}>
|
||||
<div className={style["scene-icon"]}>
|
||||
<img
|
||||
src={item.image}
|
||||
alt={item.name}
|
||||
className={style["scene-image"]}
|
||||
/>
|
||||
</div>
|
||||
<div className={style["scene-value"]}>{item.value}</div>
|
||||
<div className={style["scene-label"]}>{item.label}</div>
|
||||
<div className={style["scene-value"]}>{item.allNum}</div>
|
||||
<div className={style["scene-label"]}>{item.name}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user