Commit 78dfaa70 authored by wuhao's avatar wuhao 🎯

asder

parent 3ba939c2
...@@ -47,17 +47,19 @@ export default function ShopProductCard({ ...@@ -47,17 +47,19 @@ export default function ShopProductCard({
publish, publish,
authorized, authorized,
}) { }) {
const { courseName, picUrl, createTime, statusName, type } = product; const { courseName, picUrl, createTime, typeName, type } = product;
const [confirm, setconfirm] = useState(false); const [confirm, setconfirm] = useState(false);
const [shut, setshut] = useState(false); const [shut, setshut] = useState(false);
return ( return (
<Card sx={{ borderRadius: 3 }} className="hovered" id="jikl"> <Card sx={{ borderRadius: 3 }} className="hovered" id="jikl">
<Box sx={{ pt: "66%", position: "relative" }} className="center"> <Box sx={{ pt: "66%", position: "relative" }} className="center">
{statusName && ( {typeName && (
<Label <Label
variant="filled" variant="filled"
color={(statusName === "sale" && "error") || "info"} color={
(type === 1 && "warning") || (type === 3 && "default") || "info"
}
sx={{ sx={{
zIndex: 9, zIndex: 9,
top: 20, top: 20,
...@@ -66,7 +68,7 @@ export default function ShopProductCard({ ...@@ -66,7 +68,7 @@ export default function ShopProductCard({
textTransform: "uppercase", textTransform: "uppercase",
}} }}
> >
{statusName} {typeName}
</Label> </Label>
)} )}
<StyledProductImg <StyledProductImg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment