Эх сурвалжийг харах

fix(package): package.json 版本更新

User 4 сар өмнө
parent
commit
7e61cfa83b

+ 1 - 0
cfc-frontend/package.json

@@ -3,6 +3,7 @@
   "version": "1.0.0",
   "description": "浠艾福小程序前端",
   "main": "main.js",
+  "lazyCodeLoading": "requiredComponents",
   "scripts": {
     "test": "jest",
     "test:coverage": "jest --coverage",

+ 7 - 27
cfc-frontend/pages/index/index.vue

@@ -228,15 +228,13 @@ export default {
     if (_token) {
       _currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || ''
     }
-    // 首次启动标记(由 splash.vue 设置,表示需要展示 splash overlay)
-    var _isFirstLaunch = (uni.getStorageSync('_showSplashOverlay') === '1')
     return {
       currentRole: _currentRole,
-      // TabTransition 始终默认 true,确保首次渲染即出现;首次启动时被 splash overlay 覆盖不可见
+      // TabTransition 始终默认 true,确保首次渲染即出现
       showTabTransition: true,
 
-      // splash loading overlay(首次进入时展示,数据加载完关闭)
-      splashOverlay: _isFirstLaunch,
+      // splash loading overlay 已移除,不再展示
+      splashOverlay: false,
       splashOverlayFading: false,
       _splashReady: false,
 
@@ -260,28 +258,10 @@ export default {
     this._doInit(options)
   },
   onShow() {
-    // splash overlay 已在 data() 中根据 storage 标记初始化,此处只需配置关闭条件
-    if (this.splashOverlay) {
-      uni.removeStorageSync('_showSplashOverlay')
-      this._splashLoadCount = 0
-      this._splashMinPassed = false
-
-      var self = this
-      // 最低展示 800ms
-      setTimeout(function() {
-        self._splashMinPassed = true
-        self._tryHideSplash()
-      }, 800)
-      // 最多展示 5s
-      setTimeout(function() {
-        if (self.splashOverlay) self._hideSplashOverlay()
-      }, 5000)
-    } else {
-      // 非首次:TabTransition 已在 data() 中为 true,确保首次渲染即出现
-      // 但组件缓存后再次切回时可能已被 _watchPageReady 置为 false,需要重置
-      this.showTabTransition = true
-      this._watchPageReady()
-    }
+    // TabTransition 已在 data() 中为 true,确保首次渲染即出现
+    // 但组件缓存后再次切回时可能已被 _watchPageReady 置为 false,需要重置
+    this.showTabTransition = true
+    this._watchPageReady()
 
     // 始终执行初始化,确保登录态变更后及时切换视图
     this._doInit()