From 013e7ab99a30b3561567efa5ee553098431fbe6d Mon Sep 17 00:00:00 2001 From: gouki Date: Sun, 9 Aug 2026 22:46:49 +0000 Subject: [PATCH] =?UTF-8?q?tweak(wish-tree):=20=E6=8C=82=E6=A0=91=E4=BE=BF?= =?UTF-8?q?=E7=AD=BE=E5=87=8F=E4=B8=BA30=E6=9D=A1=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E4=BD=99=E8=B5=B0=E5=BC=B9=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MAX_HANG 从50降为30,树冠更疏朗参差 - 挂载点从19个扩到31个,30条便签各占一位不重叠 --- mini/pages/wish-tree/wish-tree.js | 9 ++++++--- mini/pages/wish-tree/wish-tree.wxml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mini/pages/wish-tree/wish-tree.js b/mini/pages/wish-tree/wish-tree.js index ee38813..dde5f8d 100644 --- a/mini/pages/wish-tree/wish-tree.js +++ b/mini/pages/wish-tree/wish-tree.js @@ -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)); diff --git a/mini/pages/wish-tree/wish-tree.wxml b/mini/pages/wish-tree/wish-tree.wxml index 6f9b01f..07e6092 100644 --- a/mini/pages/wish-tree/wish-tree.wxml +++ b/mini/pages/wish-tree/wish-tree.wxml @@ -22,7 +22,7 @@ mode="aspectFill" /> - +