refactor(revenue): drop standalone QR block and align promotion card with reference #36
@@ -1,88 +0,0 @@
|
|||||||
/**
|
|
||||||
* Commerce center shared shell (cart / revenue).
|
|
||||||
*
|
|
||||||
* @package AKSRT
|
|
||||||
*/
|
|
||||||
|
|
||||||
.aksrt-commerce-header {
|
|
||||||
margin: 0 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__title {
|
|
||||||
margin: 0 0 6px;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1.25;
|
|
||||||
color: var(--color-ink, #1f2937);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__subtitle {
|
|
||||||
margin: 0 0 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--color-ink-3, #6b7280);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__nav {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__nav-item {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border: 1px solid var(--color-line, rgba(0, 0, 0, 0.08));
|
|
||||||
border-radius: 999px;
|
|
||||||
background: var(--surface-1, #fff);
|
|
||||||
color: var(--color-ink-2, #4b5563);
|
|
||||||
font-size: 13px;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color .15s, border-color .15s, background .15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__nav-item:hover {
|
|
||||||
border-color: color-mix(in srgb, var(--color-primary, #f04494) 45%, transparent);
|
|
||||||
color: var(--color-primary, #f04494);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-commerce-header__nav-item.is-active {
|
|
||||||
border-color: transparent;
|
|
||||||
background: var(--color-primary, #f04494);
|
|
||||||
color: var(--color-on-primary, #fff);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Soften revenue dashboard cards — task-first, not ops console */
|
|
||||||
.aksrt-revenue-page__stats {
|
|
||||||
gap: 12px !important;
|
|
||||||
margin-bottom: 18px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-card {
|
|
||||||
padding: 14px 16px !important;
|
|
||||||
border: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.06)) !important;
|
|
||||||
border-radius: 12px !important;
|
|
||||||
background: var(--surface-1, #fff) !important;
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-icon {
|
|
||||||
width: 36px !important;
|
|
||||||
height: 36px !important;
|
|
||||||
background: var(--body-bg-color, #f5f6f7) !important;
|
|
||||||
color: var(--color-ink-2, #4b5563) !important;
|
|
||||||
font-size: 15px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-value {
|
|
||||||
font-size: 18px !important;
|
|
||||||
font-weight: 600 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-label {
|
|
||||||
font-size: 12px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-cart-page__header > div:first-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
/**
|
|
||||||
* AKSRT Revenue Page Styles
|
|
||||||
* 收益中心页面样式
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AKSRT Revenue Page Styles
|
|
||||||
* 收益中心页面样式 — legacy-aligned, responsive
|
|
||||||
*/
|
|
||||||
|
|
||||||
.aksrt-revenue-page {
|
|
||||||
padding: 24px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__header h2 {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
color: var(--color-ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stats {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
||||||
gap: 16px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-card {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16px;
|
|
||||||
padding: 20px;
|
|
||||||
background: var(--surface-1);
|
|
||||||
border-radius: var(--radius-2xl, 16px);
|
|
||||||
border: none;
|
|
||||||
box-shadow: var(--shadow-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-icon {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: var(--radius-lg);
|
|
||||||
background: var(--color-primary-1, rgba(240, 68, 148, 0.08));
|
|
||||||
color: var(--color-primary);
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-value {
|
|
||||||
display: block;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--color-ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-label {
|
|
||||||
display: block;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--color-ink-3);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__actions {
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__withdraw-btn {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 10px 24px;
|
|
||||||
border-radius: var(--radius);
|
|
||||||
background: var(--color-primary);
|
|
||||||
color: var(--color-on-primary, #fff);
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: opacity 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__withdraw-btn:hover {
|
|
||||||
opacity: 0.85;
|
|
||||||
color: var(--color-on-primary, #fff);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__section h3 {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
color: var(--color-ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
background: transparent;
|
|
||||||
border-radius: 0;
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 14px 16px;
|
|
||||||
background: var(--surface-1);
|
|
||||||
border: none;
|
|
||||||
border-radius: var(--main-radius, var(--radius, 8px));
|
|
||||||
box-shadow: var(--shadow-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-icon {
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--surface-2);
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-info {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-title {
|
|
||||||
display: block;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--color-ink);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-time {
|
|
||||||
display: block;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--color-ink-4);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-amount {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__pagination {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 8px;
|
|
||||||
margin-top: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__page-chip {
|
|
||||||
display: inline-block;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
font-size: 13px;
|
|
||||||
background: var(--surface-4);
|
|
||||||
color: var(--color-ink-3);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: background 0.15s, color 0.15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__page-chip:hover {
|
|
||||||
background: var(--color-primary-soft);
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__page-chip.is-active {
|
|
||||||
background: var(--color-primary);
|
|
||||||
color: var(--color-on-primary, #fff);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__empty {
|
|
||||||
text-align: center;
|
|
||||||
padding: 48px 0;
|
|
||||||
color: var(--color-ink-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__empty i {
|
|
||||||
font-size: 48px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===== Responsive ===== */
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
.aksrt-revenue-page__stats {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-card {
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item {
|
|
||||||
padding: 12px;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-icon {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.aksrt-revenue-page {
|
|
||||||
padding: 16px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__header h2 {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__stat-value {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aksrt-revenue-page__item-amount {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,93 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* User Center — revenue standalone tab.
|
* User Center — 推广收益 panel: commission summary cards + 推广详情 / 佣金明细 / 推广用户 tabs.
|
||||||
*
|
*
|
||||||
* Hosts the [data-aksrt-invite] card moved out of the revenue tab. Priority
|
* The 推广详情 card is a fixed-label/value row list (112px label + content),
|
||||||
* order: 成果概览 → 分享操作 → 奖励说明 → 邀请记录. Status/feedback are text
|
* mirroring the reference theme's 推广中心 card. Status/feedback are text only,
|
||||||
* (data-invite-status / data-invite-copy-feedback), never colour-only.
|
* never colour-only.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Standalone panel: the uc-revenue-panel is the only card, so flatten the
|
|
||||||
* generic dashboard-panel chrome (mirrors #panel-revenue / #panel-vip). */
|
|
||||||
.uc-content #panel-revenue.dashboard-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
|
||||||
.uc-content .uc-revenue-page { padding: 4px 0; }
|
|
||||||
|
|
||||||
.uc-content .uc-revenue-panel { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); border-radius: 14px; background: var(--surface-1); }
|
.uc-content .uc-revenue-panel { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); border-radius: 14px; background: var(--surface-1); }
|
||||||
.uc-content .uc-revenue-card { margin: 0; }
|
|
||||||
.uc-content .uc-revenue-panel__header { display: flex; align-items: center; gap: 12px; }
|
|
||||||
.uc-content .uc-revenue-panel__icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #db2777, #f472b6); }
|
|
||||||
.uc-content .uc-revenue-panel__eyebrow { margin: 0 0 2px; color: #b8377d; font-size: 12px; font-weight: 700; }
|
|
||||||
.uc-content .uc-revenue-panel__header h3 { margin: 0; font-size: 19px; }
|
|
||||||
.uc-content .uc-revenue-panel__intro,
|
|
||||||
.uc-content .uc-revenue-section__header p { margin: 0; color: var(--color-ink-4); font-size: 13px; line-height: 1.65; }
|
|
||||||
.uc-content .uc-revenue-panel__status { margin: 0; padding: 10px 12px; border-radius: 8px; color: var(--color-ink-3); background: var(--surface-2); font-size: 13px; }
|
|
||||||
.uc-content .uc-revenue-panel__status.is-error,
|
|
||||||
.uc-content .uc-revenue-copy-feedback.is-error { color: var(--color-error, #dc2626); }
|
|
||||||
.uc-content .uc-revenue-section { padding-top: 2px; }
|
|
||||||
.uc-content .uc-revenue-section h4 { margin: 0 0 4px; font-size: 15px; }
|
|
||||||
|
|
||||||
/* 成果概览 — the hero metric row. */
|
|
||||||
.uc-content .uc-revenue-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; border: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); border-radius: 12px; overflow: hidden; }
|
|
||||||
.uc-content .uc-revenue-stat { display: grid; gap: 4px; padding: 16px; border-right: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); }
|
|
||||||
.uc-content .uc-revenue-stat:last-child { border-right: 0; }
|
|
||||||
.uc-content .uc-revenue-stat span,
|
|
||||||
.uc-content .uc-revenue-stat small { color: var(--color-ink-4); font-size: 12px; }
|
|
||||||
.uc-content .uc-revenue-stat strong { color: #b8377d; font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.1; }
|
|
||||||
|
|
||||||
/* 分享操作 — code + copyable link + primary button. */
|
|
||||||
.uc-content .uc-revenue-share { display: grid; gap: 10px; margin-top: 12px; }
|
|
||||||
.uc-content .uc-revenue-code { display: flex; align-items: baseline; gap: 10px; color: var(--color-ink-4); font-size: 13px; }
|
|
||||||
.uc-content .uc-revenue-code strong { color: var(--color-ink); font-size: 19px; letter-spacing: .08em; }
|
|
||||||
.uc-content .uc-revenue-link-row { display: flex; gap: 10px; }
|
|
||||||
.uc-content .uc-revenue-link { flex: 1; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--color-line-soft, rgba(0,0,0,.1)); border-radius: 8px; background: var(--surface-2); }
|
|
||||||
.uc-content .uc-revenue-copy { min-width: 108px; }
|
|
||||||
.uc-content .uc-revenue-copy-feedback { min-height: 18px; margin: 0; color: var(--color-ink-4); font-size: 12px; }
|
|
||||||
|
|
||||||
/* 邀请记录 — list with per-row status badge + text. */
|
|
||||||
.uc-content .uc-revenue-records__header { display: flex; justify-content: space-between; gap: 12px; }
|
|
||||||
.uc-content .uc-revenue-record-list { display: grid; margin-top: 12px; }
|
|
||||||
.uc-content .uc-revenue-record { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); }
|
|
||||||
.uc-content .uc-revenue-record__avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface-2); }
|
|
||||||
.uc-content .uc-revenue-record__avatar img { width: 100%; height: 100%; object-fit: cover; }
|
|
||||||
.uc-content .uc-revenue-record__main { display: grid; flex: 1; min-width: 0; gap: 3px; }
|
|
||||||
.uc-content .uc-revenue-record__main span,
|
|
||||||
.uc-content .uc-revenue-record__status small { color: var(--color-ink-4); font-size: 12px; }
|
|
||||||
.uc-content .uc-revenue-record__status { display: grid; justify-items: end; gap: 4px; }
|
|
||||||
.uc-content .uc-revenue-badge { padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
|
|
||||||
.uc-content .uc-revenue-badge.is-registered { color: #2563eb; background: rgba(37,99,235,.1); }
|
|
||||||
.uc-content .uc-revenue-badge.is-verified { color: #7c3aed; background: rgba(124,58,237,.1); }
|
|
||||||
.uc-content .uc-revenue-badge.is-rewarded { color: #16a34a; background: rgba(22,163,74,.1); }
|
|
||||||
.uc-content .uc-revenue-record-empty { padding: 22px; border-top: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); color: var(--color-ink-4); font-size: 13px; text-align: center; }
|
|
||||||
|
|
||||||
/* 键盘可聚焦:复制按钮与链接输入的可见焦点。 */
|
|
||||||
.uc-content .uc-revenue-copy:focus-visible,
|
|
||||||
.uc-content .uc-revenue-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
|
|
||||||
|
|
||||||
/* 移动端:单列、无横向溢出、复制按钮整行可点击。 */
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
.uc-content .uc-revenue-panel { padding: 18px; }
|
|
||||||
.uc-content .uc-revenue-stats { grid-template-columns: 1fr; }
|
|
||||||
.uc-content .uc-revenue-stat { border-right: 0; border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); }
|
|
||||||
.uc-content .uc-revenue-stat:last-child { border-bottom: 0; }
|
|
||||||
.uc-content .uc-revenue-link-row { flex-direction: column; }
|
|
||||||
.uc-content .uc-revenue-copy { width: 100%; }
|
|
||||||
.uc-content .uc-revenue-record { align-items: flex-start; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* New affiliate contract cards. */
|
|
||||||
.uc-content .aksrt-affiliate-panel { display:grid; gap:18px; padding:22px; border:1px solid var(--border,rgba(0,0,0,.08)); border-radius:var(--card-radius,16px); background:var(--surface, #fff); box-shadow:0 8px 24px rgba(15,23,42,.06); }
|
|
||||||
.uc-content .uc-panel-heading h2 { margin:0 0 4px; color:var(--text,#111827); }
|
|
||||||
.uc-content .uc-panel-heading p,.uc-content .uc-affiliate-note { margin:0; color:var(--muted,#6b7280); line-height:1.6; }
|
|
||||||
.uc-content .uc-affiliate-link-card { display:flex; align-items:end; gap:10px; padding:14px; border-radius:12px; background:var(--surface-muted,#f8fafc); }
|
|
||||||
.uc-content .uc-affiliate-link-card>div { flex:1; min-width:0; display:grid; gap:6px; }
|
|
||||||
.uc-content .uc-affiliate-link-card input { width:100%; min-width:0; height:40px; padding:0 10px; border:1px solid var(--border,#e5e7eb); border-radius:8px; background:var(--surface,#fff); color:var(--text,#111827); }
|
|
||||||
.uc-content .uc-affiliate-link-card button { white-space:nowrap; }
|
|
||||||
.uc-content .uc-affiliate-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
|
|
||||||
.uc-content .uc-affiliate-stats article { display:grid; gap:5px; padding:14px; border:1px solid var(--border,#e5e7eb); border-radius:12px; }
|
|
||||||
.uc-content .uc-affiliate-stats article:first-child strong { color:var(--danger,#dc2626); }
|
|
||||||
.uc-content .uc-affiliate-stats article strong { color:var(--primary,#2563eb); font-size:24px; font-variant-numeric:tabular-nums; }
|
|
||||||
.uc-content .uc-affiliate-link-card [data-affiliate-feedback] { grid-column:1/-1; margin:0; min-height:18px; color:var(--success,#16a34a); font-size:12px; }
|
|
||||||
.uc-content .uc-affiliate-link-card [data-affiliate-feedback].is-error { color:var(--danger,#dc2626); }
|
|
||||||
@media (max-width:640px) { .uc-content .aksrt-affiliate-panel { padding:16px; } .uc-content .uc-affiliate-link-card { align-items:stretch; flex-direction:column; } .uc-content .uc-affiliate-link-card button { width:100%; } .uc-content .uc-affiliate-stats { grid-template-columns:1fr; } }
|
|
||||||
|
|
||||||
/* The revenue page itself is a layout surface, not an additional card.
|
/* The revenue page itself is a layout surface, not an additional card.
|
||||||
* Keep card styling on its inner summary/details components only. */
|
* Keep card styling on its inner summary/details components only. */
|
||||||
@@ -175,18 +94,6 @@
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-content .uc-commission-card__action {
|
|
||||||
align-self: center;
|
|
||||||
margin-left: auto;
|
|
||||||
padding: 10px 16px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 999px;
|
|
||||||
color: #fff;
|
|
||||||
background: rgba(255, 255, 255, .14);
|
|
||||||
font-size: 14px;
|
|
||||||
backdrop-filter: blur(4px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 三 Tab 推广收益:佣金详细页采用紧凑的一列信息清单。 */
|
/* 三 Tab 推广收益:佣金详细页采用紧凑的一列信息清单。 */
|
||||||
.uc-content .uc-reward-area { display: grid; gap: 18px; padding: 24px 28px 30px; border-radius: 18px; background: var(--surface-1, #fff); box-shadow: 0 8px 26px rgba(15, 23, 42, .06); }
|
.uc-content .uc-reward-area { display: grid; gap: 18px; padding: 24px 28px 30px; border-radius: 18px; background: var(--surface-1, #fff); box-shadow: 0 8px 26px rgba(15, 23, 42, .06); }
|
||||||
.uc-content .uc-commission-summary + .uc-reward-area { margin-top: 28px; }
|
.uc-content .uc-commission-summary + .uc-reward-area { margin-top: 28px; }
|
||||||
@@ -204,22 +111,13 @@
|
|||||||
.uc-content .uc-revenue-summary-row > span { color: var(--color-ink-3); font-size: 14px; }
|
.uc-content .uc-revenue-summary-row > span { color: var(--color-ink-3); font-size: 14px; }
|
||||||
.uc-content .uc-revenue-summary-row > strong { color: var(--color-ink); font-size: 16px; }
|
.uc-content .uc-revenue-summary-row > strong { color: var(--color-ink); font-size: 16px; }
|
||||||
.uc-content .uc-revenue-summary-row > em { color: var(--color-ink-4); font-style: normal; }
|
.uc-content .uc-revenue-summary-row > em { color: var(--color-ink-4); font-style: normal; }
|
||||||
.uc-content .uc-revenue-count { display: flex; align-items: baseline; gap: 2px; }
|
.uc-content .uc-revenue-summary-row--link { grid-template-columns: 112px minmax(0, 1fr) auto auto; }
|
||||||
.uc-content .uc-revenue-count strong { color: var(--color-ink); font-size: 16px; }
|
.uc-content .uc-revenue-summary-row--link input { width: 100%; max-width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .12)); border-radius: 7px; color: var(--color-primary); background: var(--surface-2, #f8fafc); }
|
||||||
.uc-content .uc-revenue-count em { color: var(--color-ink-4); font-style: normal; }
|
.uc-content .uc-revenue-summary-row--link button { min-width: 76px; height: 38px; padding: 0 12px; border-radius: 7px; white-space: nowrap; }
|
||||||
.uc-content .uc-revenue-summary-row--link input { width: auto; max-width: 100%; min-width: 28ch; height: 38px; padding: 0 10px; border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .12)); border-radius: 7px; color: var(--color-primary); background: var(--surface-2, #f8fafc); }
|
|
||||||
.uc-content .uc-revenue-summary-row--link button { min-width: 64px; height: 38px; padding: 0 12px; border-radius: 7px; }
|
|
||||||
.uc-content .uc-revenue-summary-row--link small { grid-column: 2 / -1; min-height: 16px; color: var(--color-success, #16a34a); font-size: 12px; }
|
.uc-content .uc-revenue-summary-row--link small { grid-column: 2 / -1; min-height: 16px; color: var(--color-success, #16a34a); font-size: 12px; }
|
||||||
.uc-content .uc-revenue-summary-row--link small.is-error { color: var(--color-error, #dc2626); }
|
.uc-content .uc-revenue-summary-row--link small.is-error { color: var(--color-error, #dc2626); }
|
||||||
|
.uc-content .uc-revenue-summary-row--link button[hidden] { display: none; }
|
||||||
|
|
||||||
/* 推广二维码 — bundled qrcode canvas + download. */
|
|
||||||
.uc-content .uc-revenue-summary-row--qr { align-items: flex-start; }
|
|
||||||
.uc-content .uc-revenue-qr { display: grid; justify-items: start; gap: 8px; }
|
|
||||||
.uc-content .uc-revenue-qr canvas { display: block; width: 148px; height: 148px; border: 1px solid var(--color-line-soft, rgba(15, 23, 42, .12)); border-radius: 10px; background: #fff; }
|
|
||||||
.uc-content .uc-revenue-qr__actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
||||||
.uc-content .uc-revenue-qr__actions button { min-width: 96px; height: 32px; padding: 0 12px; border-radius: 7px; }
|
|
||||||
.uc-content .uc-revenue-qr small { min-height: 16px; color: var(--color-success, #16a34a); font-size: 12px; }
|
|
||||||
.uc-content .uc-revenue-qr small.is-error { color: var(--color-error, #dc2626); }
|
|
||||||
.uc-content .uc-revenue-summary-row--total > div { display: flex; flex-wrap: wrap; gap: 12px; }
|
.uc-content .uc-revenue-summary-row--total > div { display: flex; flex-wrap: wrap; gap: 12px; }
|
||||||
.uc-content .uc-revenue-summary-row--total strong { padding: 7px 11px; border-radius: 7px; color: var(--color-primary); background: var(--surface-2, #f8fafc); font-size: 14px; }
|
.uc-content .uc-revenue-summary-row--total strong { padding: 7px 11px; border-radius: 7px; color: var(--color-primary); background: var(--surface-2, #f8fafc); font-size: 14px; }
|
||||||
.uc-content .uc-revenue-summary-row--explain { align-items: start; padding-top: 16px; border-bottom: 0; }
|
.uc-content .uc-revenue-summary-row--explain { align-items: start; padding-top: 16px; border-bottom: 0; }
|
||||||
@@ -232,121 +130,10 @@
|
|||||||
.uc-content .uc-revenue-user-row small { color: var(--color-ink-4); font-size: 12px; }
|
.uc-content .uc-revenue-user-row small { color: var(--color-ink-4); font-size: 12px; }
|
||||||
.uc-content .uc-revenue-user-row > span { color: var(--color-success, #16a34a); font-size: 12px; }
|
.uc-content .uc-revenue-user-row > span { color: var(--color-success, #16a34a); font-size: 12px; }
|
||||||
|
|
||||||
.uc-content .uc-commission-card__action:hover {
|
|
||||||
background: rgba(255, 255, 255, .24);
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .aksrt-affiliate-panel {
|
|
||||||
gap: 24px;
|
|
||||||
padding: 34px 44px 38px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 18px;
|
|
||||||
background: var(--surface-1, #fff);
|
|
||||||
box-shadow: 0 8px 26px rgba(15, 23, 42, .06);
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-panel-heading {
|
|
||||||
padding-bottom: 20px;
|
|
||||||
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-panel-heading h2 {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin: 0 0 10px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-panel-heading h2::after {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: -11px;
|
|
||||||
left: 0;
|
|
||||||
height: 3px;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: #f1498c;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-panel-heading p {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 0;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card > div {
|
|
||||||
display: contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card > div > span {
|
|
||||||
color: var(--color-ink-4);
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card input {
|
|
||||||
height: 42px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 7px;
|
|
||||||
color: #ef5370;
|
|
||||||
background: #fff0f2;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card button {
|
|
||||||
min-height: 42px;
|
|
||||||
border-radius: 7px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card [data-affiliate-feedback] {
|
|
||||||
grid-column: 2 / -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-stats {
|
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-stats article {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
min-height: 48px;
|
|
||||||
padding: 0 14px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--surface-2, #f7f8fa);
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-stats article strong {
|
|
||||||
color: var(--color-primary);
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-stats article:first-child strong {
|
|
||||||
color: #e94568;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-note {
|
|
||||||
margin-top: -8px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.uc-content .uc-commission-summary {
|
.uc-content .uc-commission-summary {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-content .aksrt-affiliate-panel {
|
|
||||||
padding: 24px 20px 28px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 560px) {
|
@media (max-width: 560px) {
|
||||||
@@ -363,33 +150,22 @@
|
|||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card > div {
|
|
||||||
display: grid;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-link-card [data-affiliate-feedback] {
|
|
||||||
grid-column: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-affiliate-stats {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uc-content .uc-reward-area { padding: 20px 16px 24px; }
|
.uc-content .uc-reward-area { padding: 20px 16px 24px; }
|
||||||
.uc-content .uc-commission-summary + .uc-reward-area { margin-top: 20px; }
|
.uc-content .uc-commission-summary + .uc-reward-area { margin-top: 20px; }
|
||||||
.uc-content .uc-reward-area__heading { display: grid; gap: 4px; }
|
.uc-content .uc-reward-area__heading { display: grid; gap: 4px; }
|
||||||
.uc-content .uc-reward-tabs { gap: 16px; overflow-x: auto; }
|
.uc-content .uc-reward-tabs { gap: 16px; overflow-x: auto; }
|
||||||
.uc-content .uc-revenue-summary-row { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; }
|
.uc-content .uc-revenue-summary-row { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; }
|
||||||
.uc-content .uc-revenue-summary-row--link { grid-template-columns: minmax(0, 1fr) auto; }
|
.uc-content .uc-revenue-summary-row--link { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
|
||||||
.uc-content .uc-revenue-summary-row--link input { width: 100% !important; min-width: 0; }
|
.uc-content .uc-revenue-summary-row--link input { width: 100%; min-width: 0; }
|
||||||
|
.uc-content .uc-revenue-summary-row--link button { min-width: 62px; padding: 0 9px; }
|
||||||
.uc-content .uc-revenue-summary-row--link > span { grid-column: 1 / -1; }
|
.uc-content .uc-revenue-summary-row--link > span { grid-column: 1 / -1; }
|
||||||
.uc-content .uc-revenue-summary-row--link small { grid-column: 1 / -1; }
|
.uc-content .uc-revenue-summary-row--link small { grid-column: 1 / -1; }
|
||||||
.uc-content .uc-revenue-summary-row--explain { grid-template-columns: 1fr; }
|
.uc-content .uc-revenue-summary-row--explain { grid-template-columns: 1fr; }
|
||||||
.uc-content .uc-revenue-summary-row--explain .uc-reward-richtext { grid-column: 1; }
|
.uc-content .uc-revenue-summary-row--explain .uc-reward-richtext { grid-column: 1; }
|
||||||
.uc-content .uc-revenue-summary-row--qr { grid-template-columns: 1fr; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 推广海报预览弹窗:舞台居中,canvas 自适应弹窗宽度。 */
|
||||||
|
.uc-content .uc-affiliate-poster { display: grid; place-items: center; min-height: 120px; }
|
||||||
|
.uc-content .uc-affiliate-poster img,
|
||||||
|
.uc-content .uc-affiliate-poster canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; background: var(--surface-2, #f7f8fa); }
|
||||||
|
.uc-content .uc-affiliate-poster p { margin: 0; text-align: center; }
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* User Center - commission and revenue rewards.
|
* 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 {
|
.uc-content #panel-revenue.dashboard-panel {
|
||||||
@@ -10,106 +13,6 @@
|
|||||||
box-shadow: none;
|
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 {
|
.uc-reward-area {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
@@ -124,16 +27,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uc-reward-area__heading h3,
|
.uc-reward-area__heading h3,
|
||||||
.uc-reward-list-heading h4,
|
.uc-reward-list-heading h4 {
|
||||||
.uc-reward-block h4 {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-ink);
|
color: var(--color-ink);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-reward-area__heading > span,
|
.uc-reward-area__heading > span,
|
||||||
.uc-reward-list-heading p,
|
.uc-reward-list-heading p {
|
||||||
.uc-reward-block__heading p {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-ink-4);
|
color: var(--color-ink-4);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -188,63 +89,8 @@
|
|||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
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-status,
|
||||||
.uc-reward-copy-feedback {
|
.uc-reward-copy-feedback {
|
||||||
min-height: 17px;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-ink-4);
|
color: var(--color-ink-4);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -255,56 +101,6 @@
|
|||||||
color: var(--color-error, #dc2626);
|
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 {
|
.uc-reward-richtext {
|
||||||
color: var(--color-ink-3);
|
color: var(--color-ink-3);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -337,15 +133,13 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-list,
|
.uc-commission-list {
|
||||||
.uc-invite-list {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
border-top: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
|
border-top: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-row,
|
.uc-commission-row {
|
||||||
.uc-invite-record {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@@ -365,16 +159,14 @@
|
|||||||
background: rgba(201, 90, 49, .12);
|
background: rgba(201, 90, 49, .12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-row__main,
|
.uc-commission-row__main {
|
||||||
.uc-invite-record__main {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
gap: 3px;
|
gap: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-row__main strong,
|
.uc-commission-row__main strong {
|
||||||
.uc-invite-record__main strong {
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--color-ink);
|
color: var(--color-ink);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -383,8 +175,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-row__main span,
|
.uc-commission-row__main span,
|
||||||
.uc-commission-row__main time,
|
.uc-commission-row__main time {
|
||||||
.uc-invite-record__main span {
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--color-ink-4);
|
color: var(--color-ink-4);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -423,30 +214,6 @@
|
|||||||
background: rgba(168, 109, 40, .12);
|
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 {
|
.uc-reward-pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -481,15 +248,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.uc-commission-summary,
|
|
||||||
.uc-reward-pane--detail {
|
.uc-reward-pane--detail {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uc-commission-card {
|
|
||||||
min-height: 120px;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
@@ -497,24 +258,6 @@
|
|||||||
padding: 4px 0 0;
|
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 {
|
.uc-commission-row {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-73
@@ -125,19 +125,12 @@
|
|||||||
function setFeedback(text, error) { if (feedback) { feedback.textContent = text; feedback.classList.toggle('is-error', !!error); } }
|
function setFeedback(text, error) { if (feedback) { feedback.textContent = text; feedback.classList.toggle('is-error', !!error); } }
|
||||||
api('/revenue/me').then(function (r) {
|
api('/revenue/me').then(function (r) {
|
||||||
if (!r.ok) { setFeedback((r.json && r.json.message) || '推广数据加载失败。', true); return; }
|
if (!r.ok) { setFeedback((r.json && r.json.message) || '推广数据加载失败。', true); return; }
|
||||||
var j = r.json || {}, stats = j.stats || {};
|
var j = r.json || {};
|
||||||
if (input) {
|
if (input) {
|
||||||
input.value = j.url || '';
|
input.value = j.url || '';
|
||||||
/* Keep the complete ref URL readable on desktop; mobile CSS still caps it. */
|
|
||||||
var linkLength = String(j.url || '').length;
|
|
||||||
input.setAttribute('size', String(Math.max(28, Math.min(96, linkLength || 28))));
|
|
||||||
input.style.width = Math.max(28, Math.min(96, linkLength || 28)) + 'ch';
|
|
||||||
}
|
}
|
||||||
if (copy) copy.disabled = !j.url;
|
if (copy) copy.disabled = !j.url;
|
||||||
var ratio = root.querySelector('[data-affiliate-ratio]'); if (ratio) ratio.textContent = String(j.current_ratio || 0) + '%';
|
var ratio = root.querySelector('[data-affiliate-ratio]'); if (ratio) ratio.textContent = String(j.current_ratio || 0) + '%';
|
||||||
var promoters = root.querySelector('[data-affiliate-promoters]'); if (promoters) promoters.textContent = String(stats.promoters || 0);
|
|
||||||
var payers = root.querySelector('[data-affiliate-payers]'); if (payers) payers.textContent = String(stats.effective_payers || 0);
|
|
||||||
renderAffiliateQr(root, j.url || '');
|
|
||||||
initAffiliatePoster(root, j.url || '', j.poster || {}, j.site_name || document.title);
|
initAffiliatePoster(root, j.url || '', j.poster || {}, j.site_name || document.title);
|
||||||
}).catch(function () { setFeedback('推广数据加载失败。', true); });
|
}).catch(function () { setFeedback('推广数据加载失败。', true); });
|
||||||
if (copy) copy.addEventListener('click', function () {
|
if (copy) copy.addEventListener('click', function () {
|
||||||
@@ -148,78 +141,50 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===== Referral QR code (bundled qrcode-generator, no CDN) =====
|
// ===== Referral poster (canvas preview modal: hero image + copy + QR + link) =====
|
||||||
function renderAffiliateQr(root, url) {
|
|
||||||
var row = root.querySelector('[data-affiliate-qr-row]');
|
|
||||||
var canvas = root.querySelector('[data-affiliate-qr]');
|
|
||||||
if (!row || !canvas) return;
|
|
||||||
if (!url || typeof window.qrcode !== 'function') {
|
|
||||||
row.hidden = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var feedback = root.querySelector('[data-affiliate-qr-feedback]');
|
|
||||||
function setQrFeedback(text, error) { if (feedback) { feedback.textContent = text; feedback.classList.toggle('is-error', !!error); } }
|
|
||||||
try {
|
|
||||||
var qr = window.qrcode(0, 'M');
|
|
||||||
qr.addData(url);
|
|
||||||
qr.make();
|
|
||||||
var count = qr.getModuleCount();
|
|
||||||
var cell = 4, margin = 4;
|
|
||||||
var size = (count + margin * 2) * cell;
|
|
||||||
canvas.width = size;
|
|
||||||
canvas.height = size;
|
|
||||||
var ctx = canvas.getContext('2d');
|
|
||||||
ctx.fillStyle = '#ffffff';
|
|
||||||
ctx.fillRect(0, 0, size, size);
|
|
||||||
ctx.fillStyle = '#0f172a';
|
|
||||||
for (var r = 0; r < count; r++) {
|
|
||||||
for (var c = 0; c < count; c++) {
|
|
||||||
if (qr.isDark(r, c)) {
|
|
||||||
ctx.fillRect((c + margin) * cell, (r + margin) * cell, cell, cell);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
row.hidden = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var download = root.querySelector('[data-affiliate-qr-download]');
|
|
||||||
if (download) download.addEventListener('click', function () {
|
|
||||||
try {
|
|
||||||
var link = document.createElement('a');
|
|
||||||
link.download = 'referral-qr.png';
|
|
||||||
link.href = canvas.toDataURL('image/png');
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
link.remove();
|
|
||||||
setQrFeedback('二维码已下载。');
|
|
||||||
} catch (err) {
|
|
||||||
setQrFeedback('二维码下载失败,请截图保存。', true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== Referral poster (canvas: hero image + copy + QR + link) =====
|
|
||||||
function initAffiliatePoster(root, url, poster, siteName) {
|
function initAffiliatePoster(root, url, poster, siteName) {
|
||||||
var button = root.querySelector('[data-affiliate-poster]');
|
var button = root.querySelector('[data-affiliate-poster]');
|
||||||
if (!button) return;
|
var modal = document.querySelector('[data-aksrt-affiliate-poster-modal]');
|
||||||
|
var stage = document.querySelector('[data-affiliate-poster-stage]');
|
||||||
|
var download = document.querySelector('[data-affiliate-poster-download]');
|
||||||
|
if (!button || !modal) return;
|
||||||
if (!url || !poster || poster.enabled !== true) return;
|
if (!url || !poster || poster.enabled !== true) return;
|
||||||
button.hidden = false;
|
button.hidden = false;
|
||||||
|
[].forEach.call(modal.querySelectorAll('[data-affiliate-poster-close]'), function (closer) {
|
||||||
|
closer.addEventListener('click', function () { closeModal(modal); });
|
||||||
|
});
|
||||||
|
var canvas = null;
|
||||||
|
if (download) {
|
||||||
|
download.addEventListener('click', function () {
|
||||||
|
if (!canvas) return;
|
||||||
|
try {
|
||||||
|
var link = document.createElement('a');
|
||||||
|
link.download = 'referral-poster.png';
|
||||||
|
link.href = canvas.toDataURL('image/png');
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
link.remove();
|
||||||
|
} catch (err) {
|
||||||
|
/* Canvas is same-origin generated; download can only fail if the browser blocks it. */
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
button.addEventListener('click', function () {
|
button.addEventListener('click', function () {
|
||||||
var feedback = root.querySelector('[data-affiliate-qr-feedback]');
|
if (typeof window.qrcode !== 'function') {
|
||||||
function setPosterFeedback(text, error) { if (feedback) { feedback.textContent = text; feedback.classList.toggle('is-error', !!error); } }
|
if (stage) { stage.innerHTML = '<p class="muted-2-color em09">' + '二维码组件未加载。' + '</p>'; }
|
||||||
if (typeof window.qrcode !== 'function') { setPosterFeedback('二维码组件未加载。', true); return; }
|
openModal(modal);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (stage) { stage.innerHTML = '<p class="muted-2-color em09">' + '正在生成海报…' + '</p>'; }
|
||||||
|
if (download) download.hidden = true;
|
||||||
|
openModal(modal);
|
||||||
button.disabled = true;
|
button.disabled = true;
|
||||||
buildPosterCanvas(url, poster, siteName).then(function (canvas) {
|
buildPosterCanvas(url, poster, siteName).then(function (built) {
|
||||||
var link = document.createElement('a');
|
canvas = built;
|
||||||
link.download = 'referral-poster.png';
|
if (stage) { stage.innerHTML = ''; stage.appendChild(built); }
|
||||||
link.href = canvas.toDataURL('image/png');
|
if (download) download.hidden = false;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
link.remove();
|
|
||||||
setPosterFeedback('推广海报已生成并下载。');
|
|
||||||
}).catch(function () {
|
}).catch(function () {
|
||||||
setPosterFeedback('海报生成失败,请重试。', true);
|
if (stage) { stage.innerHTML = '<p class="muted-2-color em09">' + '海报生成失败,请重试。' + '</p>'; }
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
button.disabled = false;
|
button.disabled = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -193,7 +193,6 @@
|
|||||||
return loadPanel(name, forceLoad, queryParams).then(function() {
|
return loadPanel(name, forceLoad, queryParams).then(function() {
|
||||||
switchTo(name);
|
switchTo(name);
|
||||||
if (updateHistory) updateUrl(name);
|
if (updateHistory) updateUrl(name);
|
||||||
if (name === 'revenue' && typeof window.AKSRTRevenueCenterInit === 'function') window.AKSRTRevenueCenterInit(panels[name].panel);
|
|
||||||
if (name === 'revenue' && typeof window.AKSRTAffiliateRevenueInit === 'function') window.AKSRTAffiliateRevenueInit();
|
if (name === 'revenue' && typeof window.AKSRTAffiliateRevenueInit === 'function') window.AKSRTAffiliateRevenueInit();
|
||||||
if (name === 'revenue' && typeof window.AKSRTWithdrawInit === 'function') window.AKSRTWithdrawInit();
|
if (name === 'revenue' && typeof window.AKSRTWithdrawInit === 'function') window.AKSRTWithdrawInit();
|
||||||
}).catch(function() {
|
}).catch(function() {
|
||||||
@@ -290,7 +289,6 @@
|
|||||||
loadPanel('creator', true, pageUrl.searchParams).then(function() {
|
loadPanel('creator', true, pageUrl.searchParams).then(function() {
|
||||||
switchTo('creator');
|
switchTo('creator');
|
||||||
if (window.history.pushState) window.history.pushState({}, '', pageUrl.toString());
|
if (window.history.pushState) window.history.pushState({}, '', pageUrl.toString());
|
||||||
if (typeof window.AKSRTRevenueCenterInit === 'function') window.AKSRTRevenueCenterInit(creatorPanel);
|
|
||||||
}).catch(function() {
|
}).catch(function() {
|
||||||
notyf(i18n.networkError || '加载失败,请重试', 'danger');
|
notyf(i18n.networkError || '加载失败,请重试', 'danger');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Affiliate poster preview modal.
|
||||||
|
*
|
||||||
|
* The 推广海报 button lives in the revenue detail link row; the QR code is no
|
||||||
|
* longer rendered on its own — it exists only inside the generated poster.
|
||||||
|
*
|
||||||
|
* @package AKSRT
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('ABSPATH') || exit;
|
||||||
|
|
||||||
|
if (!empty($GLOBALS['aksrt_affiliate_poster_modal_rendered'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$GLOBALS['aksrt_affiliate_poster_modal_rendered'] = true;
|
||||||
|
?>
|
||||||
|
<div class="uc-modal" id="aksrt-affiliate-poster-modal" hidden data-aksrt-affiliate-poster-modal>
|
||||||
|
<div class="uc-modal__overlay" data-affiliate-poster-close></div>
|
||||||
|
<div class="uc-modal__dialog" role="dialog" aria-modal="true">
|
||||||
|
<button type="button" class="uc-modal__close" data-affiliate-poster-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><i class="fa fas fa-times" aria-hidden="true"></i></button>
|
||||||
|
<h3 class="uc-modal__title"><?php esc_html_e('推广海报', 'aksrt'); ?></h3>
|
||||||
|
<div class="uc-affiliate-poster" data-affiliate-poster-stage>
|
||||||
|
<p class="muted-2-color em09"><?php esc_html_e('正在生成海报…', 'aksrt'); ?></p>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="but jb-blue btn-block mt10" data-affiliate-poster-download hidden><?php esc_html_e('保存海报', 'aksrt'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -45,7 +45,6 @@ $commission_stats = class_exists('\AKSRT\Payment\CommissionLedger')
|
|||||||
? \AKSRT\Payment\CommissionLedger::get_instance()->overview($user_id)
|
? \AKSRT\Payment\CommissionLedger::get_instance()->overview($user_id)
|
||||||
: ['total' => 0, 'pending' => 0, 'settled' => 0, 'wallet' => 0];
|
: ['total' => 0, 'pending' => 0, 'settled' => 0, 'wallet' => 0];
|
||||||
$pending_commission = $normalize_balance($commission_stats['pending'] ?? '0')->decimal();
|
$pending_commission = $normalize_balance($commission_stats['pending'] ?? '0')->decimal();
|
||||||
$vip_ratios = [];
|
|
||||||
$commission_ratio = class_exists('\AKSRT\Settings\Settings')
|
$commission_ratio = class_exists('\AKSRT\Settings\Settings')
|
||||||
? (int) \AKSRT\Settings\Settings::affiliate_ratio_for_user($user_id)
|
? (int) \AKSRT\Settings\Settings::affiliate_ratio_for_user($user_id)
|
||||||
: 0;
|
: 0;
|
||||||
@@ -53,6 +52,10 @@ $details_text = trim((string) ($affiliate['promotion_text'] ?? ''));
|
|||||||
if ($details_text === '') {
|
if ($details_text === '') {
|
||||||
$details_text = __('好友通过推广链接完成符合条件的订单后,系统会按当前佣金比例记录返佣,结算后进入可提现余额。', 'aksrt');
|
$details_text = __('好友通过推广链接完成符合条件的订单后,系统会按当前佣金比例记录返佣,结算后进入可提现余额。', 'aksrt');
|
||||||
}
|
}
|
||||||
|
$details_title = trim((string) ($affiliate['details_title'] ?? ''));
|
||||||
|
if ($details_title === '') {
|
||||||
|
$details_title = __('返佣详解', 'aksrt');
|
||||||
|
}
|
||||||
|
|
||||||
$revenue_request = is_array($context['revenue_request'] ?? null) ? $context['revenue_request'] : [];
|
$revenue_request = is_array($context['revenue_request'] ?? null) ? $context['revenue_request'] : [];
|
||||||
$active_reward_tab = sanitize_key((string) ($revenue_request['reward_tab'] ?? ($_GET['reward_tab'] ?? 'detail')));
|
$active_reward_tab = sanitize_key((string) ($revenue_request['reward_tab'] ?? ($_GET['reward_tab'] ?? 'detail')));
|
||||||
@@ -106,7 +109,7 @@ $status_labels = [
|
|||||||
'cancelled' => __('已取消', 'aksrt'),
|
'cancelled' => __('已取消', 'aksrt'),
|
||||||
];
|
];
|
||||||
?>
|
?>
|
||||||
<div class="aksrt-revenue-page uc-revenue-panel" data-aksrt-revenue-page data-min-amount="<?php echo esc_attr((string) $withdraw_min); ?>">
|
<div class="uc-revenue-panel" data-aksrt-revenue-page>
|
||||||
<?php if ($affiliate_on) : ?>
|
<?php if ($affiliate_on) : ?>
|
||||||
<section class="uc-commission-summary" aria-label="<?php esc_attr_e('佣金概览', 'aksrt'); ?>">
|
<section class="uc-commission-summary" aria-label="<?php esc_attr_e('佣金概览', 'aksrt'); ?>">
|
||||||
<article class="uc-commission-card uc-commission-card--ratio">
|
<article class="uc-commission-card uc-commission-card--ratio">
|
||||||
@@ -142,25 +145,14 @@ $status_labels = [
|
|||||||
<div class="uc-revenue-summary-row uc-revenue-summary-row--link">
|
<div class="uc-revenue-summary-row uc-revenue-summary-row--link">
|
||||||
<span><?php esc_html_e('推广链接', 'aksrt'); ?></span>
|
<span><?php esc_html_e('推广链接', 'aksrt'); ?></span>
|
||||||
<input type="text" readonly data-affiliate-link aria-label="<?php esc_attr_e('推广链接', 'aksrt'); ?>">
|
<input type="text" readonly data-affiliate-link aria-label="<?php esc_attr_e('推广链接', 'aksrt'); ?>">
|
||||||
<button type="button" class="btn-primary btn-sm" data-affiliate-copy><?php esc_html_e('复制', 'aksrt'); ?></button>
|
<button type="button" class="btn-primary btn-sm" data-affiliate-copy><?php esc_html_e('复制链接', 'aksrt'); ?></button>
|
||||||
|
<?php if (!empty($affiliate['poster']['enabled'])) : ?><button type="button" class="btn-outline btn-sm" data-affiliate-poster hidden><?php esc_html_e('推广海报', 'aksrt'); ?></button><?php endif; ?>
|
||||||
<small data-affiliate-feedback role="status" aria-live="polite"></small>
|
<small data-affiliate-feedback role="status" aria-live="polite"></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="uc-revenue-summary-row uc-revenue-summary-row--qr" data-affiliate-qr-row>
|
|
||||||
<span><?php esc_html_e('推广二维码', 'aksrt'); ?></span>
|
|
||||||
<div class="uc-revenue-qr">
|
|
||||||
<canvas data-affiliate-qr width="148" height="148" aria-label="<?php esc_attr_e('推广链接二维码', 'aksrt'); ?>"></canvas>
|
|
||||||
<div class="uc-revenue-qr__actions">
|
|
||||||
<button type="button" class="btn-sm" data-affiliate-qr-download><?php esc_html_e('下载二维码', 'aksrt'); ?></button>
|
|
||||||
<button type="button" class="btn-sm" data-affiliate-poster hidden><?php esc_html_e('生成推广海报', 'aksrt'); ?></button>
|
|
||||||
</div>
|
|
||||||
<small data-affiliate-qr-feedback role="status" aria-live="polite"></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php if ($affiliate_on) : ?><div class="uc-revenue-summary-row"><span><?php esc_html_e('佣金比例', 'aksrt'); ?></span><strong data-affiliate-ratio><?php echo esc_html((string) $commission_ratio); ?>%</strong></div><?php endif; ?>
|
|
||||||
<div class="uc-revenue-summary-row"><span><?php esc_html_e('推广人数', 'aksrt'); ?></span><div class="uc-revenue-count"><strong data-affiliate-promoters>—</strong><em><?php esc_html_e('人', 'aksrt'); ?></em></div></div>
|
|
||||||
<?php if ($affiliate_on) : ?>
|
<?php if ($affiliate_on) : ?>
|
||||||
<div class="uc-revenue-summary-row uc-revenue-summary-row--total"><span><?php esc_html_e('累计佣金', 'aksrt'); ?></span><div><strong>累计<?php echo esc_html($format_amount($commission_stats['total'] ?? 0)); ?>元</strong><strong>待结算<?php echo esc_html($format_amount($commission_stats['pending'] ?? 0)); ?>元</strong></div></div>
|
<div class="uc-revenue-summary-row"><span><?php esc_html_e('佣金比例', 'aksrt'); ?></span><strong data-affiliate-ratio><?php echo esc_html((string) $commission_ratio); ?>%</strong></div>
|
||||||
<div class="uc-revenue-summary-row uc-revenue-summary-row--explain"><span><?php esc_html_e('返佣详解', 'aksrt'); ?></span><div class="uc-reward-richtext"><?php echo wp_kses_post(wpautop($details_text)); ?></div></div>
|
<div class="uc-revenue-summary-row uc-revenue-summary-row--total"><span><?php esc_html_e('累计佣金', 'aksrt'); ?></span><div><strong><?php printf(esc_html__('累计 %s 元', 'aksrt'), esc_html($format_amount($commission_stats['total'] ?? 0))); ?></strong><strong><?php printf(esc_html__('待结算 %s 元', 'aksrt'), esc_html($format_amount($commission_stats['pending'] ?? 0))); ?></strong></div></div>
|
||||||
|
<div class="uc-revenue-summary-row uc-revenue-summary-row--explain"><span><?php echo esc_html($details_title); ?></span><div class="uc-reward-richtext"><?php echo wp_kses_post(wpautop($details_text)); ?></div></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -202,3 +194,4 @@ $status_labels = [
|
|||||||
<?php if ($withdraw_on) {
|
<?php if ($withdraw_on) {
|
||||||
require __DIR__ . '/withdraw-modal.php';
|
require __DIR__ . '/withdraw-modal.php';
|
||||||
} ?>
|
} ?>
|
||||||
|
<?php require __DIR__ . '/affiliate-poster-modal.php'; ?>
|
||||||
|
|||||||
@@ -360,7 +360,6 @@ trait ScriptsPart1b {
|
|||||||
'user-center/vip',
|
'user-center/vip',
|
||||||
'user-center/level',
|
'user-center/level',
|
||||||
'user-center/settings',
|
'user-center/settings',
|
||||||
'revenue',
|
|
||||||
'user-center/revenue',
|
'user-center/revenue',
|
||||||
'user-center/revenue-earnings',
|
'user-center/revenue-earnings',
|
||||||
'user-center/responsive',
|
'user-center/responsive',
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ class PaymentRuntime {
|
|||||||
'window_days' => (int) CreditsRuntime::get_referral_settings()['window_days'],
|
'window_days' => (int) CreditsRuntime::get_referral_settings()['window_days'],
|
||||||
'settlement_days' => max(0, min(90, (int) ($settings['affiliate_settlement_days'] ?? 7))),
|
'settlement_days' => max(0, min(90, (int) ($settings['affiliate_settlement_days'] ?? 7))),
|
||||||
'promotion_text' => sanitize_textarea_field((string) ($settings['pay_rebate_text_details'] ?? '')),
|
'promotion_text' => sanitize_textarea_field((string) ($settings['pay_rebate_text_details'] ?? '')),
|
||||||
|
'details_title' => sanitize_text_field((string) ($settings['pay_rebate_text_details_title'] ?? '返佣详解')),
|
||||||
'poster' => [
|
'poster' => [
|
||||||
'enabled' => !isset($settings['pay_rebate_poster_s']) || !empty($settings['pay_rebate_poster_s']),
|
'enabled' => !isset($settings['pay_rebate_poster_s']) || !empty($settings['pay_rebate_poster_s']),
|
||||||
'image' => esc_url_raw((string) ($settings['pay_rebate_poster_img'] ?? '')),
|
'image' => esc_url_raw((string) ($settings['pay_rebate_poster_img'] ?? '')),
|
||||||
|
|||||||
@@ -430,9 +430,12 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
|
|||||||
const orderCenterJs = read('assets/js/order-center.js');
|
const orderCenterJs = read('assets/js/order-center.js');
|
||||||
|
|
||||||
assert.ok(scripts.includes("$profile_parts = ['layout', 'lists', 'modals'];"));
|
assert.ok(scripts.includes("$profile_parts = ['layout', 'lists', 'modals'];"));
|
||||||
for (const part of ['user-center/shell', 'user-center/credits', 'user-center/vip', 'user-center/level', 'user-center/settings', 'revenue', 'user-center/revenue', 'user-center/revenue-earnings', 'user-center/responsive']) {
|
for (const part of ['user-center/shell', 'user-center/credits', 'user-center/vip', 'user-center/level', 'user-center/settings', 'user-center/revenue', 'user-center/revenue-earnings', 'user-center/responsive']) {
|
||||||
assert.ok(scripts.includes(`'${part}'`), `missing direct route leaf ${part}`);
|
assert.ok(scripts.includes(`'${part}'`), `missing direct route leaf ${part}`);
|
||||||
}
|
}
|
||||||
|
// 死 leaf 已删除:独立的 revenue.css 只服务已下线的旧收益页标记。
|
||||||
|
assert.doesNotMatch(scripts, /'revenue',\n/);
|
||||||
|
assert.doesNotMatch(scripts, /assets\/css\/routes\/revenue\.css/);
|
||||||
assert.match(scripts, /assets\/css\/routes\/profile\/' \. \$part \. '\.css/);
|
assert.match(scripts, /assets\/css\/routes\/profile\/' \. \$part \. '\.css/);
|
||||||
assert.match(scripts, /assets\/css\/routes\/' \. \$part \. '\.css/);
|
assert.match(scripts, /assets\/css\/routes\/' \. \$part \. '\.css/);
|
||||||
assert.match(scripts, /filemtime\(\$part_path\)/);
|
assert.match(scripts, /filemtime\(\$part_path\)/);
|
||||||
|
|||||||
@@ -20,21 +20,37 @@ test('QR generator is bundled locally; no external QR CDN in front-end sources',
|
|||||||
assert.doesNotMatch(sources, /cdnjs\.cloudflare\.com[^"']*qrcode|cdn\.jsdelivr\.net[^"']*qrcode|unpkg\.com[^"']*qrcode/)
|
assert.doesNotMatch(sources, /cdnjs\.cloudflare\.com[^"']*qrcode|cdn\.jsdelivr\.net[^"']*qrcode|unpkg\.com[^"']*qrcode/)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('revenue page renders the QR row and credits.js draws + downloads it', () => {
|
test('revenue detail card is a four-row info list with no standalone QR block', () => {
|
||||||
const template = read('inc', 'helpers', 'user-center-renderers', 'profile-revenue.php')
|
const template = read('inc', 'helpers', 'user-center-renderers', 'profile-revenue.php')
|
||||||
assert.match(template, /data-affiliate-qr-row/)
|
// 二维码不再作为独立行:整行 markup 已删除。
|
||||||
assert.match(template, /data-affiliate-qr(?!-)/)
|
assert.doesNotMatch(template, /data-affiliate-qr-row/)
|
||||||
assert.match(template, /data-affiliate-qr-download/)
|
assert.doesNotMatch(template, /data-affiliate-qr(?!-)/)
|
||||||
|
assert.doesNotMatch(template, /data-affiliate-qr-download/)
|
||||||
|
assert.doesNotMatch(template, /data-affiliate-qr-feedback/)
|
||||||
|
assert.doesNotMatch(template, /<canvas/)
|
||||||
|
// 推广海报按钮并入推广链接行([Url][复制链接][推广海报])。
|
||||||
|
assert.match(template, /uc-revenue-summary-row--link/)
|
||||||
|
assert.match(template, /data-affiliate-link/)
|
||||||
|
assert.match(template, /data-affiliate-copy/)
|
||||||
assert.match(template, /data-affiliate-poster/)
|
assert.match(template, /data-affiliate-poster/)
|
||||||
|
assert.match(template, /data-affiliate-feedback/)
|
||||||
|
// 四行固定标签:推广链接 / 佣金比例 / 累计佣金 / 返佣详解。
|
||||||
|
for (const label of ['推广链接', '佣金比例', '累计佣金']) {
|
||||||
|
assert.match(template, new RegExp('<span><\\?php [a-z_]+\\([^)]*' + label), 'detail row label ' + label)
|
||||||
|
}
|
||||||
|
// 返佣详解标题走可配置字段,不再硬编码。
|
||||||
|
assert.match(template, /esc_html\(\$details_title\)/)
|
||||||
|
|
||||||
const script = read('assets', 'js', 'credits.js')
|
const script = read('assets', 'js', 'credits.js')
|
||||||
assert.match(script, /renderAffiliateQr\(root, j\.url \|\| ''\)/)
|
// 独立二维码绘制函数已删除;window.qrcode 仅供海报使用。
|
||||||
// 库缺失时整行隐藏,不抛错。
|
assert.doesNotMatch(script, /function renderAffiliateQr/)
|
||||||
assert.match(script, /typeof window\.qrcode !== 'function'/)
|
assert.doesNotMatch(script, /renderAffiliateQr\(/)
|
||||||
assert.match(script, /row\.hidden = true/)
|
assert.doesNotMatch(script, /data-affiliate-qr/)
|
||||||
// Canvas 绘制(isDark 逐模块填充)+ PNG 下载。
|
// 海报弹窗:舞台 + 保存按钮 + 复用 openModal/closeModal。
|
||||||
assert.match(script, /qr\.isDark\(r, c\)/)
|
assert.match(script, /data-affiliate-poster-stage/)
|
||||||
assert.match(script, /canvas\.toDataURL\('image\/png'\)/)
|
assert.match(script, /data-affiliate-poster-download/)
|
||||||
|
assert.match(script, /openModal\(modal\)/)
|
||||||
|
assert.match(script, /link\.download = 'referral-poster\.png'/)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('poster canvas is built from admin-configured copy and gated on the poster switch', () => {
|
test('poster canvas is built from admin-configured copy and gated on the poster switch', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user