feat(affiliate): attribution modes, settlement hardening, trusted proxies, QR and poster
- 归因模式可配置(first_touch/last_touch)、停佣开关、懒结算与佣金基数降级复查 - aksrt_get_client_ip 接入 aksrt_trusted_proxies 信任代理名单,防 CDN 头伪造 - 收益页 Canvas 二维码 + 750x1000 推广海报(本地打包 qrcode.min.js,无 CDN) - 契约测试固化归因/海报/信任代理链路
This commit is contained in:
@@ -691,11 +691,24 @@ trait ScriptsPart1b {
|
||||
|
||||
// profile 页:加载 credits.js(签到 + 邀请 + 提现交互)
|
||||
if ($is_profile_page) {
|
||||
$affiliate_deps = [];
|
||||
if ($affiliate_on) {
|
||||
// 推广二维码生成库(本地打包,无外部 CDN)。
|
||||
$qrcode_js_path = get_template_directory() . '/assets/js/vendor/qrcode.min.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-qrcode',
|
||||
$base_uri . '/assets/js/vendor/qrcode.min.js',
|
||||
[],
|
||||
file_exists($qrcode_js_path) ? (string) filemtime($qrcode_js_path) : $version,
|
||||
true
|
||||
);
|
||||
$affiliate_deps[] = 'aksrt-qrcode';
|
||||
}
|
||||
$credits_js_path = get_template_directory() . '/assets/js/credits.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-credits',
|
||||
$base_uri . '/assets/js/credits.js',
|
||||
['loader_js', 'aksrt-vip-coordinator'],
|
||||
array_merge(['loader_js', 'aksrt-vip-coordinator'], $affiliate_deps),
|
||||
file_exists($credits_js_path) ? (string) filemtime($credits_js_path) : $version,
|
||||
true
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user