bindbox-game/build/resources/admin/assets/order-funnel-DkeAQ_Xa.js
邹方成 6ee627139c
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 40s
feat: 新增支付测试小程序与微信支付集成
feat(pay): 添加支付API基础结构
feat(miniapp): 创建支付测试小程序页面与配置
feat(wechatpay): 配置微信支付参数与证书
fix(guild): 修复成员列表查询条件
docs: 更新代码规范文档与需求文档
style: 统一前后端枚举显示与注释格式
refactor(admin): 重构用户奖励发放接口参数处理
test(title): 添加称号效果参数验证测试
2025-11-17 00:42:08 +08:00

2 lines
3.3 KiB
JavaScript

import{e as t}from"./operations-CsHdqaV1.js";import{d as e,r as s,a as l,c as a,o,e as r,f as i,h as n,F as d,G as c,g as u,i as v,m as g}from"./index-DBHnxsy6.js";import{_ as x}from"./_plugin-vue_export-helper-BCo6x5W8.js";const m={class:"art-card h-140 p-5 mb-5 max-sm:mb-4"},p={class:"h-[calc(100%-40px)]"},f={class:"h-80 relative"},h={class:"flex items-center"},b={class:"w-8 h-8 rounded-full bg-white bg-opacity-20 flex items-center justify-center mr-3"},y={class:"text-lg"},w={class:"text-sm opacity-80"},F={class:"text-right"},_={class:"text-xl"},j={class:"text-sm opacity-80"},k={class:"mt-4 grid grid-cols-2 gap-4"},I={class:"bg-g-50 p-4 rounded-lg"},P={class:"text-2xl font-bold text-success"},z={class:"text-xs text-g-400 mt-1"},C={class:"bg-g-50 p-4 rounded-lg"},G={class:"text-lg font-bold text-danger"},M={class:"text-xs text-g-400 mt-1"},S=x(e({__name:"order-funnel",setup(e){const x=s([]),S=l(!1),U=a(()=>{var t,e;const s=(null==(t=x[0])?void 0:t.count)||0,l=(null==(e=x[2])?void 0:e.count)||0;return s<=0?0:parseFloat((l/s*100).toFixed(1))}),$=a(()=>{var t,e,s;const l=(null==(t=x[0])?void 0:t.count)||0,a=(null==(e=x[1])?void 0:e.count)||0,o=(null==(s=x[2])?void 0:s.count)||0;if(l<=0||a<0||o<0)return"-";return(l>0?1-a/l:0)>=(a>0?1-o/a:0)?"下单用户":"支付用户"}),q=a(()=>{var t,e,s;const l=(null==(t=x[0])?void 0:t.count)||0,a=(null==(e=x[1])?void 0:e.count)||0,o=(null==(s=x[2])?void 0:s.count)||0,r=l>0?1-a/l:0,i=a>0?1-o/a:0,n=Math.max(r,i);return parseFloat((100*n).toFixed(1))}),A=a(()=>{const t=U.value;return t>=20?"转化表现优秀":t>=15?"转化表现良好":t>=10?"转化表现一般":"需要优化转化流程"}),B=t=>["bg-gradient-to-r from-blue-500 to-blue-400","bg-gradient-to-r from-green-500 to-green-400","bg-gradient-to-r from-yellow-500 to-yellow-400","bg-gradient-to-r from-red-500 to-red-400"][t]||"bg-gradient-to-r from-gray-500 to-gray-400",D=t=>t>=1e4?(t/1e4).toFixed(1)+"w":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString(),E=()=>{return e=this,s=null,l=function*(){S.value=!0;try{const e=yield t("7d");x.splice(0,x.length,...e)}catch(e){}finally{S.value=!1}},new Promise((t,a)=>{var o=t=>{try{i(l.next(t))}catch(e){a(e)}},r=t=>{try{i(l.throw(t))}catch(e){a(e)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,r);i((l=l.apply(e,s)).next())});var e,s,l};return o(()=>{E()}),(t,e)=>(i(),r("div",m,[e[2]||(e[2]=n("div",{class:"art-card-header"},[n("div",{class:"title"},[n("h4",null,"订单转化漏斗"),n("p",null,"识别支付瓶颈,提升营收转化")])],-1)),n("div",p,[n("div",f,[(i(!0),r(d,null,c(x,(t,e)=>(i(),r("div",{key:t.stage,class:v(["funnel-stage absolute left-0 right-0 flex items-center justify-between px-6 text-white font-medium transition-all duration-300 hover:opacity-90",B(e)]),style:u({top:70*e+"px",height:"60px",zIndex:10-e})},[n("div",h,[n("div",b,g(e+1),1),n("div",null,[n("div",y,g(t.stage),1),n("div",w,g(D(t.count))+"人",1)])]),n("div",F,[n("div",_,g(t.rate)+"%",1),n("div",j,g(e>0?`流失${D(t.lostCount)}`:"基准"),1)])],6))),128))]),n("div",k,[n("div",I,[e[0]||(e[0]=n("div",{class:"text-g-500 text-sm"},"整体转化率",-1)),n("div",P,g(U.value)+"%",1),n("div",z,g(A.value),1)]),n("div",C,[e[1]||(e[1]=n("div",{class:"text-g-500 text-sm"},"主要流失环节",-1)),n("div",G,g($.value),1),n("div",M,"流失率: "+g(q.value)+"%",1)])])])]))}}),[["__scopeId","data-v-e1a74e9b"]]);export{S as default};