微信小程序联调
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"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("[DealAttribution] 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("[DealAttribution] Failed to get system info:",e),{statusBarHeight:20,windowWidth:375,windowHeight:667}}}const i={data(){const t=e().statusBarHeight;return{statusBarHeight:t,contentTop:2*t+88+"rpx",contentBottom:"0rpx",conversionRate:"15.8",totalDeals:"201",dataList:[{factor:"产品优势",description:"突出产品核心优势",percentage:"35.2"},{factor:"价格优惠",description:"提供合适的价格优惠",percentage:"28.4"},{factor:"服务质量",description:"优质的售后服务",percentage:"18.7"},{factor:"客户关系",description:"良好的客户关系维护",percentage:"12.3"},{factor:"竞争优势",description:"相对于竞品的优势",percentage:"5.4"}]}},onReady(){this.$nextTick((()=>{t.index.createSelectorQuery().in(this).select(".nav-bar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,i=2*e,o=2*this.statusBarHeight+i,n=Math.max(o-4,0);this.$set(this,"contentTop",n+"rpx"),console.log("[DealAttribution] 使用实际导航栏高度:",e,"px =",i,"rpx, 总高度:",o,"rpx, 调整后:",n,"rpx")}else{const t=2*e().statusBarHeight+2*44,i=Math.max(t-4,0);this.$set(this,"contentTop",i+"rpx")}})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,i=2*e,o=Math.max(i-4,0);this.$set(this,"contentBottom",o+"rpx"),console.log("[DealAttribution] 使用实际tabbar高度:",e,"px =",i,"rpx, 调整后:",o,"rpx")}else this.$set(this,"contentBottom","0rpx")})).exec(),setTimeout((()=>{t.index.createSelectorQuery().in(this).select(".nav-bar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,i=2*e,o=2*this.statusBarHeight+i,n=Math.max(o-4,0);this.$set(this,"contentTop",n+"rpx"),console.log("[DealAttribution] 延迟更新导航栏高度:",e,"px =",i,"rpx, 总高度:",o,"rpx, 调整后:",n,"rpx")}})).exec();t.index.createSelectorQuery().in(this).select(".tabbar").boundingClientRect((t=>{if(t&&t.height){const e=t.height,i=2*e,o=Math.max(i-4,0);this.$set(this,"contentBottom",o+"rpx"),console.log("[DealAttribution] 延迟更新tabbar高度:",e,"px =",i,"rpx, 调整后:",o,"rpx")}})).exec()}),200)}))},methods:{goBack(){t.index.navigateBack()}}};const o=t._export_sfc(i,[["render",function(e,i,o,n,a,r){return{a:t.o(((...t)=>r.goBack&&r.goBack(...t)),"13"),b:a.statusBarHeight+"px",c:t.t(a.conversionRate),d:t.t(a.totalDeals),e:t.f(a.dataList,((e,i,o)=>({a:t.t(e.factor),b:t.t(e.description),c:t.t(e.percentage),d:i}))),f:a.contentTop,g:a.contentBottom}}],["__scopeId","data-v-e384e535"]]);wx.createPage(o);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="feature-page data-v-e384e535"><view class="page-header data-v-e384e535" style="{{'padding-top:' + b}}"><view class="nav-bar data-v-e384e535"><view class="nav-left data-v-e384e535" bindtap="{{a}}"><text class="back-icon data-v-e384e535">←</text></view><text class="nav-title data-v-e384e535">成交归因分析</text></view></view><scroll-view class="content-scroll data-v-e384e535" scroll-y="true" style="{{'top:' + f + ';' + ('bottom:' + g)}}"><view class="stats-card data-v-e384e535"><view class="stat-item data-v-e384e535"><text class="stat-value data-v-e384e535">{{c}}%</text><text class="stat-label data-v-e384e535">总体转化率</text></view><view class="stat-item data-v-e384e535"><text class="stat-value data-v-e384e535">{{d}}</text><text class="stat-label data-v-e384e535">成交总数</text></view></view><view class="chart-section data-v-e384e535"><text class="section-title data-v-e384e535">成交因素分析图</text><view class="chart-placeholder data-v-e384e535"><text class="placeholder-text data-v-e384e535">📊 图表区域</text><text class="placeholder-desc data-v-e384e535">此处将显示成交归因分析图表</text></view></view><view class="data-list data-v-e384e535"><text class="section-title data-v-e384e535">关键成交因素</text><view wx:for="{{e}}" wx:for-item="item" wx:key="d" class="list-item data-v-e384e535"><view class="item-left data-v-e384e535"><text class="item-date data-v-e384e535">{{item.a}}</text><text class="item-desc data-v-e384e535">{{item.b}}</text></view><view class="item-right data-v-e384e535"><text class="item-percentage data-v-e384e535">{{item.c}}%</text></view></view></view></scroll-view></view>
|
||||
@@ -0,0 +1 @@
|
||||
.feature-page.data-v-e384e535{min-height:100vh;background:#f8f9fa}.page-header.data-v-e384e535{position:fixed;top:0;left:0;right:0;z-index:999;background:#fff;border-bottom:1rpx solid #e9ecef}.nav-bar.data-v-e384e535{display:flex;align-items:center;height:88rpx;padding:0 30rpx}.nav-left.data-v-e384e535{width:60rpx;height:60rpx;display:flex;align-items:center;justify-content:center;margin-right:20rpx}.back-icon.data-v-e384e535{font-size:36rpx;color:#333}.nav-title.data-v-e384e535{flex:1;text-align:center;font-size:32rpx;font-weight:700;color:#333}.content-scroll.data-v-e384e535{position:absolute;left:0;right:0;top:0;bottom:0;padding:0!important;margin:0!important;box-sizing:border-box}.stats-card.data-v-e384e535{display:flex;margin:20rpx 30rpx;background:#fff;border-radius:16rpx;padding:40rpx 30rpx;box-shadow:0 2rpx 8rpx rgba(0,0,0,.1)}.stat-item.data-v-e384e535{flex:1;text-align:center}.stat-item.data-v-e384e535:not(:last-child){border-right:1rpx solid #e9ecef}.stat-value.data-v-e384e535{display:block;font-size:48rpx;font-weight:700;color:#007aff;margin-bottom:10rpx}.stat-label.data-v-e384e535{display:block;font-size:24rpx;color:#666}.chart-section.data-v-e384e535,.data-list.data-v-e384e535{margin:20rpx 30rpx;background:#fff;border-radius:16rpx;overflow:hidden;box-shadow:0 2rpx 8rpx rgba(0,0,0,.1)}.section-title.data-v-e384e535{display:block;font-size:32rpx;font-weight:700;color:#333;padding:30rpx;border-bottom:1rpx solid #e9ecef}.chart-placeholder.data-v-e384e535{padding:80rpx 30rpx;text-align:center}.placeholder-text.data-v-e384e535{display:block;font-size:48rpx;margin-bottom:20rpx}.placeholder-desc.data-v-e384e535{display:block;font-size:28rpx;color:#666}.list-item.data-v-e384e535{display:flex;align-items:center;justify-content:space-between;padding:30rpx;border-bottom:1rpx solid #f0f0f0}.list-item.data-v-e384e535:last-child{border-bottom:none}.item-left.data-v-e384e535{flex:1}.item-date.data-v-e384e535{display:block;font-size:28rpx;font-weight:700;color:#333;margin-bottom:8rpx}.item-desc.data-v-e384e535{display:block;font-size:24rpx;color:#666}.item-right.data-v-e384e535{text-align:right}.item-percentage.data-v-e384e535{display:block;font-size:28rpx;font-weight:700;color:#007aff}
|
||||
Reference in New Issue
Block a user