Files
smartDriveEEUniApp/unpackage/dist/build/mp-weixin/pages/ai_analysis/ai_analysis.js
2026-04-17 09:41:37 +08:00

2 lines
3.5 KiB
JavaScript

"use strict";const t=require("../../common/vendor.js");function e(){if(void 0!==t.wx$1&&t.wx$1.getWindowInfo)try{const e=t.wx$1.getWindowInfo();return{statusBarHeight:e.statusBarHeight||20,windowWidth:e.windowWidth,windowHeight:e.windowHeight}}catch(e){console.warn("[AIAnalysis] Failed to use wx.getWindowInfo, fallback to getSystemInfoSync:",e)}try{const e=t.index.getSystemInfoSync();return{statusBarHeight:e.statusBarHeight||20,windowWidth:e.windowWidth,windowHeight:e.windowHeight}}catch(e){return console.error("[AIAnalysis] Failed to get system info:",e),{statusBarHeight:20,windowWidth:375,windowHeight:667}}}const o={components:{AiAnalysisDashboardBody:()=>"../../components/ai-analysis-dashboard-body.js"},data:()=>({contentTop:2*e().statusBarHeight+88+"rpx",contentBottom:"96rpx",subpackageLoaded:!1}),computed:{computedContentTop:()=>2*e().statusBarHeight+88+"rpx"},onLoad(){this.updateNavbarPosition(),setTimeout((()=>{this.preloadSubpackage()}),100)},onShow(){this.$nextTick((()=>{this.updateNavbarPosition(),setTimeout((()=>{this.updateNavbarPosition()}),50)}))},onReady(){this.$nextTick((()=>{t.index.createSelectorQuery().in(this).select(".uni-navbar__content").boundingClientRect((t=>{if(t&&t.height){const e=t.height,o=2*e,a=Math.max(o-4,0);this.$set(this,"contentTop",a+"rpx"),console.log("[AIAnalysis] 使用实际导航栏高度:",e,"px =",o,"rpx, 调整后:",a,"rpx")}else{const t=2*e().statusBarHeight+2*44,o=Math.max(t-4,0);this.$set(this,"contentTop",o+"rpx")}})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,o=2*e,a=Math.max(o-4,0);this.$set(this,"contentBottom",a+"rpx"),console.log("[AIAnalysis] 使用实际tabbar高度:",e,"px =",o,"rpx, 调整后:",a,"rpx")}else this.$set(this,"contentBottom","96rpx")})).exec(),setTimeout((()=>{t.index.createSelectorQuery().in(this).select(".uni-navbar__content").boundingClientRect((t=>{if(t&&t.height){const e=t.height,o=2*e,a=Math.max(o-4,0);this.$set(this,"contentTop",a+"rpx"),console.log("[AIAnalysis] 延迟更新导航栏高度:",e,"px =",o,"rpx, 调整后:",a,"rpx")}})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,o=2*e,a=Math.max(o-4,0);this.$set(this,"contentBottom",a+"rpx"),console.log("[AIAnalysis] 延迟更新tabbar高度:",e,"px =",o,"rpx, 调整后:",a,"rpx")}})).exec()}),200)}))},methods:{preloadSubpackage(){void 0!==t.wx$1&&t.wx$1.loadSubpackage?t.wx$1.loadSubpackage({name:"pages-subpackage",success:()=>{console.log("[AIAnalysis] Subpackage loaded successfully"),this.subpackageLoaded=!0},fail:t=>{console.error("[AIAnalysis] Failed to load subpackage:",t),this.subpackageLoaded=!0}}):(console.log("[AIAnalysis] loadSubpackage API not available, assuming subpackage will load automatically"),this.subpackageLoaded=!0)},updateNavbarPosition(){const t=2*e().statusBarHeight+88+"rpx";this.$set(this,"contentTop",t),this.$forceUpdate()},goBack(){getCurrentPages().length<=1?console.log("[AIAnalysis][goBack] 当前是第一个页面,无法返回"):t.index.navigateBack({fail:t=>{console.error("[AIAnalysis][goBack] 返回失败:",t)}})}}};if(!Array){(t.resolveComponent("uni-nav-bar")+t.resolveComponent("ai-analysis-dashboard-body"))()}Math;const a=t._export_sfc(o,[["render",function(e,o,a,n,s,i){return{a:t.o(i.goBack,"3a"),b:t.p({fixed:!0,statusBar:!0,title:"AI销冠系统",leftIcon:"left",color:"#333",backgroundColor:"#FFFFFF"}),c:t.p({"content-top":i.computedContentTop||s.contentTop,"content-bottom":s.contentBottom})}}],["__scopeId","data-v-eec594bd"]]);wx.createPage(a);