tweak(wish-tree): 挂树便签减为30条,其余走弹幕
Publish Mini Program Dev Version / publish (push) Failing after 11s

- MAX_HANG 从50降为30,树冠更疏朗参差
- 挂载点从19个扩到31个,30条便签各占一位不重叠
This commit is contained in:
gouki
2026-08-09 22:46:49 +00:00
parent 4b003fad39
commit 013e7ab99a
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -7,7 +7,10 @@ const CANOPY_SLOTS = [
{ x: 57, y: 15 }, { x: 64, y: 22 }, { x: 70, y: 32 }, { x: 27, y: 42 },
{ x: 34, y: 38 }, { x: 42, y: 34 }, { x: 58, y: 34 }, { x: 66, y: 40 },
{ x: 73, y: 48 }, { x: 27, y: 55 }, { x: 47, y: 26 }, { x: 53, y: 40 },
{ x: 39, y: 48 }, { x: 61, y: 50 }, { x: 45, y: 56 },
{ x: 39, y: 48 }, { x: 61, y: 50 }, { x: 45, y: 56 }, { x: 31, y: 18 },
{ x: 60, y: 26 }, { x: 68, y: 44 }, { x: 40, y: 24 }, { x: 55, y: 20 },
{ x: 48, y: 44 }, { x: 35, y: 52 }, { x: 63, y: 56 }, { x: 29, y: 34 },
{ x: 71, y: 40 }, { x: 52, y: 30 }, { x: 44, y: 50 },
];
// 便签配色
@@ -33,7 +36,7 @@ const TAG_COLORS = [
];
// 挂树数量上限,超出的以弹幕展示
const MAX_HANG = 50;
const MAX_HANG = 30;
// 伪随机(保证每次渲染一致)
function seeded(i, salt) {
@@ -194,7 +197,7 @@ Page({
// 顶级位置轮播
const top = list.filter((w) => w.isTop).map((w) => this.formatWish(w, 0));
// 最新50条挂树
// 最新30条挂树
const hangWishes = list.slice(0, MAX_HANG).map((w, i) => {
const wish = this.formatWish(w, i);
const slot = this.transformSlot(this.pickSlot(i));
+1 -1
View File
@@ -22,7 +22,7 @@
mode="aspectFill"
/>
<!-- 树上的许愿便签(最新50条) -->
<!-- 树上的许愿便签(最新30条) -->
<view
wx:for="{{item.hangWishes}}"
wx:for-item="wish"