功能:字体颜色持久化、等级体系升级至99级、钓鱼小游戏、补充系统参数
- 字体颜色:s_color 改为 varchar,发消息时保存颜色,进入聊天室自动恢复 - 等级体系:maxlevel 15→99,superlevel 16→100,99级经验阶梯(幂次曲线) - 管理权限等级按比例调整:禁言50、踢人60、设公告60、封号80、封IP90 - 钓鱼小游戏:FishingController(抛竿扣金币+收竿随机结果+广播) - 补充6个缺失的 sysparam 参数 + 4个钓鱼参数 - 用户列表点击用户名后自动聚焦输入框 - Pint 格式化
This commit is contained in:
Vendored
+18
-4
@@ -8,12 +8,26 @@ import Pusher from "pusher-js";
|
||||
|
||||
window.Pusher = Pusher;
|
||||
|
||||
/**
|
||||
* 根据当前页面环境自动检测 WebSocket 连接参数
|
||||
*
|
||||
* - 当页面通过 HTTPS 访问时,自动使用 wss:// 协议和当前域名
|
||||
* - 当页面通过 HTTP 访问(本地开发)时,使用 .env 中的 Reverb 配置
|
||||
*/
|
||||
const isSecure = window.location.protocol === "https:";
|
||||
const wsHost =
|
||||
import.meta.env.VITE_REVERB_HOST &&
|
||||
import.meta.env.VITE_REVERB_HOST !== "127.0.0.1" &&
|
||||
import.meta.env.VITE_REVERB_HOST !== "localhost"
|
||||
? import.meta.env.VITE_REVERB_HOST
|
||||
: window.location.hostname;
|
||||
|
||||
window.Echo = new Echo({
|
||||
broadcaster: "reverb",
|
||||
key: import.meta.env.VITE_REVERB_APP_KEY,
|
||||
wsHost: import.meta.env.VITE_REVERB_HOST,
|
||||
wsPort: import.meta.env.VITE_REVERB_PORT ?? 8080,
|
||||
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
|
||||
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? "https") === "https",
|
||||
wsHost: wsHost,
|
||||
wsPort: isSecure ? 443 : (import.meta.env.VITE_REVERB_PORT ?? 8080),
|
||||
wssPort: isSecure ? 443 : (import.meta.env.VITE_REVERB_PORT ?? 443),
|
||||
forceTLS: isSecure,
|
||||
enabledTransports: ["ws", "wss"],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user