fix: improve promotion tabs and referral layout
This commit is contained in:
@@ -5,5 +5,5 @@
|
||||
@import url("user-center/settings.css");
|
||||
@import url("revenue.css");
|
||||
@import url("user-center/revenue.css");
|
||||
@import url("user-center/promotion.css");
|
||||
@import url("user-center/revenue-earnings.css");
|
||||
@import url("user-center/responsive.css");
|
||||
|
||||
+84
-84
@@ -1,76 +1,76 @@
|
||||
/**
|
||||
* User Center — 推广中心 (promotion / invite) standalone tab.
|
||||
* User Center — revenue standalone tab.
|
||||
*
|
||||
* Hosts the [data-aksrt-invite] card moved out of the revenue tab. Priority
|
||||
* order: 成果概览 → 分享操作 → 奖励说明 → 邀请记录. Status/feedback are text
|
||||
* (data-invite-status / data-invite-copy-feedback), never colour-only.
|
||||
*/
|
||||
|
||||
/* Standalone panel: the uc-promotion-panel is the only card, so flatten the
|
||||
/* 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-promotion.dashboard-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
.uc-content .uc-promotion-page { padding: 4px 0; }
|
||||
.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-promotion-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-promotion-card { margin: 0; }
|
||||
.uc-content .uc-promotion-panel__header { display: flex; align-items: center; gap: 12px; }
|
||||
.uc-content .uc-promotion-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-promotion-panel__eyebrow { margin: 0 0 2px; color: #b8377d; font-size: 12px; font-weight: 700; }
|
||||
.uc-content .uc-promotion-panel__header h3 { margin: 0; font-size: 19px; }
|
||||
.uc-content .uc-promotion-panel__intro,
|
||||
.uc-content .uc-promotion-section__header p { margin: 0; color: var(--color-ink-4); font-size: 13px; line-height: 1.65; }
|
||||
.uc-content .uc-promotion-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-promotion-panel__status.is-error,
|
||||
.uc-content .uc-promotion-copy-feedback.is-error { color: var(--color-error, #dc2626); }
|
||||
.uc-content .uc-promotion-section { padding-top: 2px; }
|
||||
.uc-content .uc-promotion-section h4 { margin: 0 0 4px; font-size: 15px; }
|
||||
.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-promotion-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-promotion-stat { display: grid; gap: 4px; padding: 16px; border-right: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); }
|
||||
.uc-content .uc-promotion-stat:last-child { border-right: 0; }
|
||||
.uc-content .uc-promotion-stat span,
|
||||
.uc-content .uc-promotion-stat small { color: var(--color-ink-4); font-size: 12px; }
|
||||
.uc-content .uc-promotion-stat strong { color: #b8377d; font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.1; }
|
||||
.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-promotion-share { display: grid; gap: 10px; margin-top: 12px; }
|
||||
.uc-content .uc-promotion-code { display: flex; align-items: baseline; gap: 10px; color: var(--color-ink-4); font-size: 13px; }
|
||||
.uc-content .uc-promotion-code strong { color: var(--color-ink); font-size: 19px; letter-spacing: .08em; }
|
||||
.uc-content .uc-promotion-link-row { display: flex; gap: 10px; }
|
||||
.uc-content .uc-promotion-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-promotion-copy { min-width: 108px; }
|
||||
.uc-content .uc-promotion-copy-feedback { min-height: 18px; margin: 0; color: var(--color-ink-4); font-size: 12px; }
|
||||
.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-promotion-records__header { display: flex; justify-content: space-between; gap: 12px; }
|
||||
.uc-content .uc-promotion-record-list { display: grid; margin-top: 12px; }
|
||||
.uc-content .uc-promotion-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-promotion-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-promotion-record__avatar img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.uc-content .uc-promotion-record__main { display: grid; flex: 1; min-width: 0; gap: 3px; }
|
||||
.uc-content .uc-promotion-record__main span,
|
||||
.uc-content .uc-promotion-record__status small { color: var(--color-ink-4); font-size: 12px; }
|
||||
.uc-content .uc-promotion-record__status { display: grid; justify-items: end; gap: 4px; }
|
||||
.uc-content .uc-promotion-badge { padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
|
||||
.uc-content .uc-promotion-badge.is-registered { color: #2563eb; background: rgba(37,99,235,.1); }
|
||||
.uc-content .uc-promotion-badge.is-verified { color: #7c3aed; background: rgba(124,58,237,.1); }
|
||||
.uc-content .uc-promotion-badge.is-rewarded { color: #16a34a; background: rgba(22,163,74,.1); }
|
||||
.uc-content .uc-promotion-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-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-promotion-copy:focus-visible,
|
||||
.uc-content .uc-promotion-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
|
||||
.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-promotion-panel { padding: 18px; }
|
||||
.uc-content .uc-promotion-stats { grid-template-columns: 1fr; }
|
||||
.uc-content .uc-promotion-stat { border-right: 0; border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,.06)); }
|
||||
.uc-content .uc-promotion-stat:last-child { border-bottom: 0; }
|
||||
.uc-content .uc-promotion-link-row { flex-direction: column; }
|
||||
.uc-content .uc-promotion-copy { width: 100%; }
|
||||
.uc-content .uc-promotion-record { align-items: flex-start; }
|
||||
.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. */
|
||||
@@ -183,31 +183,31 @@
|
||||
.uc-content .uc-reward-tabs a { position: relative; padding: 0 0 12px; color: var(--color-ink-4); font-size: 14px; text-decoration: none; }
|
||||
.uc-content .uc-reward-tabs a.is-active { color: var(--color-primary); font-weight: 700; }
|
||||
.uc-content .uc-reward-tabs a.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 99px; background: var(--color-primary); content: ""; }
|
||||
.uc-content .uc-promotion-summary-list { display: grid; gap: 0; max-width: 920px; }
|
||||
.uc-content .uc-revenue-summary-list { display: grid; gap: 0; max-width: 920px; }
|
||||
.uc-content .uc-reward-pane--detail { grid-template-columns: minmax(0, 1fr); width: 100%; }
|
||||
.uc-content .uc-reward-pane--detail .uc-promotion-summary-list { width: 100%; max-width: none; }
|
||||
.uc-content .uc-promotion-summary-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07)); }
|
||||
.uc-content .uc-promotion-summary-row > span { color: var(--color-ink-3); font-size: 14px; }
|
||||
.uc-content .uc-promotion-summary-row > strong { color: var(--color-ink); font-size: 16px; }
|
||||
.uc-content .uc-promotion-summary-row > em { color: var(--color-ink-4); font-style: normal; }
|
||||
.uc-content .uc-promotion-count { display: flex; align-items: baseline; gap: 2px; }
|
||||
.uc-content .uc-promotion-count strong { color: var(--color-ink); font-size: 16px; }
|
||||
.uc-content .uc-promotion-count em { color: var(--color-ink-4); font-style: normal; }
|
||||
.uc-content .uc-promotion-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-promotion-summary-row--link button { min-width: 64px; height: 38px; padding: 0 12px; border-radius: 7px; }
|
||||
.uc-content .uc-promotion-summary-row--link small { grid-column: 2 / -1; min-height: 16px; color: var(--color-success, #16a34a); font-size: 12px; }
|
||||
.uc-content .uc-promotion-summary-row--link small.is-error { color: var(--color-error, #dc2626); }
|
||||
.uc-content .uc-promotion-summary-row--total > div { display: flex; flex-wrap: wrap; gap: 12px; }
|
||||
.uc-content .uc-promotion-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-promotion-summary-row--explain { align-items: start; padding-top: 16px; border-bottom: 0; }
|
||||
.uc-content .uc-promotion-summary-row--explain .uc-reward-richtext { grid-column: 2 / -1; color: var(--color-ink-3); font-size: 14px; line-height: 1.75; }
|
||||
.uc-content .uc-promotion-summary-row--explain .uc-reward-richtext p { margin: 0; }
|
||||
.uc-content .uc-promotion-user-list { display: grid; }
|
||||
.uc-content .uc-promotion-user-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07)); }
|
||||
.uc-content .uc-promotion-user-row img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
|
||||
.uc-content .uc-promotion-user-row > div { display: grid; flex: 1; gap: 3px; min-width: 0; }
|
||||
.uc-content .uc-promotion-user-row small { color: var(--color-ink-4); font-size: 12px; }
|
||||
.uc-content .uc-promotion-user-row > span { color: var(--color-success, #16a34a); font-size: 12px; }
|
||||
.uc-content .uc-reward-pane--detail .uc-revenue-summary-list { width: 100%; max-width: none; }
|
||||
.uc-content .uc-revenue-summary-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07)); }
|
||||
.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 > 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-count strong { color: var(--color-ink); font-size: 16px; }
|
||||
.uc-content .uc-revenue-count em { color: var(--color-ink-4); font-style: normal; }
|
||||
.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.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 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 .uc-reward-richtext { grid-column: 2 / -1; color: var(--color-ink-3); font-size: 14px; line-height: 1.75; }
|
||||
.uc-content .uc-revenue-summary-row--explain .uc-reward-richtext p { margin: 0; }
|
||||
.uc-content .uc-revenue-user-list { display: grid; }
|
||||
.uc-content .uc-revenue-user-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .07)); }
|
||||
.uc-content .uc-revenue-user-row img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
|
||||
.uc-content .uc-revenue-user-row > div { display: grid; flex: 1; gap: 3px; min-width: 0; }
|
||||
.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-commission-card__action:hover {
|
||||
background: rgba(255, 255, 255, .24);
|
||||
@@ -360,11 +360,11 @@
|
||||
.uc-content .uc-reward-area { padding: 20px 16px 24px; }
|
||||
.uc-content .uc-reward-area__heading { display: grid; gap: 4px; }
|
||||
.uc-content .uc-reward-tabs { gap: 16px; overflow-x: auto; }
|
||||
.uc-content .uc-promotion-summary-row { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; }
|
||||
.uc-content .uc-promotion-summary-row--link { grid-template-columns: minmax(0, 1fr) auto; }
|
||||
.uc-content .uc-promotion-summary-row--link input { width: 100% !important; min-width: 0; }
|
||||
.uc-content .uc-promotion-summary-row--link > span { grid-column: 1 / -1; }
|
||||
.uc-content .uc-promotion-summary-row--link small { grid-column: 1 / -1; }
|
||||
.uc-content .uc-promotion-summary-row--explain { grid-template-columns: 1fr; }
|
||||
.uc-content .uc-promotion-summary-row--explain .uc-reward-richtext { grid-column: 1; }
|
||||
.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 input { width: 100% !important; min-width: 0; }
|
||||
.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--explain { grid-template-columns: 1fr; }
|
||||
.uc-content .uc-revenue-summary-row--explain .uc-reward-richtext { grid-column: 1; }
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* User Center - commission and promotion rewards.
|
||||
* User Center - commission and revenue rewards.
|
||||
*/
|
||||
|
||||
.uc-content #panel-revenue.dashboard-panel {
|
||||
|
||||
@@ -736,7 +736,7 @@ body.aksrt-user-center .uc-content,
|
||||
|
||||
.uc-service-grid__item--cart .uc-service-grid__icon { color: #dd6941; background: rgba(238, 109, 61, 0.12); }
|
||||
.uc-service-grid__item--level .uc-service-grid__icon { color: #9b6b0a; background: rgba(234, 179, 8, 0.13); }
|
||||
.uc-service-grid__item--promotion .uc-service-grid__icon { color: #b8377d; background: rgba(219, 39, 119, 0.12); }
|
||||
.uc-service-grid__item--revenue .uc-service-grid__icon { color: #b8377d; background: rgba(219, 39, 119, 0.12); }
|
||||
.uc-service-grid__item--auth .uc-service-grid__icon { color: #287bc4; background: rgba(14, 165, 233, 0.12); }
|
||||
.uc-service-grid__item--orders .uc-service-grid__icon { color: #c05621; background: rgba(234, 88, 12, 0.12); }
|
||||
.uc-service-grid__item--notice .uc-service-grid__icon { color: #d04b65; background: rgba(244, 63, 94, 0.11); }
|
||||
|
||||
+7
-202
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* 功能:
|
||||
* - 签到 panel:拉取 /signin/today,按钮触发 POST /signin
|
||||
* - 邀请 panel:拉取 /invite/me,复制邀请链接
|
||||
* - revenue panel:拉取 /revenue/me,复制推广链接
|
||||
*
|
||||
* 仅在 page-profile 页面 + 启用积分时加载。
|
||||
*/
|
||||
@@ -189,210 +189,16 @@
|
||||
});
|
||||
}
|
||||
|
||||
// ===== 邀请 =====
|
||||
function initInvite() {
|
||||
var root = document.querySelector('[data-aksrt-invite]');
|
||||
if (!root) return;
|
||||
var linkInput = root.querySelector('[data-invite-link]');
|
||||
var copyBtn = root.querySelector('[data-invite-copy]');
|
||||
var stats = root.querySelector('[data-invite-stats]');
|
||||
var codeEl = root.querySelector('[data-invite-code]');
|
||||
var listEl = root.querySelector('[data-invite-list]');
|
||||
var totalEl = root.querySelector('[data-invite-total]');
|
||||
var statusEl = root.querySelector('[data-invite-status]');
|
||||
var copyFeedback = root.querySelector('[data-invite-copy-feedback]');
|
||||
|
||||
function setStatus(text, isError) {
|
||||
if (!statusEl) return;
|
||||
statusEl.textContent = text;
|
||||
statusEl.classList.toggle('is-error', !!isError);
|
||||
}
|
||||
|
||||
function setCopyFeedback(text, isError) {
|
||||
if (!copyFeedback) return;
|
||||
copyFeedback.textContent = text;
|
||||
copyFeedback.classList.toggle('is-error', !!isError);
|
||||
}
|
||||
|
||||
function escapeHtml(value) {
|
||||
return String(value == null ? '' : value)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
function formatDate(value) {
|
||||
if (!value || value === '0000-00-00 00:00:00') return '';
|
||||
var date = new Date(String(value).replace(' ', 'T') + 'Z');
|
||||
if (isNaN(date.getTime())) return String(value).slice(0, 16);
|
||||
function pad(n) { return n < 10 ? '0' + n : String(n); }
|
||||
return date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' + pad(date.getDate()) + ' ' + pad(date.getHours()) + ':' + pad(date.getMinutes());
|
||||
}
|
||||
|
||||
function statusMeta(status) {
|
||||
if (status === 'rewarded') {
|
||||
return { label: '已奖励', text: '奖励已发放', className: 'is-rewarded' };
|
||||
}
|
||||
if (status === 'verified') {
|
||||
return { label: '已验证', text: '等待奖励发放', className: 'is-verified' };
|
||||
}
|
||||
return { label: '已注册', text: '等待完成验证', className: 'is-registered' };
|
||||
}
|
||||
|
||||
function setCopyText(text) {
|
||||
if (!copyBtn) return;
|
||||
var label = copyBtn.querySelector('span');
|
||||
if (label) label.textContent = text;
|
||||
else copyBtn.textContent = text;
|
||||
}
|
||||
|
||||
function renderInviteList(items, total) {
|
||||
if (!listEl) return;
|
||||
listEl.classList.remove('is-loading');
|
||||
if (totalEl) {
|
||||
if (total > items.length) totalEl.textContent = '最近 ' + items.length + ' 条 / 共 ' + total + ' 条';
|
||||
else totalEl.textContent = total ? '共 ' + total + ' 条' : '暂无记录';
|
||||
}
|
||||
if (!items.length) {
|
||||
listEl.innerHTML = '<div class="uc-promotion-record-empty">分享链接后,好友注册记录会显示在这里。</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
listEl.innerHTML = items.map(function (item) {
|
||||
var name = item.invitee_name || (item.invitee_id ? '用户 #' + item.invitee_id : '受邀用户');
|
||||
var first = name ? name.charAt(0).toUpperCase() : '?';
|
||||
var meta = statusMeta(item.status);
|
||||
var createdAt = formatDate(item.created_at);
|
||||
var rewardedAt = formatDate(item.rewarded_at);
|
||||
var statusText = meta.text;
|
||||
if (item.status === 'rewarded' && rewardedAt) statusText = '奖励于 ' + rewardedAt;
|
||||
var avatar = item.invitee_avatar
|
||||
? '<img src="' + escapeHtml(item.invitee_avatar) + '" alt="">'
|
||||
: '<span>' + escapeHtml(first) + '</span>';
|
||||
|
||||
return '<div class="uc-promotion-record ' + meta.className + '">' +
|
||||
'<div class="uc-promotion-record__avatar">' + avatar + '</div>' +
|
||||
'<div class="uc-promotion-record__main">' +
|
||||
'<strong>' + escapeHtml(name) + '</strong>' +
|
||||
'<span>' + (createdAt ? '注册于 ' + escapeHtml(createdAt) : '注册时间未知') + '</span>' +
|
||||
'</div>' +
|
||||
'<div class="uc-promotion-record__status">' +
|
||||
'<span class="uc-promotion-badge ' + meta.className + '">' + meta.label + '</span>' +
|
||||
'<small>' + escapeHtml(statusText) + '</small>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
api('/invite/me').then(function (r) {
|
||||
if (!r.ok) {
|
||||
if (linkInput) linkInput.value = '';
|
||||
if (copyBtn) copyBtn.disabled = true;
|
||||
if (codeEl) codeEl.textContent = '--';
|
||||
if (stats) {
|
||||
stats.querySelectorAll('[data-stat]').forEach(function (el) {
|
||||
el.textContent = '—';
|
||||
});
|
||||
}
|
||||
setStatus((r.json && r.json.message) || '推广数据加载失败,请稍后刷新。', true);
|
||||
return;
|
||||
}
|
||||
var j = r.json || {};
|
||||
if (linkInput) linkInput.value = j.invite_url || '';
|
||||
if (copyBtn) copyBtn.disabled = !j.invite_url;
|
||||
if (codeEl) codeEl.textContent = j.code || '--';
|
||||
if (stats && j.stats) {
|
||||
stats.querySelectorAll('[data-stat]').forEach(function (el) {
|
||||
var k = el.getAttribute('data-stat');
|
||||
el.textContent = (j.stats[k] || 0).toString();
|
||||
});
|
||||
}
|
||||
setStatus('推广数据已更新。');
|
||||
}).catch(function () {
|
||||
if (copyBtn) copyBtn.disabled = true;
|
||||
if (codeEl) codeEl.textContent = '--';
|
||||
if (stats) {
|
||||
stats.querySelectorAll('[data-stat]').forEach(function (el) {
|
||||
el.textContent = '—';
|
||||
});
|
||||
}
|
||||
setStatus('推广数据加载失败,请检查网络后重试。', true);
|
||||
});
|
||||
|
||||
if (listEl) {
|
||||
api('/invite/list?per_page=8').then(function (r) {
|
||||
if (!r.ok) {
|
||||
listEl.classList.remove('is-loading');
|
||||
listEl.innerHTML = '<div class="uc-promotion-record-empty">邀请记录加载失败,请稍后刷新。</div>';
|
||||
if (totalEl) totalEl.textContent = '加载失败';
|
||||
return;
|
||||
}
|
||||
var j = r.json || {};
|
||||
renderInviteList(j.items || [], Number(j.total || 0));
|
||||
}).catch(function () {
|
||||
listEl.classList.remove('is-loading');
|
||||
listEl.innerHTML = '<div class="uc-promotion-record-empty">邀请记录加载失败,请稍后刷新。</div>';
|
||||
if (totalEl) totalEl.textContent = '加载失败';
|
||||
});
|
||||
}
|
||||
|
||||
if (!copyBtn) return;
|
||||
var copying = false;
|
||||
copyBtn.addEventListener('click', function () {
|
||||
if (copying || !linkInput || !linkInput.value) return;
|
||||
copying = true;
|
||||
copyBtn.disabled = true;
|
||||
setCopyFeedback('正在复制…');
|
||||
|
||||
function copied() {
|
||||
setCopyText('已复制');
|
||||
setCopyFeedback('推广链接已复制到剪贴板。');
|
||||
setTimeout(function () {
|
||||
setCopyText('复制链接');
|
||||
setCopyFeedback('');
|
||||
copyBtn.disabled = false;
|
||||
copying = false;
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function copyFailed() {
|
||||
setCopyText('复制链接');
|
||||
setCopyFeedback('复制失败,请手动选择并复制链接。', true);
|
||||
copyBtn.disabled = false;
|
||||
copying = false;
|
||||
linkInput.focus();
|
||||
linkInput.select();
|
||||
}
|
||||
|
||||
if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
|
||||
navigator.clipboard.writeText(linkInput.value).then(copied).catch(copyFailed);
|
||||
return;
|
||||
}
|
||||
|
||||
linkInput.focus();
|
||||
linkInput.select();
|
||||
try {
|
||||
if (document.execCommand('copy')) {
|
||||
copied();
|
||||
return;
|
||||
}
|
||||
} catch (_) {}
|
||||
copyFailed();
|
||||
});
|
||||
}
|
||||
|
||||
// ===== Forward-only affiliate promotion center =====
|
||||
function initAffiliatePromotion() {
|
||||
var root = document.querySelector('[data-aksrt-promotion-page]');
|
||||
// ===== Forward-only affiliate revenue center =====
|
||||
function initAffiliateRevenue() {
|
||||
var root = document.querySelector('[data-aksrt-revenue-page]');
|
||||
if (!root || root.dataset.affiliateBound) return;
|
||||
root.dataset.affiliateBound = '1';
|
||||
var input = root.querySelector('[data-affiliate-link]');
|
||||
var copy = root.querySelector('[data-affiliate-copy]');
|
||||
var feedback = root.querySelector('[data-affiliate-feedback]');
|
||||
function setFeedback(text, error) { if (feedback) { feedback.textContent = text; feedback.classList.toggle('is-error', !!error); } }
|
||||
api('/promotion/me').then(function (r) {
|
||||
api('/revenue/me').then(function (r) {
|
||||
if (!r.ok) { setFeedback((r.json && r.json.message) || '推广数据加载失败。', true); return; }
|
||||
var j = r.json || {}, stats = j.stats || {};
|
||||
if (input) {
|
||||
@@ -415,7 +221,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
window.AKSRTAffiliatePromotionInit = initAffiliatePromotion;
|
||||
window.AKSRTAffiliateRevenueInit = initAffiliateRevenue;
|
||||
|
||||
|
||||
|
||||
@@ -1030,8 +836,7 @@
|
||||
function bootAssets() {
|
||||
initSignin();
|
||||
initSigninGoto();
|
||||
initInvite();
|
||||
initAffiliatePromotion();
|
||||
initAffiliateRevenue();
|
||||
initVipShop();
|
||||
initVipPointsExchange();
|
||||
initCardPass();
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
/**
|
||||
* Commission center referral link and invited-user records.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function init(root) {
|
||||
var data = window.aksrtData || {};
|
||||
if (!root || !data) return;
|
||||
|
||||
var rest = data.restUrl || data.apiUrl || ((data.siteUrl || '').replace(/\/$/, '') + '/wp-json/aksrt/v1');
|
||||
if (!rest) return;
|
||||
rest = rest.replace(/\/?$/, '');
|
||||
|
||||
function api(path) {
|
||||
return fetch(rest + path, {
|
||||
credentials: 'same-origin',
|
||||
headers: { 'X-WP-Nonce': data.restNonce || data.nonce || '' }
|
||||
}).then(function (response) {
|
||||
return response.json().catch(function () { return {}; }).then(function (json) {
|
||||
return { ok: response.ok, json: json };
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function escapeHtml(value) {
|
||||
return String(value == null ? '' : value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
||||
}
|
||||
|
||||
function formatDate(value) {
|
||||
if (!value || value === '0000-00-00 00:00:00') return '';
|
||||
var date = new Date(String(value).replace(' ', 'T') + 'Z');
|
||||
return isNaN(date.getTime()) ? String(value).slice(0, 16) : date.toLocaleString();
|
||||
}
|
||||
|
||||
var linkInput = root.querySelector('[data-invite-link]');
|
||||
var codeEl = root.querySelector('[data-invite-code]');
|
||||
var copyBtn = root.querySelector('[data-invite-copy]');
|
||||
var statusEl = root.querySelector('[data-invite-status]');
|
||||
var feedbackEl = root.querySelector('[data-invite-copy-feedback]');
|
||||
var listEl = root.querySelector('[data-invite-list]');
|
||||
var totalEl = root.querySelector('[data-invite-total]');
|
||||
|
||||
function setStatus(text, error) {
|
||||
if (!statusEl) return;
|
||||
statusEl.textContent = text || '';
|
||||
statusEl.classList.toggle('is-error', !!error);
|
||||
}
|
||||
|
||||
api('/invite/me').then(function (result) {
|
||||
if (!result.ok) {
|
||||
setStatus((result.json && result.json.message) || '推广数据加载失败', true);
|
||||
return;
|
||||
}
|
||||
var payload = result.json || {};
|
||||
if (linkInput) linkInput.value = payload.invite_url || '';
|
||||
if (codeEl) codeEl.textContent = payload.code || '--';
|
||||
if (copyBtn) copyBtn.disabled = !payload.invite_url;
|
||||
setStatus('推广数据已更新', false);
|
||||
}).catch(function () {
|
||||
setStatus('推广数据加载失败,请稍后重试', true);
|
||||
});
|
||||
|
||||
function renderPagination(total, current) {
|
||||
if (!listEl || total <= 10) return;
|
||||
var nav = root.querySelector('[data-invite-pagination]');
|
||||
if (!nav) {
|
||||
nav = document.createElement('nav');
|
||||
nav.className = 'uc-reward-pagination';
|
||||
nav.setAttribute('data-invite-pagination', 'true');
|
||||
nav.setAttribute('aria-label', '邀请记录分页');
|
||||
listEl.parentNode.appendChild(nav);
|
||||
}
|
||||
nav.innerHTML = '';
|
||||
var pages = Math.ceil(total / 10);
|
||||
for (var page = 1; page <= pages; page++) {
|
||||
var url = new URL(window.location.href);
|
||||
url.searchParams.set('reward_tab', 'users');
|
||||
if (page > 1) url.searchParams.set('invite_page', String(page));
|
||||
else url.searchParams.delete('invite_page');
|
||||
var link = document.createElement('a');
|
||||
link.href = url.toString();
|
||||
link.textContent = String(page);
|
||||
link.className = page === current ? 'is-active' : '';
|
||||
nav.appendChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
function renderList(payload, page) {
|
||||
if (!listEl) return;
|
||||
var items = Array.isArray(payload.items) ? payload.items : [];
|
||||
var total = Number(payload.total || 0);
|
||||
listEl.classList.remove('is-loading');
|
||||
if (totalEl) totalEl.textContent = total ? total + ' 条' : '暂无记录';
|
||||
if (!items.length) {
|
||||
listEl.innerHTML = '<p class="uc-reward-empty">分享链接后,邀请记录会显示在这里。</p>';
|
||||
return;
|
||||
}
|
||||
listEl.innerHTML = items.map(function (item) {
|
||||
var name = item.invitee_name || (item.invitee_id ? '用户 #' + item.invitee_id : '受邀用户');
|
||||
var avatar = item.invitee_avatar ? '<img src="' + escapeHtml(item.invitee_avatar) + '" alt="">' : '<span>' + escapeHtml(name.charAt(0)) + '</span>';
|
||||
var status = item.status === 'rewarded' ? '已奖励' : (item.status === 'verified' ? '已验证' : '已注册');
|
||||
return '<article class="uc-invite-record"><span class="uc-invite-record__avatar">' + avatar + '</span><span class="uc-invite-record__main"><strong>' + escapeHtml(name) + '</strong><span>' + escapeHtml(formatDate(item.created_at)) + '</span></span><span class="uc-invite-record__status">' + status + '</span></article>';
|
||||
}).join('');
|
||||
var currentPage = Number(payload.page || page);
|
||||
renderPagination(total, isNaN(currentPage) ? 1 : currentPage);
|
||||
}
|
||||
|
||||
if (listEl) {
|
||||
var invitePage = 1;
|
||||
try {
|
||||
var requestedPage = parseInt(new URLSearchParams(window.location.search).get('invite_page') || '1', 10);
|
||||
invitePage = isNaN(requestedPage) ? 1 : Math.max(1, requestedPage);
|
||||
} catch (_) {}
|
||||
api('/invite/list?per_page=10&page=' + invitePage).then(function (result) {
|
||||
if (!result.ok) {
|
||||
listEl.classList.remove('is-loading');
|
||||
listEl.innerHTML = '<p class="uc-reward-empty">邀请记录加载失败,请稍后重试。</p>';
|
||||
return;
|
||||
}
|
||||
renderList(result.json || {}, invitePage);
|
||||
}).catch(function () {
|
||||
listEl.classList.remove('is-loading');
|
||||
listEl.innerHTML = '<p class="uc-reward-empty">邀请记录加载失败,请稍后重试。</p>';
|
||||
});
|
||||
}
|
||||
|
||||
if (copyBtn && linkInput) {
|
||||
copyBtn.addEventListener('click', function () {
|
||||
if (!linkInput.value) return;
|
||||
var done = function () {
|
||||
if (feedbackEl) feedbackEl.textContent = '推广链接已复制';
|
||||
copyBtn.disabled = false;
|
||||
};
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(linkInput.value).then(done).catch(function () { linkInput.select(); document.execCommand('copy'); done(); });
|
||||
} else {
|
||||
linkInput.select();
|
||||
document.execCommand('copy');
|
||||
done();
|
||||
}
|
||||
});
|
||||
}
|
||||
function reloadRevenuePanel() {
|
||||
var current = document.querySelector('[data-aksrt-revenue-page]');
|
||||
if (!current) return Promise.resolve();
|
||||
var panelUrl = rest + '/user-center/panel/promotion';
|
||||
var query = new URL(window.location.href).searchParams;
|
||||
query.delete('tab');
|
||||
panelUrl += '?' + query.toString();
|
||||
return fetch(panelUrl, {
|
||||
credentials: 'same-origin',
|
||||
headers: { 'X-WP-Nonce': data.restNonce || data.nonce || '' }
|
||||
}).then(function (response) {
|
||||
return response.json().then(function (payload) {
|
||||
if (!response.ok || !payload.success || !payload.data || !payload.data.html) throw new Error('revenue-refresh-failed');
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.innerHTML = payload.data.html;
|
||||
var next = wrapper.firstElementChild;
|
||||
if (!next) throw new Error('revenue-html-empty');
|
||||
current.replaceWith(next);
|
||||
window.AKSRTRevenueCenterInit(next);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initRewardNavigation(root, rest, data) {
|
||||
var rewardTabs = root.querySelectorAll('.uc-reward-tabs a, .uc-reward-pagination a');
|
||||
rewardTabs.forEach(function (link) {
|
||||
link.addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
var targetUrl = new URL(link.href, window.location.href);
|
||||
var panelUrl = rest + '/user-center/panel/promotion?' + targetUrl.searchParams.toString();
|
||||
fetch(panelUrl, {
|
||||
credentials: 'same-origin',
|
||||
headers: { 'X-WP-Nonce': data.restNonce || data.nonce || '' }
|
||||
}).then(function (response) {
|
||||
return response.json().then(function (payload) {
|
||||
if (!response.ok || !payload.success || !payload.data || !payload.data.html) throw new Error('revenue-load-failed');
|
||||
var current = document.querySelector('[data-aksrt-revenue-page]');
|
||||
if (!current) return;
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.innerHTML = payload.data.html;
|
||||
var next = wrapper.firstElementChild;
|
||||
if (!next) throw new Error('revenue-html-empty');
|
||||
current.replaceWith(next);
|
||||
window.history.pushState({}, '', targetUrl);
|
||||
window.AKSRTRevenueCenterInit(next);
|
||||
if (typeof window.AKSRTAffiliatePromotionInit === 'function') window.AKSRTAffiliatePromotionInit();
|
||||
if (typeof window.AKSRTWithdrawInit === 'function') window.AKSRTWithdrawInit();
|
||||
});
|
||||
}).catch(function () {
|
||||
if (typeof showToast === 'function') showToast('加载失败,请重试');
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.AKSRTRevenueCenterInit = function (root) {
|
||||
init(root);
|
||||
var data = window.aksrtData || {};
|
||||
var rest = data.restUrl || data.apiUrl || '';
|
||||
if (root && rest) initRewardNavigation(root, rest.replace(/\/$/, ''), data);
|
||||
};
|
||||
window.AKSRTRevenueCenterInit(document.querySelector('[data-aksrt-revenue-page]'));
|
||||
})();
|
||||
@@ -82,10 +82,10 @@
|
||||
}
|
||||
target.classList.add('is-loading');
|
||||
var url = restUrl.replace(/\/$/, '') + '/user-center/panel/' + encodeURIComponent(name);
|
||||
if (name === 'creator' || name === 'promotion' || name === 'posts' || name === 'follow') {
|
||||
if (name === 'creator' || name === 'revenue' || name === 'posts' || name === 'follow') {
|
||||
var params = queryParams || new URLSearchParams(window.location.search);
|
||||
var allowedParams = name === 'creator' ? ['income_page'] :
|
||||
(name === 'promotion' ? ['reward_tab', 'commission_page', 'user_page'] :
|
||||
(name === 'revenue' ? ['reward_tab', 'commission_page', 'user_page'] :
|
||||
(name === 'posts' ? ['post_status', 'posts_page'] : ['follow_list', 'follow_page']));
|
||||
allowedParams.forEach(function(key) {
|
||||
if (params.get(key)) url += (url.indexOf('?') === -1 ? '?' : '&') + key + '=' + encodeURIComponent(params.get(key));
|
||||
@@ -120,8 +120,9 @@
|
||||
return loadPanel(name, forceLoad, queryParams).then(function() {
|
||||
switchTo(name);
|
||||
if (updateHistory) updateUrl(name);
|
||||
if (name === 'promotion' && typeof window.AKSRTRevenueCenterInit === 'function') window.AKSRTRevenueCenterInit(panels[name].panel);
|
||||
if (name === 'promotion' && typeof window.AKSRTAffiliatePromotionInit === 'function') window.AKSRTAffiliatePromotionInit();
|
||||
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.AKSRTWithdrawInit === 'function') window.AKSRTWithdrawInit();
|
||||
}).catch(function() {
|
||||
if (typeof showToast === 'function') showToast(i18n.networkError || '加载失败,请重试');
|
||||
});
|
||||
@@ -139,7 +140,7 @@
|
||||
if (!window.history.replaceState) return;
|
||||
var pathTab = name === 'credits' ? 'balance' : name;
|
||||
var u = new URL('/user/' + pathTab + '/', window.location.origin);
|
||||
if (sourceUrl) {
|
||||
if (sourceUrl && name !== 'revenue') {
|
||||
var source = new URL(sourceUrl, window.location.href);
|
||||
source.searchParams.forEach(function(value, key) { u.searchParams.set(key, value); });
|
||||
}
|
||||
|
||||
+1
-4
@@ -189,16 +189,13 @@ if (class_exists('\AKSRT\Core\DBMigrator')) {
|
||||
\AKSRT\Core\DBMigrator::init();
|
||||
}
|
||||
|
||||
// 积分获取入口(注册赠送 / 评论奖励 / 签到 / 邀请)
|
||||
// 积分获取入口(注册赠送 / 评论奖励 / 签到)
|
||||
if (class_exists('\AKSRT\Credits\Earn')) {
|
||||
\AKSRT\Credits\Earn::get_instance()->init();
|
||||
}
|
||||
if (class_exists('\AKSRT\Credits\Signin')) {
|
||||
\AKSRT\Credits\Signin::get_instance()->init();
|
||||
}
|
||||
if (class_exists('\AKSRT\Credits\Invite')) {
|
||||
\AKSRT\Credits\Invite::get_instance()->init();
|
||||
}
|
||||
if (class_exists('AKSRT\\Payment\\CreatorRevenue')) {
|
||||
\AKSRT\Payment\CreatorRevenue::get_instance()->init();
|
||||
}
|
||||
|
||||
@@ -133,11 +133,6 @@ if (!function_exists('aksrt_get_user_center_tab_url')) {
|
||||
*/
|
||||
function aksrt_get_user_center_tab_url(string $tab): string {
|
||||
$tab = sanitize_key($tab);
|
||||
if ('invite' === $tab) {
|
||||
$tab = 'promotion';
|
||||
} elseif ('revenue' === $tab) {
|
||||
$tab = 'promotion';
|
||||
}
|
||||
return aksrt_get_user_center_url($tab);
|
||||
}
|
||||
}
|
||||
@@ -182,7 +177,7 @@ if (!function_exists('aksrt_capture_user_center_view')) {
|
||||
'vip' => 'vip',
|
||||
'orders' => 'orders',
|
||||
'auth' => 'auth',
|
||||
'promotion' => 'promotion',
|
||||
'revenue' => 'revenue',
|
||||
'settings' => 'settings',
|
||||
'header' => 'header',
|
||||
'sidebar' => 'sidebar',
|
||||
@@ -207,7 +202,7 @@ if (!function_exists('aksrt_capture_user_center_panel')) {
|
||||
* Capture a built-in or registered user-center panel body.
|
||||
*/
|
||||
function aksrt_capture_user_center_panel(string $tab_key, array $tab, array $context): string {
|
||||
$built_in_tabs = ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'promotion', 'settings'];
|
||||
$built_in_tabs = ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'revenue', 'settings'];
|
||||
if (in_array($tab_key, $built_in_tabs, true)) {
|
||||
return aksrt_capture_user_center_view($tab_key, $context);
|
||||
}
|
||||
@@ -316,10 +311,6 @@ if (!function_exists('aksrt_user_center_resolve_tabs')) {
|
||||
}
|
||||
if ('signin' === $active || 'assets' === $active) {
|
||||
$active = 'credits';
|
||||
} elseif ('invite' === $active) {
|
||||
$active = 'promotion';
|
||||
} elseif ('revenue' === $active) {
|
||||
$active = 'promotion';
|
||||
} elseif ('vip' === $active) {
|
||||
// Prefer dedicated vip tab when registered; else credits (VIP shop).
|
||||
$active = in_array('vip', $keys, true) ? 'vip' : 'credits';
|
||||
@@ -358,8 +349,7 @@ if (!function_exists('aksrt_user_center_runtime_config')) {
|
||||
'activeTab' => $active_tab,
|
||||
'tabAliases' => [
|
||||
'signin' => 'credits',
|
||||
'invite' => 'promotion',
|
||||
'revenue' => 'promotion',
|
||||
'revenue' => 'revenue',
|
||||
'assets' => 'credits',
|
||||
// vip → vip when panel exists; SPA may still map missing keys via server resolve.
|
||||
'vip' => 'vip',
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* User center promotion (invite) card.
|
||||
*
|
||||
* Rendered inside the standalone 推广中心 tab (profile-promotion.php).
|
||||
* Section order follows the task priority: 成果概览 → 分享操作 → 奖励说明 → 邀请记录.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
?>
|
||||
<section class="uc-promotion-panel uc-promotion-card" aria-labelledby="uc-promotion-title" data-aksrt-invite>
|
||||
<header class="uc-promotion-panel__header">
|
||||
<span class="uc-promotion-panel__icon"><i class="fas fa-user-plus" aria-hidden="true"></i></span>
|
||||
<div>
|
||||
<p class="uc-promotion-panel__eyebrow"><?php esc_html_e('邀请与奖励', 'aksrt'); ?></p>
|
||||
<h3 id="uc-promotion-title"><?php esc_html_e('推广奖励', 'aksrt'); ?></h3>
|
||||
</div>
|
||||
</header>
|
||||
<p class="uc-promotion-panel__intro"><?php esc_html_e('分享专属链接,邀请好友完成注册与验证后即可获得奖励。', 'aksrt'); ?></p>
|
||||
<p class="uc-promotion-panel__status" data-invite-status role="status" aria-live="polite"><?php esc_html_e('正在加载推广数据…', 'aksrt'); ?></p>
|
||||
<section class="uc-promotion-section uc-promotion-section--stats" aria-labelledby="uc-promotion-stats-title"><div class="uc-promotion-section__header"><h4 id="uc-promotion-stats-title"><?php esc_html_e('推广成果', 'aksrt'); ?></h4><p><?php esc_html_e('实时汇总你的邀请进度', 'aksrt'); ?></p></div><div class="uc-promotion-stats" data-invite-stats aria-live="polite"><div class="uc-promotion-stat"><span><?php esc_html_e('已注册', 'aksrt'); ?></span><strong data-stat="registered">—</strong><small><?php esc_html_e('通过链接完成注册', 'aksrt'); ?></small></div><div class="uc-promotion-stat"><span><?php esc_html_e('已验证', 'aksrt'); ?></span><strong data-stat="verified">—</strong><small><?php esc_html_e('已完成邮箱验证', 'aksrt'); ?></small></div><div class="uc-promotion-stat"><span><?php esc_html_e('已奖励', 'aksrt'); ?></span><strong data-stat="rewarded">—</strong><small><?php esc_html_e('奖励已发放', 'aksrt'); ?></small></div></div></section>
|
||||
<section class="uc-promotion-section uc-promotion-section--share" aria-labelledby="uc-promotion-share-title"><div class="uc-promotion-section__header"><h4 id="uc-promotion-share-title"><?php esc_html_e('分享专属链接', 'aksrt'); ?></h4><p><?php esc_html_e('好友通过此链接注册,邀请关系会自动记录。', 'aksrt'); ?></p></div><div class="uc-promotion-share"><div class="uc-promotion-code"><span><?php esc_html_e('我的邀请码', 'aksrt'); ?></span><strong data-invite-code>—</strong></div><label class="screen-reader-text" for="aksrt-invite-link"><?php esc_html_e('推广链接', 'aksrt'); ?></label><div class="uc-promotion-link-row"><input id="aksrt-invite-link" type="text" class="uc-promotion-link" data-invite-link readonly value=""><button type="button" class="btn-primary btn-sm uc-promotion-copy" data-invite-copy disabled><i class="fas fa-copy" aria-hidden="true"></i><span><?php esc_html_e('复制链接', 'aksrt'); ?></span></button></div><p class="uc-promotion-copy-feedback" data-invite-copy-feedback role="status" aria-live="polite"></p></div></section>
|
||||
<section class="uc-promotion-section uc-promotion-section--reward" aria-labelledby="uc-promotion-reward-title"><div class="uc-promotion-section__header"><h4 id="uc-promotion-reward-title"><?php esc_html_e('奖励说明', 'aksrt'); ?></h4></div><p><?php echo esc_html(sprintf(__('邀请好友完成注册与邮箱验证后,双方将按站点规则获得%s奖励。', 'aksrt'), (string) ($currency_name ?? __('积分', 'aksrt')))); ?></p></section>
|
||||
<section class="uc-promotion-section uc-promotion-section--records" aria-labelledby="uc-promotion-records-title"><div class="uc-promotion-section__header uc-promotion-records__header"><div><h4 id="uc-promotion-records-title"><?php esc_html_e('邀请记录', 'aksrt'); ?></h4><p><?php esc_html_e('查看最近邀请好友的状态', 'aksrt'); ?></p></div><span data-invite-total><?php esc_html_e('加载中…', 'aksrt'); ?></span></div><div class="uc-promotion-record-list is-loading" data-invite-list aria-live="polite"><div class="uc-promotion-record-empty"><?php esc_html_e('正在加载邀请记录…', 'aksrt'); ?></div></div></section>
|
||||
</section>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Unified user-center promotion earnings panel.
|
||||
*
|
||||
* The promotion tab is the single entry point for referral links, commission
|
||||
* details and withdrawals. The renderer lives in profile-revenue.php so the
|
||||
* existing earnings markup and AJAX refresh path remain in one place.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
require __DIR__ . '/profile-revenue.php';
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* User center commission and promotion rewards panel.
|
||||
* User center commission and referral revenue panel.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -50,8 +50,8 @@ if (!in_array($active_reward_tab, ['detail', 'orders', 'users'], true)) {
|
||||
$active_reward_tab = 'detail';
|
||||
}
|
||||
$base_url = function_exists('aksrt_get_user_center_tab_url')
|
||||
? aksrt_get_user_center_tab_url('promotion')
|
||||
: home_url('/user/promotion/');
|
||||
? aksrt_get_user_center_tab_url('revenue')
|
||||
: home_url('/user/revenue/');
|
||||
$reward_url = static function (string $tab, array $extra = []) use ($base_url): string {
|
||||
return add_query_arg(array_merge(['reward_tab' => $tab], $extra), $base_url);
|
||||
};
|
||||
@@ -125,18 +125,18 @@ $status_labels = [
|
||||
</nav>
|
||||
|
||||
<?php if ($active_reward_tab === 'detail') : ?>
|
||||
<div class="uc-reward-pane uc-reward-pane--detail" data-aksrt-promotion-page>
|
||||
<div class="uc-promotion-summary-list">
|
||||
<div class="uc-promotion-summary-row uc-promotion-summary-row--link">
|
||||
<div class="uc-reward-pane uc-reward-pane--detail" data-aksrt-revenue-page>
|
||||
<div class="uc-revenue-summary-list">
|
||||
<div class="uc-revenue-summary-row uc-revenue-summary-row--link">
|
||||
<span><?php esc_html_e('推广链接', 'aksrt'); ?></span>
|
||||
<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>
|
||||
<small data-affiliate-feedback role="status" aria-live="polite"></small>
|
||||
</div>
|
||||
<div class="uc-promotion-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-promotion-summary-row"><span><?php esc_html_e('推广人数', 'aksrt'); ?></span><div class="uc-promotion-count"><strong data-affiliate-promoters>—</strong><em><?php esc_html_e('人', 'aksrt'); ?></em></div></div>
|
||||
<div class="uc-promotion-summary-row uc-promotion-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['withdrawn'] ?? 0)); ?>元</strong></div></div>
|
||||
<div class="uc-promotion-summary-row uc-promotion-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"><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"><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>
|
||||
<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['withdrawn'] ?? 0)); ?>元</strong></div></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>
|
||||
</div>
|
||||
<?php elseif ($active_reward_tab === 'orders') : ?>
|
||||
@@ -159,9 +159,9 @@ $status_labels = [
|
||||
<div class="uc-reward-pane">
|
||||
<div class="uc-reward-list-heading"><div><h4><?php esc_html_e('推广用户', 'aksrt'); ?></h4><p><?php esc_html_e('通过你的 ref 推广链接完成绑定的用户。', 'aksrt'); ?></p></div><strong><?php printf(esc_html__('%d 人', 'aksrt'), (int) ($user_view['total'] ?? 0)); ?></strong></div>
|
||||
<?php if (!empty($user_view['items'])) : ?>
|
||||
<div class="uc-promotion-user-list">
|
||||
<div class="uc-revenue-user-list">
|
||||
<?php foreach ($user_view['items'] as $item) : ?>
|
||||
<article class="uc-promotion-user-row"><img src="<?php echo esc_url((string) ($item['avatar'] ?? '')); ?>" alt=""><div><strong><?php echo esc_html((string) ($item['name'] ?? __('推广用户', 'aksrt'))); ?></strong><small><?php echo esc_html((string) ($item['bound_at'] ?? '')); ?></small></div><span><?php esc_html_e('已绑定', 'aksrt'); ?></span></article>
|
||||
<article class="uc-revenue-user-row"><img src="<?php echo esc_url((string) ($item['avatar'] ?? '')); ?>" alt=""><div><strong><?php echo esc_html((string) ($item['name'] ?? __('推广用户', 'aksrt'))); ?></strong><small><?php echo esc_html((string) ($item['bound_at'] ?? '')); ?></small></div><span><?php esc_html_e('已绑定', 'aksrt'); ?></span></article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php if ($user_total_pages > 1) : ?><nav class="uc-reward-pagination" aria-label="<?php esc_attr_e('推广用户分页', 'aksrt'); ?>"><?php for ($i = 1; $i <= $user_total_pages; $i++) : ?><a class="<?php echo $i === $user_page ? 'is-active' : ''; ?>" href="<?php echo esc_url($reward_url('users', ['user_page' => $i])); ?>"><?php echo esc_html((string) $i); ?></a><?php endfor; ?></nav><?php endif; ?>
|
||||
|
||||
@@ -53,12 +53,9 @@ add_action('template_redirect', function () {
|
||||
return;
|
||||
}
|
||||
$tab = $tab === 'balance' ? 'credits' : sanitize_key($tab);
|
||||
if ($tab === 'revenue') {
|
||||
$tab = 'promotion';
|
||||
}
|
||||
$allowed = class_exists('\\AKSRT\\User\\Center')
|
||||
? array_keys(\AKSRT\User\Center::get_instance()->get_dashboard_tabs())
|
||||
: ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'promotion', 'settings'];
|
||||
: ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'revenue', 'settings'];
|
||||
if (!in_array($tab, $allowed, true)) {
|
||||
global $wp_query;
|
||||
if ($wp_query instanceof WP_Query) { $wp_query->set_404(); }
|
||||
|
||||
@@ -20,7 +20,7 @@ if (!function_exists('aksrt_get_user_center_url')) :
|
||||
*/
|
||||
function aksrt_get_user_center_url(string $tab = ''): string {
|
||||
$tab = sanitize_key($tab ?: 'vip');
|
||||
$aliases = ['assets' => 'credits', 'signin' => 'credits', 'invite' => 'promotion', 'promotion' => 'promotion', 'revenue' => 'promotion'];
|
||||
$aliases = ['assets' => 'credits', 'signin' => 'credits', 'revenue' => 'revenue'];
|
||||
$tab = $aliases[$tab] ?? $tab;
|
||||
$path_tab = $tab === 'credits' ? 'balance' : $tab;
|
||||
return get_option('permalink_structure')
|
||||
|
||||
@@ -851,20 +851,6 @@ $hmb_js = get_template_directory() . '/assets/js/header-newadd.js';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($is_profile_page) {
|
||||
$revenue_invite_js_path = get_template_directory() . '/assets/js/revenue-invite.js';
|
||||
if (file_exists($revenue_invite_js_path)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-revenue-invite',
|
||||
$base_uri . '/assets/js/revenue-invite.js',
|
||||
['aksrt-script'],
|
||||
(string) filemtime($revenue_invite_js_path),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
// Badges UI: user center + public profile (zibll medal modal/list).
|
||||
if (class_exists('\AKSRT\User\Badges') && \AKSRT\User\Badges::enabled()) {
|
||||
$is_badge_surface = $is_profile_page
|
||||
|
||||
@@ -182,7 +182,7 @@ final class ReferralAttribution {
|
||||
}
|
||||
|
||||
public function register_routes(): void {
|
||||
register_rest_route('aksrt/v1', '/promotion/me', [
|
||||
register_rest_route('aksrt/v1', '/revenue/me', [
|
||||
'methods' => \WP_REST_Server::READABLE,
|
||||
'callback' => [$this, 'rest_me'],
|
||||
'permission_callback' => static fn() => is_user_logged_in(),
|
||||
|
||||
@@ -84,14 +84,14 @@ class UserRuntime {
|
||||
*/
|
||||
public static function get_user_center_settings(): array {
|
||||
$settings = Settings::get_all();
|
||||
$raw_tabs = $settings['user_center_tabs'] ?? 'profile,level,comments,credits,promotion,revenue,favorites,auth';
|
||||
$raw_tabs = $settings['user_center_tabs'] ?? 'profile,level,comments,credits,revenue,favorites,auth';
|
||||
$tabs = is_array($raw_tabs)
|
||||
? $raw_tabs
|
||||
: preg_split('/[\s,]+/', (string) $raw_tabs, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
// Built-in switchable panels. VIP is always auto-injected when enabled
|
||||
// by AKSRT\User\Center — keep it allowed for explicit config too.
|
||||
$allowed_tabs = ['profile', 'level', 'comments', 'favorites', 'credits', 'promotion', 'revenue', 'vip', 'orders', 'auth', 'settings'];
|
||||
$allowed_tabs = ['profile', 'level', 'comments', 'favorites', 'credits', 'revenue', 'vip', 'orders', 'auth', 'settings'];
|
||||
$normalized_tabs = ['profile'];
|
||||
|
||||
foreach ((array) $tabs as $tab) {
|
||||
|
||||
+6
-9
@@ -55,9 +55,6 @@ class Center {
|
||||
*/
|
||||
public function rest_panel(\WP_REST_Request $request) {
|
||||
$tab = sanitize_key((string) $request->get_param('tab'));
|
||||
if ($tab === 'revenue') {
|
||||
$tab = 'promotion';
|
||||
}
|
||||
$tabs = $this->get_dashboard_tabs();
|
||||
if (!isset($tabs[$tab])) {
|
||||
return new \WP_Error('aksrt_user_center_panel', __('用户中心面板不存在', 'aksrt'), ['status' => 404]);
|
||||
@@ -79,7 +76,7 @@ class Center {
|
||||
$context['creator_income_request'] = $income_request;
|
||||
}
|
||||
$revenue_request = [];
|
||||
if ($tab === 'promotion') {
|
||||
if ($tab === 'revenue') {
|
||||
$reward_tab = sanitize_key((string) $request->get_param('reward_tab'));
|
||||
if (!in_array($reward_tab, ['detail', 'orders', 'users'], true)) {
|
||||
$reward_tab = 'detail';
|
||||
@@ -185,7 +182,7 @@ class Center {
|
||||
'priority' => 50,
|
||||
'type' => 'panel',
|
||||
],
|
||||
'promotion' => [
|
||||
'revenue' => [
|
||||
'label' => __('推广收益', 'aksrt'),
|
||||
'icon' => 'chart-line',
|
||||
'priority' => 55,
|
||||
@@ -221,7 +218,7 @@ class Center {
|
||||
&& !empty(\AKSRT\User\Level::settings()['enabled']);
|
||||
$credits_on = class_exists('\AKSRT\Settings\Settings') && \AKSRT\Settings\Settings::credits_enabled();
|
||||
$balance_on = class_exists('\AKSRT\Credits\Balance') && \AKSRT\Credits\Balance::enabled();
|
||||
$promotion_tab_on = class_exists('\AKSRT\Settings\Settings')
|
||||
$revenue_tab_on = class_exists('\AKSRT\Settings\Settings')
|
||||
&& !empty(\AKSRT\Settings\Settings::get_affiliate_settings()['enabled']);
|
||||
$creator_tab_on = class_exists('\AKSRT\Settings\Settings')
|
||||
&& !empty(\AKSRT\Settings\Settings::get_payment_revenue_settings()['enabled']);
|
||||
@@ -290,7 +287,7 @@ class Center {
|
||||
$order[] = 'credits';
|
||||
}
|
||||
|
||||
if ($promotion_tab_on && !in_array('promotion', $order, true)) {
|
||||
if ($revenue_tab_on && !in_array('revenue', $order, true)) {
|
||||
$insert_at = count($order);
|
||||
foreach (['credits', 'favorites'] as $anchor) {
|
||||
$idx = array_search($anchor, $order, true);
|
||||
@@ -299,7 +296,7 @@ class Center {
|
||||
break;
|
||||
}
|
||||
}
|
||||
array_splice($order, $insert_at, 0, ['promotion']);
|
||||
array_splice($order, $insert_at, 0, ['revenue']);
|
||||
}
|
||||
$auth_on = class_exists('\AKSRT\User\AuthApply')
|
||||
&& !empty(\AKSRT\User\AuthApply::settings()['enabled']);
|
||||
@@ -320,7 +317,7 @@ class Center {
|
||||
if ($key === 'credits' && !$credits_on && !$balance_on) {
|
||||
continue;
|
||||
}
|
||||
if ($key === 'promotion' && !$promotion_tab_on) {
|
||||
if ($key === 'revenue' && !$revenue_tab_on) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user