瀏覽代碼

漏斗数据修改

xiaohaizhao 2 年之前
父節點
當前提交
a91c02609c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packageA/salesHourglass/index.js

+ 2 - 2
packageA/salesHourglass/index.js

@@ -127,9 +127,9 @@ Page({
         }).then(res => {
             console.log("漏斗数据", res)
             let full = Math.max(...res.data.map(v => v.sequence1));
-            let statistics = res.data.map(v => {
+            let statistics = res.data.map((v, i) => {
                 v.action = v.stagename
-                // v.zhl = `转换率:${(v.percent * 100).toFixed(2)}%`
+                v.zhl = i == 0 ? '' : `转换率:${(v.zhl * 100).toFixed(2)}%`
                 v.percent = v.sequence1 / full;
                 v.totalinvestment = conversion(v.totalinvestment).value
                 v.budgetary = conversion(v.budgetary).value