feat(mp+health): 小程序分包迁移 + 积分商城后台列表 API
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- 小程序页面迁移到 pkg-health/pkg-mall/pkg-profile 分包目录
- 删除旧 pages/health/input、pages/mall/detail 等旧路径
- 导航路径更新为分包路径(/pages/pkg-mall/exchange/index 等)
- TrendChart 组件优化
- 后台添加 admin_list_products API(支持查看已下架商品)
- config/index.ts 添加 defineConstants 环境变量
- mp e2e check-readiness 路径修正
This commit is contained in:
iven
2026-04-29 07:29:49 +08:00
parent 9015a2b85e
commit cb6f5cc651
32 changed files with 229 additions and 516 deletions

View File

@@ -0,0 +1,249 @@
@import '../../../styles/variables.scss';
@mixin serif-number {
font-family: 'Georgia', 'Times New Roman', serif;
font-variant-numeric: tabular-nums;
}
@mixin section-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 30px;
font-weight: bold;
color: $tx;
margin-bottom: 20px;
display: block;
}
@mixin tag($bg, $color) {
display: inline-block;
padding: 4px 12px;
border-radius: 8px;
font-size: 20px;
font-weight: 500;
background: $bg;
color: $color;
}
@mixin flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.detail-page {
min-height: 100vh;
background: $bg;
padding-bottom: 40px;
}
/* ===== 余额卡片 ===== */
.balance-card {
background: $card;
margin: 20px 24px 16px;
border-radius: $r-lg;
padding: 32px;
box-shadow: $shadow-sm;
}
.balance-label {
font-size: 24px;
color: $tx2;
display: block;
margin-bottom: 8px;
}
.balance-value {
@include serif-number;
font-size: 60px;
font-weight: bold;
color: $pri;
display: block;
margin-bottom: 28px;
letter-spacing: -1px;
}
.balance-stats {
display: flex;
align-items: center;
background: $bg;
border-radius: $r;
padding: 20px 0;
}
.stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.stat-value {
@include serif-number;
font-size: 30px;
font-weight: bold;
margin-bottom: 4px;
&.stat-earn {
color: $acc;
}
&.stat-spend {
color: $wrn;
}
&.stat-expired {
color: $tx3;
}
}
.stat-label {
font-size: 22px;
color: $tx3;
}
.stat-divider {
width: 1px;
height: 48px;
background: $bd;
}
/* ===== 类型筛选标签 ===== */
.type-tabs {
display: flex;
gap: 0;
padding: 0 24px;
margin-bottom: 16px;
}
.type-tab {
@include flex-center;
flex: 1;
padding: 16px 0;
position: relative;
&.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 4px;
background: $pri;
border-radius: 2px;
}
}
.type-tab-text {
font-size: 28px;
color: $tx3;
.type-tab.active & {
color: $pri;
font-weight: bold;
}
}
/* ===== 交易列表 ===== */
.transaction-list {
padding: 0 24px;
}
.transaction-item {
display: flex;
align-items: center;
background: $card;
border-radius: $r;
padding: 24px;
margin-bottom: 12px;
box-shadow: $shadow-sm;
}
.tx-badge {
width: 64px;
height: 64px;
border-radius: $r;
@include flex-center;
margin-right: 20px;
flex-shrink: 0;
&.tx-badge-earn {
background: $acc-l;
}
&.tx-badge-spend {
background: $wrn-l;
}
&.tx-badge-expired {
background: $bd-l;
}
}
.tx-badge-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 28px;
font-weight: bold;
.tx-badge-earn & {
color: $acc;
}
.tx-badge-spend & {
color: $wrn;
}
.tx-badge-expired & {
color: $tx3;
}
}
.tx-info {
flex: 1;
min-width: 0;
}
.tx-desc {
font-size: 28px;
color: $tx;
display: block;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tx-date {
font-size: 22px;
color: $tx3;
display: block;
}
.tx-amount-col {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-left: 16px;
flex-shrink: 0;
}
.tx-amount {
@include serif-number;
font-size: 32px;
font-weight: bold;
margin-bottom: 4px;
&.tx-amount-positive {
color: $acc;
}
&.tx-amount-negative {
color: $tx2;
}
}
.tx-remaining {
@include serif-number;
font-size: 20px;
color: $tx3;
}