Files
smartDriveEEUniApp/unpackage/dist/build/mp-weixin/pages/ai_qa/ai_qa.js
2026-04-17 07:35:37 +08:00

2 lines
3.0 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("[AIQa] wx.getWindowInfo fallback:",e)}try{const e=t.index.getSystemInfoSync();return{statusBarHeight:e.statusBarHeight||20,windowWidth:e.windowWidth,windowHeight:e.windowHeight}}catch(e){return console.error("[AIQa] getSystemInfoSync:",e),{statusBarHeight:20,windowWidth:375,windowHeight:667}}}const a={data:()=>({contentTop:2*e().statusBarHeight+88+"rpx",contentBottom:"96rpx"}),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=Math.max(2*t.height-4,0);this.$set(this,"contentTop",e+"rpx")}})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{if(t&&t.height){const e=Math.max(2*t.height-4,0);this.$set(this,"contentBottom",e+"rpx")}})).exec(),setTimeout((()=>{t.index.createSelectorQuery().in(this).select(".uni-navbar__content").boundingClientRect((t=>{t&&t.height&&this.$set(this,"contentTop",Math.max(2*t.height-4,0)+"rpx")})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{t&&t.height&&this.$set(this,"contentBottom",Math.max(2*t.height-4,0)+"rpx")})).exec()}),200)}))},methods:{preloadSubpackage(){void 0!==t.wx$1&&t.wx$1.loadSubpackage&&t.wx$1.loadSubpackage({name:"pages-subpackage",success:()=>{},fail:t=>console.error("[AIQa] loadSubpackage:",t)})},updateNavbarPosition(){const t=2*e().statusBarHeight+88;this.$set(this,"contentTop",t+"rpx"),this.$forceUpdate()},goBack(){getCurrentPages().length<=1||t.index.navigateBack({fail:t=>console.error("[AIQa] goBack:",t)})},navigateToQa(e){t.index.navigateTo({url:`/pages-subpackage/ai_qa/${e}/${e}`,fail:e=>{console.error("[AIQa] navigate:",e),t.index.showToast({title:"页面跳转失败",icon:"none"})}})}}};if(!Array){t.resolveComponent("uni-nav-bar")()}Math;const o=t._export_sfc(a,[["render",function(e,a,o,n,i,s){return{a:t.o(s.goBack,"e4"),b:t.p({fixed:!0,statusBar:!0,title:"AI问答",leftIcon:"left",color:"#333",backgroundColor:"#FFFFFF"}),c:t.o((t=>s.navigateToQa("general_qa")),"35"),d:t.o((t=>s.navigateToQa("after_sales_qa")),"c0"),e:t.o((t=>s.navigateToQa("demand_qa")),"c8"),f:t.o((t=>s.navigateToQa("price_qa")),"2e"),g:t.o((t=>s.navigateToQa("trust_qa")),"24"),h:t.o((t=>s.navigateToQa("decision_qa")),"b4"),i:t.o((t=>s.navigateToQa("competitor_qa")),"81"),j:t.o((t=>s.navigateToQa("objection_qa")),"0b"),k:t.o((t=>s.navigateToQa("sharp_qa")),"05"),l:s.computedContentTop||i.contentTop,m:i.contentBottom||"96rpx"}}],["__scopeId","data-v-4559c886"]]);wx.createPage(o);