关注前3条加回6~8个小头像、百宝箱同时滚动1~2条、测试封面改真实风景照+分组柔光遮罩(v26110412)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-04 07:48:30 +00:00
parent 1aece8ee65
commit 6860c73b9b
54 changed files with 107 additions and 66 deletions

View File

@@ -6,9 +6,9 @@
(function () {
var sec = document.getElementById('gcHome');
if (!sec) return;
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110411';
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110412';
document.head.appendChild(l);
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110411';
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110412';
s.onload = function () { if (sec.querySelector('.g4-foot')) merge(); else sec.addEventListener('gc4-ready', merge, { once: true }); }; /* v4 要先拉 feed.js 才渲染 */
document.body.appendChild(s);
@@ -87,7 +87,7 @@
var l6 = pick6();
if (!l6.length) { box.style.display = 'none'; return; }
list.innerHTML = l6.map(function (x, i) {
var n = x.likes || 0, heat = '<span class="ms-h"><svg class="g6-hz" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2z" fill="currentColor"/></svg><b>' + (n >= 1e4 ? Math.round(n / 1e3) / 10 + '万' : n) + ' 人点赞</b><em class="g6-st">' + esc(x.stage || '') + '</em></span>';
var n = x.likes || 0, heat = '<span class="ms-h">' + (i < 3 ? avs(i) : '') + '<svg class="g6-hz" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2z" fill="currentColor"/></svg><b>' + (n >= 1e4 ? Math.round(n / 1e3) / 10 + '万' : n) + ' 人点赞</b><em class="g6-st">' + esc(x.stage || '') + '</em></span>';
var q = new URLSearchParams(location.search); q.set('n', x.id);
return '<a class="ms-it ripple g6-nt" href="' + esc('guangchang/?' + q.toString() + location.hash) + '"><i class="ms-no">' + (i + 1) + '</i>' +
'<span class="ms-m"><span class="ms-q">' + esc(x.title) + '</span>' + heat + '</span>' +
@@ -95,7 +95,8 @@
}).join('');
all.textContent = '去广场看更多 ›';
all.classList.remove('hide');
/* 11-04 用户:点赞前的小头像去掉(抢标题)、点赞数别用红字 → 换成浅灰小心形 + 灰字,likeTick 不再跑 */
/* 11-04 用户:点赞数别用红字 → 浅灰小心形 + 灰字;同日二改:前 3 条点赞前加回小头像(每条 6~8 个、更小),后 3 条不带 */
likeTick();
}
/* 11-03 用户:「点赞数前面放几个小头像,偶尔换一个,相当于有人新点赞进来」
→ 火苗换成 3~6 个叠放小头像;每 4~7 秒随机挑一行:其中一个头像原地换成别人(点赞数不动)。
@@ -113,7 +114,7 @@
var avaAt = 0;
function avaEl(n) { return '<img src="assets/img/mom/' + n + '.jpg" alt="" loading="lazy" decoding="async" width="40" height="40">'; }
/* 11-03 用户:「头像错落一下,不一定都是 3 个,3、4、5、6 个都有」→ 每行个数打乱(固定表,刷新不跳),头像按顺序不重复取 */
var AV_N = [4, 6, 3, 5, 3, 6];
var AV_N = [7, 6, 8]; /* 11-04 二改:只前 3 条带头像,每条 6~8 个、头像缩小 */
function avs(i) {
var h = '', c = AV_N[i] || 3;
if (!i) avaAt = 0;