fix: 修复第二次进入内推岗位页面时UI无法正常显示的问题
- 在 init3DScene 方法中重置 is2DInitialized 标志
- 重置 uiLayer 和 hint 的 display 和 opacity 属性
- 重置 mapInterface 的 opacity 属性
- 确保每次进入时所有UI元素都从初始状态开始
修复了以下问题:
1. 第二次进入时 DUODUO Referral 文字无法显示
2. 点击地球后出现光球无法进入中国地图
🤖 Generated with Claude Code
This commit is contained in:
10
js/main.js
10
js/main.js
@@ -115,12 +115,22 @@ class App {
|
||||
this.sceneManager = null;
|
||||
}
|
||||
|
||||
// 重置2D地图初始化标志
|
||||
this.is2DInitialized = false;
|
||||
|
||||
// 重置UI状态
|
||||
this.canvasContainer.style.display = 'block';
|
||||
this.speedLines.style.display = 'block';
|
||||
this.cloudFog.style.display = 'none'; // 云雾初始隐藏,转场时才显示
|
||||
this.cloudFog.style.opacity = '0';
|
||||
this.mapInterface.style.display = 'none';
|
||||
this.mapInterface.style.opacity = '0';
|
||||
|
||||
// 重置UI层和提示文字的状态(关键修复)
|
||||
this.uiLayer.style.opacity = '0';
|
||||
this.uiLayer.style.display = 'flex';
|
||||
this.hint.style.opacity = '0';
|
||||
this.hint.style.display = 'block';
|
||||
|
||||
// 创建场景管理器
|
||||
this.sceneManager = new SceneManager(
|
||||
|
||||
Reference in New Issue
Block a user