2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
"use strict";const e=require("../../common/vendor.js");function t(){if(void 0!==e.wx$1&&e.wx$1.getWindowInfo)try{const t=e.wx$1.getWindowInfo();return{statusBarHeight:t.statusBarHeight||20,windowWidth:t.windowWidth,windowHeight:t.windowHeight}}catch(t){console.warn("[AIAnalysis] Failed to use wx.getWindowInfo, fallback to getSystemInfoSync:",t)}try{const t=e.index.getSystemInfoSync();return{statusBarHeight:t.statusBarHeight||20,windowWidth:t.windowWidth,windowHeight:t.windowHeight}}catch(t){return console.error("[AIAnalysis] Failed to get system info:",t),{statusBarHeight:20,windowWidth:375,windowHeight:667}}}const o={data:()=>({contentTop:2*t().statusBarHeight+88+"rpx",contentBottom:"96rpx",showQualityCoverage:!1,subpackageLoaded:!1,popupsInitialized:!1,openQualityCoverageTrigger:0}),computed:{computedContentTop:()=>2*t().statusBarHeight+88+"rpx"},onLoad(){this.updateNavbarPosition(),setTimeout((()=>{this.preloadSubpackage()}),100),this.$nextTick((()=>{setTimeout((()=>{this.popupsInitialized=!0,console.log("[AIAnalysis] Popup components ready (using v-show)")}),500)}))},onShow(){this.$nextTick((()=>{this.updateNavbarPosition(),setTimeout((()=>{this.updateNavbarPosition()}),50)}))},onReady(){this.$nextTick((()=>{e.index.createSelectorQuery().in(this).select(".uni-navbar__content").boundingClientRect((e=>{if(e&&e.height){const t=e.height,o=2*t,a=Math.max(o-4,0);this.$set(this,"contentTop",a+"rpx"),console.log("[AIAnalysis] 使用实际导航栏高度:",t,"px =",o,"rpx, 调整后:",a,"rpx")}else{const e=2*t().statusBarHeight+2*44,o=Math.max(e-4,0);this.$set(this,"contentTop",o+"rpx")}})).exec();e.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((e=>{if(e&&e.height){const t=e.height,o=2*t,a=Math.max(o-4,0);this.$set(this,"contentBottom",a+"rpx"),console.log("[AIAnalysis] 使用实际tabbar高度:",t,"px =",o,"rpx, 调整后:",a,"rpx")}else this.$set(this,"contentBottom","96rpx")})).exec(),setTimeout((()=>{e.index.createSelectorQuery().in(this).select(".uni-navbar__content").boundingClientRect((e=>{if(e&&e.height){const t=e.height,o=2*t,a=Math.max(o-4,0);this.$set(this,"contentTop",a+"rpx"),console.log("[AIAnalysis] 延迟更新导航栏高度:",t,"px =",o,"rpx, 调整后:",a,"rpx")}})).exec();e.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((e=>{if(e&&e.height){const t=e.height,o=2*t,a=Math.max(o-4,0);this.$set(this,"contentBottom",a+"rpx"),console.log("[AIAnalysis] 延迟更新tabbar高度:",t,"px =",o,"rpx, 调整后:",a,"rpx")}})).exec()}),200)}))},methods:{preloadSubpackage(){void 0!==e.wx$1&&e.wx$1.loadSubpackage?e.wx$1.loadSubpackage({name:"pages-subpackage",success:()=>{console.log("[AIAnalysis] Subpackage loaded successfully"),this.subpackageLoaded=!0},fail:e=>{console.error("[AIAnalysis] Failed to load subpackage:",e),this.subpackageLoaded=!0}}):(console.log("[AIAnalysis] loadSubpackage API not available, assuming subpackage will load automatically"),this.subpackageLoaded=!0)},showQualityCoveragePopup(){this.showQualityCoverage=!0,this.$nextTick((()=>{this.openQualityCoverageTrigger++}))},onQualityCoveragePopupClose(){this.showQualityCoverage=!1},updateNavbarPosition(){const e=2*t().statusBarHeight+88+"rpx";this.$set(this,"contentTop",e),this.$forceUpdate()},goBack(){getCurrentPages().length<=1?console.log("[AIAnalysis][goBack] 当前是第一个页面,无法返回"):e.index.navigateBack({fail:e=>{console.error("[AIAnalysis][goBack] 返回失败:",e)}})},navigateToPage(t){const o=`pages-subpackage/ai_features/${t}/${t}`;e.index.navigateTo({url:`/${o}`,fail:t=>{console.error("导航失败:",t),e.index.showToast({title:"页面跳转失败",icon:"none"})}})},quickJumpReceptionTab(t){if(["status","reception","tag"].includes(t)){try{e.index.setStorageSync("workbench-reception-tab",t)}catch(o){console.warn("[AIAnalysis] 写入接待tab快捷跳转参数失败:",o)}e.index.switchTab({url:"/pages/furniture_reception/furniture_reception",fail:t=>{console.error("[AIAnalysis] 快捷跳转接待页失败:",t),e.index.showToast({title:"跳转失败,请稍后重试",icon:"none"})}})}},quickJumpCustomerTab(t){["service","customer"].includes(t)&&e.index.navigateTo({url:`/pages-subpackage/furniture_customer/furniture_customer?tab=${t}`,fail:t=>{console.error("[AIAnalysis] 快捷跳转客户页失败:",t),e.index.showToast({title:"跳转失败,请稍后重试",icon:"none"})}})}}};if(!Array){(e.resolveComponent("uni-nav-bar")+e.resolveComponent("QualityCoveragePopup"))()}Math;const a=e._export_sfc(o,[["render",function(t,o,a,i,n,s){return e.e({a:e.o(s.goBack,"84"),b:e.p({fixed:!0,statusBar:!0,title:"AI销冠系统",leftIcon:"left",color:"#333",backgroundColor:"#FFFFFF"}),c:e.o((e=>s.quickJumpReceptionTab("reception")),"4f"),d:e.o((e=>s.quickJumpReceptionTab("status")),"6f"),e:e.o((e=>s.quickJumpReceptionTab("tag")),"70"),f:e.o((e=>s.quickJumpCustomerTab("customer")),"df"),g:e.o((e=>s.quickJumpCustomerTab("service")),"01"),h:e.o((e=>s.navigateToPage("recording_duration")),"19"),i:e.o((e=>s.navigateToPage("customer_count")),"98"),j:e.o(((...e)=>s.showQualityCoveragePopup&&s.showQualityCoveragePopup(...e)),"e2"),k:e.o((e=>s.navigateToPage("speech_rating")),"6b"),l:e.o((e=>s.navigateToPage("intent_level")),"28"),m:e.o((e=>s.navigateToPage("deal_attribution")),"85"),n:e.o((e=>s.navigateToPage("opening_rate")),"f0"),o:e.o((e=>s.navigateToPage("over_commitment")),"9b"),p:e.o((e=>s.navigateToPage("red_line_touch")),"40"),q:s.computedContentTop||n.contentTop,r:n.contentBottom||"96rpx",s:n.showQualityCoverage},n.showQualityCoverage?{t:e.o(s.onQualityCoveragePopupClose,"35"),v:e.p({"open-trigger":n.openQualityCoverageTrigger})}:{})}],["__scopeId","data-v-609012d3"]]);wx.createPage(a);
|