Files
wordpress-theme-aksrt/assets/css/routes/user-center/revenue.css
T
kate522 61667aa03c feat(revenue): immediate commission credit with independent withdrawable pool
Aligns affiliate commission with the reference theme: commission is credited
to a dedicated COMMISSION asset pool the moment an order is paid, removing the
7-day settlement freeze, the settlement cron, and the settlement_days setting.

- Ledger: add AssetType::COMMISSION (isolated from the recharge balance wallet)
- CommissionLedger: credit-on-record + opportunistic debt repayment; refunds
  claw back the full commission from the pool, carrying any shortfall as debt
  (aksrt_commission_debt) that future commission pays down first
- Withdrawal: make asset-aware via a source discriminator (commission vs
  balance); each pool keeps independent daily limits, pending gate, and
  reject-refund. Balance withdrawal (recharge + creator income) is unchanged
- Fix pay_rebate_self_s: honor self-commission at purchase time
- Revenue card: show pool balance + 累计/已提现 (drop 待结算), debt when present
- Schema 2.0.0 -> 2.1.0: add commission_debt, drop freeze columns
2026-09-28 21:27:44 +08:00

275 lines
4.8 KiB
CSS

/**
* User Center - commission and revenue rewards.
*
* Structural base for the 推广收益 tab (unprefixed selectors). Layout
* overrides for the current card design live in revenue-earnings.css.
*/
.uc-content #panel-revenue.dashboard-panel {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
}
.uc-reward-area {
display: grid;
gap: 16px;
padding: 4px 0 0;
}
.uc-reward-area__heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.uc-reward-area__heading h3,
.uc-reward-list-heading h4 {
margin: 0;
color: var(--color-ink);
font-size: 16px;
}
.uc-reward-area__heading > span,
.uc-reward-list-heading p {
margin: 0;
color: var(--color-ink-4);
font-size: 12px;
}
.uc-reward-tabs {
display: flex;
flex-wrap: wrap;
gap: 4px;
overflow: hidden;
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-reward-tabs a {
position: relative;
flex: 0 0 auto;
padding: 10px 16px;
color: var(--color-ink-3);
font-size: 14px;
text-decoration: none;
}
.uc-reward-tabs a::after {
position: absolute;
right: 12px;
bottom: -1px;
left: 12px;
height: 2px;
background: transparent;
content: "";
}
.uc-reward-tabs a:hover,
.uc-reward-tabs a.is-active {
color: var(--color-primary);
}
.uc-reward-tabs a.is-active {
font-weight: 700;
}
.uc-reward-tabs a.is-active::after {
background: var(--color-primary);
}
.uc-reward-pane {
display: grid;
gap: 16px;
}
/* 三个 Tab 面板首屏全部直出,靠 hidden 属性做本地切换;
* display:grid 会覆盖 [hidden] 的 display:none,必须显式复位。 */
.uc-reward-pane[hidden] {
display: none;
}
.uc-reward-pane--detail {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.uc-reward-status,
.uc-reward-copy-feedback {
margin: 0;
color: var(--color-ink-4);
font-size: 12px;
}
.uc-reward-status.is-error,
.uc-reward-copy-feedback.is-error {
color: var(--color-error, #dc2626);
}
.uc-reward-richtext {
color: var(--color-ink-3);
font-size: 13px;
line-height: 1.75;
}
.uc-reward-richtext p {
margin: 0 0 8px;
}
.uc-reward-richtext p:last-child {
margin-bottom: 0;
}
.uc-reward-list-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.uc-reward-list-heading > div {
display: grid;
gap: 5px;
}
.uc-reward-list-heading > strong {
color: var(--color-ink-4);
font-size: 12px;
font-weight: 500;
}
.uc-commission-list {
display: grid;
gap: 0;
border-top: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-commission-row {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
padding: 13px 0;
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-commission-row__icon {
display: grid;
flex: 0 0 34px;
width: 34px;
height: 34px;
place-items: center;
border-radius: 8px;
color: #c95a31;
background: rgba(201, 90, 49, .12);
}
.uc-commission-row__main {
display: grid;
flex: 1 1 auto;
min-width: 0;
gap: 3px;
}
.uc-commission-row__main strong {
overflow: hidden;
color: var(--color-ink);
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
.uc-commission-row__main span,
.uc-commission-row__main time {
overflow: hidden;
color: var(--color-ink-4);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.uc-commission-row__value {
display: grid;
justify-items: end;
gap: 4px;
flex: 0 0 auto;
}
.uc-commission-row__value strong {
color: #16816c;
font-size: 14px;
font-variant-numeric: tabular-nums;
}
.uc-commission-row__value span {
padding: 2px 7px;
border-radius: 999px;
color: var(--color-ink-4);
background: var(--surface-1);
font-size: 11px;
}
.uc-commission-row__value span.is-settled {
color: #16816c;
background: rgba(22, 129, 108, .1);
}
.uc-commission-row__value span.is-pending {
color: #a86d28;
background: rgba(168, 109, 40, .12);
}
.uc-reward-pagination {
display: flex;
justify-content: center;
gap: 6px;
padding-top: 4px;
}
.uc-reward-pagination a {
display: grid;
width: 30px;
height: 30px;
place-items: center;
border-radius: 6px;
color: var(--color-ink-3);
background: var(--surface-2);
font-size: 12px;
text-decoration: none;
}
.uc-reward-pagination a.is-active,
.uc-reward-pagination a:hover {
color: #fff;
background: var(--color-primary);
}
.uc-reward-empty {
margin: 0;
padding: 30px 12px;
color: var(--color-ink-4);
font-size: 13px;
text-align: center;
}
@media (max-width: 720px) {
.uc-reward-pane--detail {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.uc-reward-area {
padding: 4px 0 0;
}
.uc-commission-row {
align-items: flex-start;
}
.uc-commission-row__value {
text-align: right;
}
}