Dev jacy #25
@@ -308,14 +308,6 @@ body:has(.big-screen-page),
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-screen-list-head {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
padding: 0 28px 10px 40px;
|
|
||||||
font-size: 15px;
|
|
||||||
color: rgba(170, 200, 230, 0.55);
|
|
||||||
letter-spacing: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.big-screen-list-body {
|
.big-screen-list-body {
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@@ -460,16 +452,20 @@ body:has(.big-screen-page),
|
|||||||
}
|
}
|
||||||
|
|
||||||
.big-screen-empty {
|
.big-screen-empty {
|
||||||
display: flex;
|
position: absolute;
|
||||||
align-items: center;
|
left: 0;
|
||||||
justify-content: center;
|
right: 0;
|
||||||
height: 100%;
|
/* 全屏高度黄金分割点(≈0.382),略偏上 */
|
||||||
|
top: 38.2%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: rgba(145, 190, 230, 0.42);
|
color: rgba(145, 190, 230, 0.42);
|
||||||
padding: 48px 40px;
|
padding: 0 40px;
|
||||||
font-size: 60px;
|
font-size: 60px;
|
||||||
letter-spacing: 6px;
|
letter-spacing: 6px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-screen-fx {
|
.big-screen-fx {
|
||||||
@@ -722,7 +718,6 @@ body:has(.big-screen-page),
|
|||||||
.big-screen-clock {
|
.big-screen-clock {
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
}
|
}
|
||||||
.big-screen-list-head,
|
|
||||||
.big-screen-row {
|
.big-screen-row {
|
||||||
grid-template-columns: minmax(140px, 20%) minmax(0, 1fr) minmax(110px, 16%) minmax(130px, 18%);
|
grid-template-columns: minmax(140px, 20%) minmax(0, 1fr) minmax(110px, 16%) minmax(130px, 18%);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -41,11 +41,20 @@ function formatOrderTime(iso: string): string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// function formatAmount(n: number): string {
|
||||||
|
// return Number(n || 0).toLocaleString('zh-CN', {
|
||||||
|
// minimumFractionDigits: 0,
|
||||||
|
// maximumFractionDigits: 0,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
function formatAmount(n: number): string {
|
function formatAmount(n: number): string {
|
||||||
return Number(n || 0).toLocaleString('zh-CN', {
|
const num = Number(n || 0);
|
||||||
minimumFractionDigits: 0,
|
// 先保留两位小数,再分割处理
|
||||||
maximumFractionDigits: 0,
|
const fixed = num.toFixed(2);
|
||||||
});
|
const [intStr, decStr] = fixed.split('.');
|
||||||
|
const intFormatted = Number(intStr).toLocaleString('zh-CN');
|
||||||
|
return decStr === '00' ? intFormatted : `${intFormatted}.${decStr}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function amountCssClass(payAmount: number, base: string): string {
|
function amountCssClass(payAmount: number, base: string): string {
|
||||||
@@ -412,16 +421,8 @@ export default function BigScreenPage() {
|
|||||||
<LiveClock />
|
<LiveClock />
|
||||||
|
|
||||||
<div className="big-screen-list">
|
<div className="big-screen-list">
|
||||||
<div className="big-screen-list-head">
|
|
||||||
<span>订单金额</span>
|
|
||||||
<span>订单商品</span>
|
|
||||||
<span>下单时间</span>
|
|
||||||
<span>下单账号</span>
|
|
||||||
</div>
|
|
||||||
<div className="big-screen-list-body" ref={viewportRef}>
|
<div className="big-screen-list-body" ref={viewportRef}>
|
||||||
{items.length === 0 ? (
|
{items.length === 0 ? null : (
|
||||||
<div className="big-screen-empty">{loadError || '当日暂无订单'}</div>
|
|
||||||
) : (
|
|
||||||
<div
|
<div
|
||||||
className={`big-screen-track${rolling ? ' is-rolling' : ''}${paused ? ' is-paused' : ''}`}
|
className={`big-screen-track${rolling ? ' is-rolling' : ''}${paused ? ' is-paused' : ''}`}
|
||||||
style={rolling ? ({ ['--marquee-ms']: `${marqueeMs}ms` } as CSSProperties) : undefined}
|
style={rolling ? ({ ['--marquee-ms']: `${marqueeMs}ms` } as CSSProperties) : undefined}
|
||||||
@@ -438,6 +439,10 @@ export default function BigScreenPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{items.length === 0 ? (
|
||||||
|
<div className="big-screen-empty">{loadError || '当日暂无订单'}</div>
|
||||||
|
) : null}
|
||||||
|
|
||||||
{celebrate ? (
|
{celebrate ? (
|
||||||
<CelebrateFx
|
<CelebrateFx
|
||||||
key={celebrate.id}
|
key={celebrate.id}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export class AdminOrdersService {
|
|||||||
startOfToday.setHours(0, 0, 0, 0);
|
startOfToday.setHours(0, 0, 0, 0);
|
||||||
const orders = await this.prisma.order.findMany({
|
const orders = await this.prisma.order.findMany({
|
||||||
where: {
|
where: {
|
||||||
payAmount: { gte: 100 },
|
|
||||||
payStatus: 'PAID',
|
payStatus: 'PAID',
|
||||||
paidAt: { gte: startOfToday },
|
paidAt: { gte: startOfToday },
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user