refactor(revenue): drop standalone QR block and align promotion card with reference
The 推广收益 detail card no longer renders the QR code as its own row. The card becomes a fixed-label info list: 推广链接 [Url][复制链接][推广海报] / 佣金比例 / 累计佣金 / 返佣详解, mirroring the reference theme's 推广中心 card. - profile-revenue.php: QR row removed; poster button moved into the link row and gated server-side on the poster switch; copy label now 复制链接; 推广人数 row dropped; 返佣详解 heading reads the existing pay_rebate_text_details_title; dead $vip_ratios, aksrt-revenue-page class and data-min-amount removed - new affiliate-poster-modal.php: poster previews in a modal before download (reuses .uc-modal + single-render guard), since the QR now only exists inside the poster - credits.js: renderAffiliateQr and its call deleted, along with the dead [data-affiliate-payers] lookup and the inline ch-width hack; initAffiliatePoster builds the poster into the modal stage and reveals 保存海报 - PaymentRuntime: expose affiliate details_title - user-center.js: remove never-defined AKSRTRevenueCenterInit guards (2 sites) - CSS: revenue-earnings.css pruned to live rules plus the new link-row grid and poster stage styles; routes/user-center/revenue.css pruned to its only definitions; dead leaves routes/revenue.css and routes/commerce.css deleted and dequeued from the user-center part list - tests: referral-qr-contract test 2 rewritten for the QR-free card, link row and poster modal; post-visual-contract leaf list updated with regression guards qrcode.min.js stays enqueued — buildPosterCanvas still draws the QR inside the poster. Net -833 lines. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d16ce6e02
commit
7761435a81
12 files changed
+136
-933
No files matched your search
@@ -1,5 +1,8 @@
|
||||
/**
|
||||
* 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 {
|
||||
@@ -10,106 +13,6 @@
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.uc-revenue-panel {
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.uc-commission-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.uc-commission-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
min-width: 0;
|
||||
min-height: 142px;
|
||||
padding: 22px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
|
||||
border-radius: 8px;
|
||||
background: var(--surface-1);
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
|
||||
}
|
||||
|
||||
.uc-commission-card__icon {
|
||||
display: grid;
|
||||
flex: 0 0 48px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
color: #fff;
|
||||
background: #2563a8;
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
.uc-commission-card--balance .uc-commission-card__icon {
|
||||
background: #c95a31;
|
||||
}
|
||||
|
||||
.uc-commission-card__body {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.uc-commission-card__body > span,
|
||||
.uc-commission-card__body > p {
|
||||
display: block;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uc-commission-card__body > span {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.uc-commission-card__body strong {
|
||||
display: block;
|
||||
color: var(--color-ink);
|
||||
font-size: 30px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.uc-commission-card--ratio .uc-commission-card__body strong {
|
||||
color: #2563a8;
|
||||
}
|
||||
|
||||
.uc-commission-card__body strong small {
|
||||
margin-left: 2px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.uc-commission-card__body p {
|
||||
margin: 6px 0 0;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.uc-commission-card__action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
flex: 0 0 auto;
|
||||
margin-left: auto;
|
||||
padding: 9px 13px;
|
||||
border: 0;
|
||||
border-radius: 7px;
|
||||
color: #fff;
|
||||
background: var(--color-primary);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uc-commission-card__action:hover {
|
||||
color: #fff;
|
||||
filter: brightness(.95);
|
||||
}
|
||||
|
||||
.uc-reward-area {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
@@ -124,16 +27,14 @@
|
||||
}
|
||||
|
||||
.uc-reward-area__heading h3,
|
||||
.uc-reward-list-heading h4,
|
||||
.uc-reward-block h4 {
|
||||
.uc-reward-list-heading h4 {
|
||||
margin: 0;
|
||||
color: var(--color-ink);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.uc-reward-area__heading > span,
|
||||
.uc-reward-list-heading p,
|
||||
.uc-reward-block__heading p {
|
||||
.uc-reward-list-heading p {
|
||||
margin: 0;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
@@ -188,63 +89,8 @@
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.uc-reward-block {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
padding: 18px;
|
||||
border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07));
|
||||
border-radius: 8px;
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.uc-reward-block__heading {
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.uc-reward-block__heading p {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.uc-invite-share {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.uc-invite-code {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.uc-invite-code strong {
|
||||
color: var(--color-ink);
|
||||
font-size: 19px;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
|
||||
.uc-invite-link-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.uc-invite-link-row input {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .12));
|
||||
border-radius: 7px;
|
||||
color: var(--color-ink);
|
||||
background: var(--surface-1);
|
||||
}
|
||||
|
||||
.uc-reward-status,
|
||||
.uc-reward-copy-feedback {
|
||||
min-height: 17px;
|
||||
margin: 0;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
@@ -255,56 +101,6 @@
|
||||
color: var(--color-error, #dc2626);
|
||||
}
|
||||
|
||||
.uc-ratio-list {
|
||||
display: grid;
|
||||
gap: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.uc-ratio-list > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07));
|
||||
}
|
||||
|
||||
.uc-ratio-list > div:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.uc-ratio-list dt {
|
||||
color: var(--color-ink-3);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.uc-ratio-list dd {
|
||||
margin: 0;
|
||||
color: var(--color-primary);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.uc-total-commission {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.uc-total-commission strong {
|
||||
color: var(--color-ink);
|
||||
font-size: 28px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.uc-total-commission span {
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uc-reward-block--details {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.uc-reward-richtext {
|
||||
color: var(--color-ink-3);
|
||||
font-size: 13px;
|
||||
@@ -337,15 +133,13 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.uc-commission-list,
|
||||
.uc-invite-list {
|
||||
.uc-commission-list {
|
||||
display: grid;
|
||||
gap: 0;
|
||||
border-top: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
|
||||
}
|
||||
|
||||
.uc-commission-row,
|
||||
.uc-invite-record {
|
||||
.uc-commission-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
@@ -365,16 +159,14 @@
|
||||
background: rgba(201, 90, 49, .12);
|
||||
}
|
||||
|
||||
.uc-commission-row__main,
|
||||
.uc-invite-record__main {
|
||||
.uc-commission-row__main {
|
||||
display: grid;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.uc-commission-row__main strong,
|
||||
.uc-invite-record__main strong {
|
||||
.uc-commission-row__main strong {
|
||||
overflow: hidden;
|
||||
color: var(--color-ink);
|
||||
font-size: 13px;
|
||||
@@ -383,8 +175,7 @@
|
||||
}
|
||||
|
||||
.uc-commission-row__main span,
|
||||
.uc-commission-row__main time,
|
||||
.uc-invite-record__main span {
|
||||
.uc-commission-row__main time {
|
||||
overflow: hidden;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
@@ -423,30 +214,6 @@
|
||||
background: rgba(168, 109, 40, .12);
|
||||
}
|
||||
|
||||
.uc-invite-record__avatar {
|
||||
display: grid;
|
||||
flex: 0 0 36px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
color: var(--color-primary);
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.uc-invite-record__avatar img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.uc-invite-record__status {
|
||||
flex: 0 0 auto;
|
||||
color: var(--color-ink-4);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uc-reward-pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -481,15 +248,9 @@
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.uc-commission-summary,
|
||||
.uc-reward-pane--detail {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.uc-commission-card {
|
||||
min-height: 120px;
|
||||
padding: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
@@ -497,24 +258,6 @@
|
||||
padding: 4px 0 0;
|
||||
}
|
||||
|
||||
.uc-commission-card {
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.uc-commission-card__action {
|
||||
margin-left: 63px;
|
||||
}
|
||||
|
||||
.uc-invite-link-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.uc-invite-link-row .btn-primary {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.uc-invite-record,
|
||||
.uc-commission-row {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user