feat: upgrade widgets and affiliate commission flow
This commit is contained in:
1 parent
22c0c9df9c
commit
698a9beb74
33 files changed
+709
-227
No files matched your search
@@ -2,9 +2,7 @@
|
||||
/**
|
||||
* User center promotion panel (invite / 推广中心).
|
||||
*
|
||||
* Standalone dashboard tab that hosts the invite card. Reuses the existing
|
||||
* invite REST contract and credits.js `initInvite()` binding via the
|
||||
* `[data-aksrt-invite]` card in profile-invite.php.
|
||||
* Standalone dashboard tab for the forward-only promotion contract.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -18,8 +16,12 @@ if ($user_id <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$currency_name = (string) ($context['currency_name'] ?? __('积分', 'aksrt'));
|
||||
$settings = class_exists('\\AKSRT\\Settings\\Settings') ? \AKSRT\Settings\Settings::get_affiliate_settings() : [];
|
||||
?>
|
||||
<div class="uc-promotion-page" data-aksrt-promotion-page>
|
||||
<?php require __DIR__ . '/profile-invite.php'; ?>
|
||||
</div>
|
||||
<section class="uc-promotion-page aksrt-affiliate-panel" data-aksrt-promotion-page>
|
||||
<header class="uc-panel-heading"><h2><?php esc_html_e('推广中心', 'aksrt'); ?></h2><p><?php echo esc_html($settings['promotion_text'] ?? __('分享推广链接,好友完成会员或付费内容订单后获得佣金。', 'aksrt')); ?></p></header>
|
||||
<div class="uc-affiliate-link-card" data-affiliate-card><div><span class="muted-2-color"><?php esc_html_e('推广链接', 'aksrt'); ?></span><input type="text" readonly data-affiliate-link aria-label="<?php esc_attr_e('推广链接', 'aksrt'); ?>"></div><button type="button" class="btn-primary btn-sm" data-affiliate-copy><i class="fas fa-copy" aria-hidden="true"></i><?php esc_html_e('复制链接', 'aksrt'); ?></button><p data-affiliate-feedback role="status" aria-live="polite"></p></div>
|
||||
<div class="uc-affiliate-stats" data-affiliate-stats><article><span><?php esc_html_e('当前比例', 'aksrt'); ?></span><strong data-affiliate-ratio>—</strong></article><article><span><?php esc_html_e('推广人数', 'aksrt'); ?></span><strong data-affiliate-promoters>—</strong></article><article><span><?php esc_html_e('有效付费人数', 'aksrt'); ?></span><strong data-affiliate-payers>—</strong></article></div>
|
||||
<form class="uc-affiliate-accounts" data-affiliate-accounts><label><?php esc_html_e('支付宝收款码/账户', 'aksrt'); ?><input type="text" name="alipay" autocomplete="off"></label><label><?php esc_html_e('微信收款码/账户', 'aksrt'); ?><input type="text" name="wechat" autocomplete="off"></label><button type="submit" class="btn-secondary btn-sm"><?php esc_html_e('保存收款方式', 'aksrt'); ?></button><p data-affiliate-account-feedback role="status" aria-live="polite"></p></form>
|
||||
<p class="uc-affiliate-note"><?php esc_html_e('仅会员和付费内容订单参与返佣;首次触达后 30 天内绑定,禁止自邀和换绑。', 'aksrt'); ?></p>
|
||||
</section>
|
||||
Reference in new issue
Block a user