Dev jacy 大屏优化 #24
@@ -308,14 +308,6 @@ body:has(.big-screen-page),
|
||||
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 {
|
||||
flex: 1 1 0%;
|
||||
min-height: 0;
|
||||
@@ -460,16 +452,20 @@ body:has(.big-screen-page),
|
||||
}
|
||||
|
||||
.big-screen-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* 全屏高度黄金分割点(≈0.382),略偏上 */
|
||||
top: 38.2%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
color: rgba(145, 190, 230, 0.42);
|
||||
padding: 48px 40px;
|
||||
padding: 0 40px;
|
||||
font-size: 60px;
|
||||
letter-spacing: 6px;
|
||||
font-weight: 400;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.big-screen-fx {
|
||||
@@ -722,7 +718,6 @@ body:has(.big-screen-page),
|
||||
.big-screen-clock {
|
||||
font-size: 56px;
|
||||
}
|
||||
.big-screen-list-head,
|
||||
.big-screen-row {
|
||||
grid-template-columns: minmax(140px, 20%) minmax(0, 1fr) minmax(110px, 16%) minmax(130px, 18%);
|
||||
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 {
|
||||
return Number(n || 0).toLocaleString('zh-CN', {
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0,
|
||||
});
|
||||
const num = Number(n || 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 {
|
||||
@@ -412,16 +421,8 @@ export default function BigScreenPage() {
|
||||
<LiveClock />
|
||||
|
||||
<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}>
|
||||
{items.length === 0 ? (
|
||||
<div className="big-screen-empty">{loadError || '当日暂无订单'}</div>
|
||||
) : (
|
||||
{items.length === 0 ? null : (
|
||||
<div
|
||||
className={`big-screen-track${rolling ? ' is-rolling' : ''}${paused ? ' is-paused' : ''}`}
|
||||
style={rolling ? ({ ['--marquee-ms']: `${marqueeMs}ms` } as CSSProperties) : undefined}
|
||||
@@ -438,6 +439,10 @@ export default function BigScreenPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{items.length === 0 ? (
|
||||
<div className="big-screen-empty">{loadError || '当日暂无订单'}</div>
|
||||
) : null}
|
||||
|
||||
{celebrate ? (
|
||||
<CelebrateFx
|
||||
key={celebrate.id}
|
||||
|
||||
@@ -32,7 +32,6 @@ export class AdminOrdersService {
|
||||
startOfToday.setHours(0, 0, 0, 0);
|
||||
const orders = await this.prisma.order.findMany({
|
||||
where: {
|
||||
payAmount: { gte: 100 },
|
||||
payStatus: 'PAID',
|
||||
paidAt: { gte: startOfToday },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user