@etspress/netflix 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/public/console.css +21 -16
- package/public/console.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etspress/netflix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "流媒体合租主题插件",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"id": "netflix",
|
|
19
19
|
"name": "流媒体合租主题",
|
|
20
20
|
"description": "流媒体合租商店主题与页面展示配置",
|
|
21
|
-
"version": "0.1.
|
|
21
|
+
"version": "0.1.10",
|
|
22
22
|
"runtime": {
|
|
23
23
|
"type": "npm-static",
|
|
24
24
|
"publicRoot": "public"
|
package/plugin.json
CHANGED
package/public/console.css
CHANGED
|
@@ -64,17 +64,18 @@
|
|
|
64
64
|
#netflix-theme-home.nfc-console .nfc-pagination button{padding:7px 12px;color:#666;background:#fff;border:1px solid #e8e8e8;border-radius:5px;font:inherit;cursor:pointer}
|
|
65
65
|
#netflix-theme-home.nfc-console .nfc-pagination button:disabled{opacity:.45;cursor:not-allowed}
|
|
66
66
|
#netflix-theme-home.nfc-console .nfc-promo-top{display:grid;grid-template-columns:1.55fr 1fr 1fr;gap:18px}
|
|
67
|
-
#netflix-theme-home.nfc-console .nfc-link-panel{display:
|
|
67
|
+
#netflix-theme-home.nfc-console .nfc-link-panel{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:12px}
|
|
68
|
+
#netflix-theme-home.nfc-console .nfc-link-panel.has-qr{grid-template-columns:minmax(0,1fr) 88px}
|
|
68
69
|
#netflix-theme-home.nfc-console .nfc-link-content{min-width:0;flex:1}
|
|
69
|
-
#netflix-theme-home.nfc-console .nfc-link-
|
|
70
|
-
#netflix-theme-home.nfc-console .nfc-link-panel
|
|
71
|
-
#netflix-theme-home.nfc-console .nfc-link-panel
|
|
72
|
-
#netflix-theme-home.nfc-console .nfc-link-panel .nfc-copyline
|
|
73
|
-
#netflix-theme-home.nfc-console .nfc-link-panel .nfc-copyline
|
|
74
|
-
#netflix-theme-home.nfc-console .nfc-link-panel
|
|
75
|
-
#netflix-theme-home.nfc-console .nfc-
|
|
76
|
-
#netflix-theme-home.nfc-console .nfc-promo-qr-wrap{display:flex;
|
|
77
|
-
#netflix-theme-home.nfc-console .nfc-promo-qr{display:block;width:
|
|
70
|
+
#netflix-theme-home.nfc-console .nfc-link-content{flex:none;width:100%}
|
|
71
|
+
#netflix-theme-home.nfc-console .nfc-link-panel,#netflix-theme-home.nfc-console .nfc-code-panel{min-height:246px;padding:24px 24px;border:1px solid #f0f0f0;border-radius:14px}
|
|
72
|
+
#netflix-theme-home.nfc-console .nfc-link-panel h1,#netflix-theme-home.nfc-console .nfc-code-panel h2{font-size:19px;font-weight:600;line-height:1.4}
|
|
73
|
+
#netflix-theme-home.nfc-console .nfc-link-panel .nfc-copyline,#netflix-theme-home.nfc-console .nfc-code-panel .nfc-copyline,#netflix-theme-home.nfc-console .nfc-code-panel .nfc-affiliate-closed,#netflix-theme-home.nfc-console .nfc-promo-code-form{min-height:44px;margin-top:12px;padding:4px;border:1px solid #ededed;border-radius:8px}
|
|
74
|
+
#netflix-theme-home.nfc-console .nfc-link-panel .nfc-copyline input,#netflix-theme-home.nfc-console .nfc-code-panel .nfc-copyline input,#netflix-theme-home.nfc-console .nfc-promo-code-form input{padding:6px 9px;font-size:13px}
|
|
75
|
+
#netflix-theme-home.nfc-console .nfc-link-panel .nfc-copyline button,#netflix-theme-home.nfc-console .nfc-code-panel .nfc-copyline button,#netflix-theme-home.nfc-console .nfc-code-panel .nfc-affiliate-closed button,#netflix-theme-home.nfc-console .nfc-promo-code-form button{min-width:64px;padding:6px 12px;border-radius:6px;font-size:14px}
|
|
76
|
+
#netflix-theme-home.nfc-console .nfc-link-panel>p,#netflix-theme-home.nfc-console .nfc-code-panel>p{margin-top:12px;font-size:14px;line-height:1.6}
|
|
77
|
+
#netflix-theme-home.nfc-console .nfc-promo-qr-wrap{display:flex;width:88px;align-self:center;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#888;font-size:11px}
|
|
78
|
+
#netflix-theme-home.nfc-console .nfc-promo-qr{display:block;width:74px;height:74px;padding:4px;background:#fff;border:1px solid #eee;border-radius:7px;image-rendering:pixelated}
|
|
78
79
|
#netflix-theme-home.nfc-console .nfc-promo-code-form{display:flex;min-width:0;margin-top:9px;padding:4px;background:#f4f4f4;border-radius:4px;gap:5px}
|
|
79
80
|
#netflix-theme-home.nfc-console .nfc-promo-code-form input{width:0;min-width:0;flex:1;padding:5px 7px;color:#555;background:transparent;border:0;outline:0;font:inherit;font-size:12px}
|
|
80
81
|
#netflix-theme-home.nfc-console .nfc-promo-code-form button{min-width:55px;padding:5px 10px;color:#333;background:#fff;border:0;border-radius:4px;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
|
|
@@ -85,9 +86,12 @@
|
|
|
85
86
|
#netflix-theme-home.nfc-console .nfc-copyline{display:flex;min-width:0;margin-top:9px;padding:4px;background:#f4f4f4;border-radius:4px}
|
|
86
87
|
#netflix-theme-home.nfc-console .nfc-copyline input{width:0;min-width:0;flex:1;padding:5px 7px;color:#555;background:transparent;border:0;outline:0;font:inherit;font-size:12px}
|
|
87
88
|
#netflix-theme-home.nfc-console .nfc-copyline button{min-width:47px;padding:5px 9px;color:#333;background:#fff;border:0;border-radius:4px;font:inherit;font-size:12px;cursor:pointer}
|
|
88
|
-
#netflix-theme-home.nfc-console .nfc-affiliate-closed{display:flex;min-height:
|
|
89
|
-
#netflix-theme-home.nfc-console .nfc-affiliate-closed
|
|
90
|
-
#netflix-theme-home.nfc-console .nfc-affiliate-closed
|
|
89
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed{display:flex;min-width:0;min-height:44px;margin-top:12px;padding:4px;align-items:center;gap:6px;background:#f5f5f5;border-radius:8px}
|
|
90
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed input{width:0;min-width:0;flex:1;padding:6px 9px;color:#777;background:transparent;border:0;outline:0;font:inherit;font-size:13px}
|
|
91
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed input::placeholder{color:#999;opacity:1}
|
|
92
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed input{font-size:12px}
|
|
93
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed button{min-height:34px;padding:6px 12px;color:#333;background:#fff;border:1px solid #ededed;border-radius:6px;font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
|
|
94
|
+
#netflix-theme-home.nfc-console .nfc-affiliate-closed button:hover{color:#ef5350;border-color:#f2c9c8}
|
|
91
95
|
#netflix-theme-home.nfc-console .nfc-panel>p{margin:8px 0 0;color:#b48b56;font-size:12px;line-height:1.6}
|
|
92
96
|
#netflix-theme-home.nfc-console .nfc-code-panel>p{color:#b48b56}
|
|
93
97
|
#netflix-theme-home.nfc-console .nfc-range{display:flex;justify-content:flex-end;gap:9px;white-space:nowrap}
|
|
@@ -208,11 +212,12 @@
|
|
|
208
212
|
#netflix-theme-home.nfc-console .nfc-order-stats>div{padding:10px}
|
|
209
213
|
#netflix-theme-home.nfc-console .nfc-order-stats strong{font-size:17px}
|
|
210
214
|
#netflix-theme-home.nfc-console .nfc-promo-top,#netflix-theme-home.nfc-console .nfc-chart-grid{grid-template-columns:1fr}
|
|
211
|
-
#netflix-theme-home.nfc-console .nfc-link-panel,#netflix-theme-home.nfc-console .nfc-code-panel{min-height:0;padding:
|
|
215
|
+
#netflix-theme-home.nfc-console .nfc-link-panel,#netflix-theme-home.nfc-console .nfc-code-panel{min-height:0;padding:16px;border-radius:11px}
|
|
216
|
+
#netflix-theme-home.nfc-console .nfc-link-panel.has-qr{grid-template-columns:minmax(0,1fr) 76px;gap:8px}
|
|
212
217
|
#netflix-theme-home.nfc-console .nfc-link-panel h1,#netflix-theme-home.nfc-console .nfc-code-panel h2{font-size:18px}
|
|
213
218
|
#netflix-theme-home.nfc-console .nfc-link-panel>p,#netflix-theme-home.nfc-console .nfc-code-panel>p{font-size:14px}
|
|
214
|
-
#netflix-theme-home.nfc-console .nfc-promo-qr-wrap{
|
|
215
|
-
#netflix-theme-home.nfc-console .nfc-promo-qr{width:
|
|
219
|
+
#netflix-theme-home.nfc-console .nfc-promo-qr-wrap{width:76px}
|
|
220
|
+
#netflix-theme-home.nfc-console .nfc-promo-qr{width:68px;height:68px}
|
|
216
221
|
#netflix-theme-home.nfc-console .nfc-summary-panel{grid-column:auto}
|
|
217
222
|
#netflix-theme-home.nfc-console .nfc-panel{padding:13px}
|
|
218
223
|
#netflix-theme-home.nfc-console .nfc-metrics strong{font-size:18px}
|
package/public/console.js
CHANGED
|
@@ -384,17 +384,22 @@
|
|
|
384
384
|
var path = String(info.promotion_path || '/?aff=' + encodeURIComponent(info.affiliate_code));
|
|
385
385
|
link = /^https?:\/\//i.test(path) ? path : location.origin + (path.charAt(0) === '/' ? path : '/' + path);
|
|
386
386
|
}
|
|
387
|
+
var linkLabel = link;
|
|
388
|
+
if (link) {
|
|
389
|
+
try { var parsedLink = new URL(link); linkLabel = parsedLink.host + parsedLink.pathname + parsedLink.search; }
|
|
390
|
+
catch (_error) { linkLabel = link.replace(/^https?:\/\//i, ''); }
|
|
391
|
+
}
|
|
387
392
|
var total = rows.reduce(function (sum, row) { return sum + Number(row.commission_amount || 0); }, 0);
|
|
388
393
|
var orderCount = rows.length;
|
|
389
394
|
var clicks = info.click_count == null ? '—' : info.click_count;
|
|
390
395
|
var qr = link ? '<div class="nfc-promo-qr-wrap"><img class="nfc-promo-qr" data-promo-qr alt="推广二维码"><small>推广二维码</small></div>' : '';
|
|
391
396
|
var codePanel = !info.opened
|
|
392
|
-
? '<div class="nfc-affiliate-closed"><
|
|
397
|
+
? '<div class="nfc-affiliate-closed"><input readonly aria-label="专属推广优惠码" placeholder="开通后设专属码"><button type="button" data-open-affiliate>立即开通</button></div>'
|
|
393
398
|
: affiliatePromoCode
|
|
394
399
|
? '<div class="nfc-copyline nfc-promo-code-value"><input readonly aria-label="专属推广优惠码" value="' + escapeHtml(affiliatePromoCode) + '"><button type="button" data-copy-code>复制</button></div>'
|
|
395
400
|
: '<form class="nfc-promo-code-form" data-promo-code-form><input name="promo_code" maxlength="15" autocomplete="off" placeholder="请输入自定义优惠码"><button type="submit"' + (savingAffiliatePromoCode ? ' disabled' : '') + '>' + (savingAffiliatePromoCode ? '保存中…' : '确定') + '</button></form><div class="nfc-promo-code-error" data-promo-code-error></div>';
|
|
396
401
|
var content =
|
|
397
|
-
'<div class="nfc-promo-top"><section class="nfc-panel nfc-link-panel"><div class="nfc-link-content"><h1>' + escapeHtml(homeConfig.affiliatePageTitle || '推荐朋友购买立享20%佣金') + '</h1><div class="nfc-copyline"><input readonly aria-label="推广链接"
|
|
402
|
+
'<div class="nfc-promo-top"><section class="nfc-panel nfc-link-panel' + (link ? ' has-qr' : '') + '"><div class="nfc-link-content"><h1>' + escapeHtml(homeConfig.affiliatePageTitle || '推荐朋友购买立享20%佣金') + '</h1><div class="nfc-copyline"><input readonly aria-label="推广链接" title="' + escapeHtml(link) + '" value="' + escapeHtml(linkLabel || '开通推广后生成专属链接') + '"><button type="button" data-copy-link aria-label="复制推广链接">复制</button></div><p>' + escapeHtml(homeConfig.affiliatePageDescription || '将链接或二维码发送给好友即可') + '</p><small class="nfc-contact-hint">' + escapeHtml(homeConfig.affiliateContactHint || '') + '</small></div>' + qr + '</section>' +
|
|
398
403
|
'<section class="nfc-panel nfc-code-panel"><h2>' + escapeHtml(homeConfig.affiliateCodeTitle || '专属推广优惠码') + '</h2>' + codePanel + '<p>' + escapeHtml(homeConfig.affiliateCodeHint || '优惠码推广优先级最高,结合推广链接100%精准统计推广订单。') + '</p></section>' +
|
|
399
404
|
'<section class="nfc-panel nfc-summary-panel"><div class="nfc-range">' + rangeButtons() + '</div><div class="nfc-metrics"><div><strong>' + escapeHtml(clicks) + '</strong><span>' + escapeHtml(homeConfig.affiliateClicksLabel || '推广点击') + '</span></div><div><strong>' + orderCount + '</strong><span>' + escapeHtml(homeConfig.affiliateOrdersLabel || '订单数') + '</span></div><div><strong>' + escapeHtml(formatMoney(total)) + '</strong><span>' + escapeHtml(homeConfig.affiliateCommissionLabel || '佣金数') + '</span></div></div><div class="nfc-available"><span>' + escapeHtml(homeConfig.affiliateAvailableLabel || '可提现金额') + ' ' + escapeHtml(formatMoney(info.available_commission || 0)) + '</span><a href="/me/affiliate?native=1">点击提现</a></div></section></div>' +
|
|
400
405
|
'<div class="nfc-chart-grid"><section class="nfc-panel"><h2>订单分布</h2>' + distributionChart(rows) + '</section><section class="nfc-panel"><h2>订单统计</h2>' + chartBars(rows) + '</section></div>' +
|