function t(t="7d"){return Promise.resolve([{stage:"访问用户",count:12580,rate:100,lostCount:0},{stage:"下单用户",count:3240,rate:25.8,lostCount:9340},{stage:"支付用户",count:2890,rate:89.2,lostCount:350},{stage:"完成订单",count:2750,rate:95.2,lostCount:140}])}function e(t="7d"){return Promise.resolve({totalActivities:12,totalParticipants:3240,totalDraws:15680,winnerCount:892,overallWinRate:5.68,costControl:85.2})}function i(t="7d"){return Promise.resolve([{level:1,levelName:"一等奖",winnerCount:5,prizeCount:5,winRate:.03,cost:5e3},{level:2,levelName:"二等奖",winnerCount:25,prizeCount:30,winRate:.16,cost:7500},{level:3,levelName:"三等奖",winnerCount:120,prizeCount:150,winRate:.77,cost:6e3},{level:4,levelName:"四等奖",winnerCount:280,prizeCount:300,winRate:1.79,cost:2800},{level:5,levelName:"五等奖",winnerCount:462,prizeCount:500,winRate:2.95,cost:920}])}function a(t){return Promise.resolve([{id:1,name:"春节幸运转盘",type:"转盘抽奖",startTime:"2024-02-01 00:00:00",endTime:"2024-02-15 23:59:59",status:"active",totalDraws:15820,totalParticipants:3240},{id:2,name:"新人专享抽奖",type:"盲盒抽奖",startTime:"2024-01-15 00:00:00",endTime:"2024-03-15 23:59:59",status:"active",totalDraws:8960,totalParticipants:1890},{id:3,name:"积分兑换活动",type:"兑换抽奖",startTime:"2024-02-10 00:00:00",endTime:"2024-02-20 23:59:59",status:"ended",totalDraws:6540,totalParticipants:1230}])}function r(t){const e={1:[{prizeId:101,prizeName:"iPhone 15 Pro",prizeLevel:1,prizeType:"实物奖品",prizeValue:8999,totalQuantity:5,issuedQuantity:5,drawCount:15820,winCount:5,winRate:.03,probability:.03,actualProbability:.03,cost:5e3},{prizeId:102,prizeName:"AirPods Pro",prizeLevel:2,prizeType:"实物奖品",prizeValue:1999,totalQuantity:30,issuedQuantity:28,drawCount:15820,winCount:28,winRate:.18,probability:.2,actualProbability:.18,cost:750},{prizeId:103,prizeName:"小米手环",prizeLevel:3,prizeType:"实物奖品",prizeValue:299,totalQuantity:150,issuedQuantity:142,drawCount:15820,winCount:142,winRate:.9,probability:1,actualProbability:.9,cost:200},{prizeId:104,prizeName:"优惠券50元",prizeLevel:4,prizeType:"优惠券",prizeValue:50,totalQuantity:500,issuedQuantity:486,drawCount:15820,winCount:486,winRate:3.07,probability:3,actualProbability:3.07,cost:50},{prizeId:105,prizeName:"积分1000",prizeLevel:5,prizeType:"积分",prizeValue:10,totalQuantity:2e3,issuedQuantity:1945,drawCount:15820,winCount:1945,winRate:12.3,probability:12,actualProbability:12.3,cost:10}],2:[{prizeId:201,prizeName:"MacBook Air",prizeLevel:1,prizeType:"实物奖品",prizeValue:8999,totalQuantity:2,issuedQuantity:1,drawCount:8960,winCount:1,winRate:.01,probability:.02,actualProbability:.01,cost:8e3},{prizeId:202,prizeName:"iPad Air",prizeLevel:2,prizeType:"实物奖品",prizeValue:4599,totalQuantity:10,issuedQuantity:8,drawCount:8960,winCount:8,winRate:.09,probability:.1,actualProbability:.09,cost:3500},{prizeId:203,prizeName:"Switch游戏机",prizeLevel:3,prizeType:"实物奖品",prizeValue:2099,totalQuantity:50,issuedQuantity:47,drawCount:8960,winCount:47,winRate:.52,probability:.5,actualProbability:.52,cost:2e3},{prizeId:204,prizeName:"京东卡200元",prizeLevel:4,prizeType:"购物卡",prizeValue:200,totalQuantity:200,issuedQuantity:186,drawCount:8960,winCount:186,winRate:2.08,probability:2,actualProbability:2.08,cost:200},{prizeId:205,prizeName:"优惠券20元",prizeLevel:5,prizeType:"优惠券",prizeValue:20,totalQuantity:800,issuedQuantity:768,drawCount:8960,winCount:768,winRate:8.57,probability:8,actualProbability:8.57,cost:20}]},i=e[t]||e[1],a=i.reduce((t,e)=>t+e.cost*e.winCount,0),r=i.reduce((t,e)=>t+e.winRate,0)/i.length,n=i.map(t=>t.winRate);return Promise.resolve({activity:{id:t,name:1===t?"春节幸运转盘":2===t?"新人专享抽奖":"活动"+t,type:"转盘抽奖",startTime:"2024-02-01 00:00:00",endTime:"2024-02-15 23:59:59",status:"active",totalDraws:i[0].drawCount,totalParticipants:Math.floor(.8*i[0].drawCount)},prizes:i,summary:{totalCost:a,avgWinRate:r,maxWinRate:Math.max(...n),minWinRate:Math.min(...n)}})}export{i as a,a as b,r as c,t as d,e as f};
