1537 lines
48 KiB
PHP
1537 lines
48 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||
// +----------------------------------------------------------------------
|
||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||
// | 开源版本可自由商用,可去除界面版权logo
|
||
// | gitee下载:https=>//gitee.com/likeshop_gitee/likeadmin
|
||
// | github下载:https=>//github.com/likeshop-github/likeadmin
|
||
// | 访问官网:https=>//www.likeadmin.cn
|
||
// | likeadmin团队 版权所有 拥有最终解释权
|
||
// +----------------------------------------------------------------------
|
||
// | author=> likeadminTeam
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\admin\controller;
|
||
|
||
use app\admin\logic\WorkbenchLogic;
|
||
|
||
/**
|
||
* 工作台
|
||
* Class WorkbenchCotroller
|
||
* @package app\admin\controller
|
||
*/
|
||
class WorkbenchController extends BaseAdminController
|
||
{
|
||
|
||
/**
|
||
* @notes 工作台
|
||
* @author 乔峰
|
||
* @date 2021/12/29 17=>01
|
||
*/
|
||
public function index()
|
||
{
|
||
$result = WorkbenchLogic::index();
|
||
return $this->data($result);
|
||
}
|
||
|
||
//首页订单
|
||
public function order()
|
||
{
|
||
$data = [
|
||
"yAxis" => [
|
||
"maxnum" => 35,
|
||
"maxprice" => "111374.41"
|
||
],
|
||
"legend" => [
|
||
"订单金额",
|
||
"订单数"
|
||
],
|
||
"xAxis" => [
|
||
"2024-05-06",
|
||
"2024-05-07",
|
||
"2024-05-08",
|
||
"2024-05-09",
|
||
"2024-05-10",
|
||
"2024-05-11",
|
||
"2024-05-12",
|
||
"2024-05-13",
|
||
"2024-05-14",
|
||
"2024-05-15",
|
||
"2024-05-16",
|
||
"2024-05-17",
|
||
"2024-05-18",
|
||
"2024-05-19",
|
||
"2024-05-20",
|
||
"2024-05-21",
|
||
"2024-05-22",
|
||
"2024-05-23",
|
||
"2024-05-24",
|
||
"2024-05-25",
|
||
"2024-05-26",
|
||
"2024-05-27",
|
||
"2024-05-28",
|
||
"2024-05-29",
|
||
"2024-05-30",
|
||
"2024-05-31",
|
||
"2024-06-01",
|
||
"2024-06-02",
|
||
"2024-06-03",
|
||
"2024-06-04"
|
||
],
|
||
"series" => [
|
||
[
|
||
"name" => "订单金额",
|
||
"type" => "bar",
|
||
"itemStyle" => [
|
||
"normal" => [
|
||
"color" => [
|
||
"x" => 0,
|
||
"y" => 0,
|
||
"x2" => 0,
|
||
"y2" => 1,
|
||
"colorStops" => [
|
||
[
|
||
"offset" => 0,
|
||
"color" => "#69cdff"
|
||
],
|
||
[
|
||
"offset" => 0.5,
|
||
"color" => "#3eb3f7"
|
||
],
|
||
[
|
||
"offset" => 1,
|
||
"color" => "#1495eb"
|
||
]
|
||
]
|
||
]
|
||
]
|
||
],
|
||
"data" => [
|
||
171.29,
|
||
167.46,
|
||
1455.65,
|
||
45.47,
|
||
542.69,
|
||
216.58,
|
||
228.82,
|
||
34.24,
|
||
8249.85,
|
||
664.23,
|
||
8586.24,
|
||
10.19,
|
||
90.19,
|
||
105.4,
|
||
62.59,
|
||
1051.34,
|
||
160.84,
|
||
2437.68,
|
||
111374.41,
|
||
12161.05,
|
||
189,
|
||
4831.65,
|
||
1276.31,
|
||
582.4,
|
||
906.02,
|
||
597,
|
||
0.08,
|
||
771.16,
|
||
10262.64,
|
||
278.67
|
||
]
|
||
],
|
||
[
|
||
"name" => "订单数",
|
||
"type" => "line",
|
||
"itemStyle" => [
|
||
"normal" => [
|
||
"color" => [
|
||
"x" => 0,
|
||
"y" => 0,
|
||
"x2" => 0,
|
||
"y2" => 1,
|
||
"colorStops" => [
|
||
[
|
||
"offset" => 0,
|
||
"color" => "#6fdeab"
|
||
],
|
||
[
|
||
"offset" => 0.5,
|
||
"color" => "#44d693"
|
||
],
|
||
[
|
||
"offset" => 1,
|
||
"color" => "#2cc981"
|
||
]
|
||
]
|
||
]
|
||
]
|
||
],
|
||
"data" => [
|
||
5,
|
||
8,
|
||
15,
|
||
6,
|
||
13,
|
||
5,
|
||
3,
|
||
4,
|
||
7,
|
||
14,
|
||
12,
|
||
6,
|
||
2,
|
||
2,
|
||
6,
|
||
8,
|
||
19,
|
||
18,
|
||
13,
|
||
30,
|
||
2,
|
||
35,
|
||
12,
|
||
5,
|
||
20,
|
||
2,
|
||
2,
|
||
7,
|
||
13,
|
||
6
|
||
],
|
||
"yAxisIndex" => 1
|
||
]
|
||
],
|
||
"pre_cycle" => [
|
||
"count" => [
|
||
"data" => 170
|
||
],
|
||
"price" => [
|
||
"data" => "1333354.63"
|
||
]
|
||
],
|
||
"cycle" => [
|
||
"count" => [
|
||
"data" => 268,
|
||
"percent" => 57.65,
|
||
"is_plus" => 1
|
||
],
|
||
"price" => [
|
||
"data" => "157451.54",
|
||
"percent" => 88.19,
|
||
"is_plus" => -1
|
||
]
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
//-------------------------------商品统计---------------------------------------//
|
||
/**
|
||
* 商品概况
|
||
*/
|
||
public function get_basic()
|
||
{
|
||
$data = [
|
||
"browse" => [
|
||
"num" => 11353,
|
||
"percent" => "330.03"
|
||
],
|
||
"user" => [
|
||
"num" => 538,
|
||
"percent" => "47.39"
|
||
],
|
||
"cart" => [
|
||
"num" => 1181,
|
||
"percent" => "43.67"
|
||
],
|
||
"order" => [
|
||
"num" => 105753,
|
||
"percent" => "-68.07"
|
||
],
|
||
"pay" => [
|
||
"num" => 2476,
|
||
"percent" => "-99.24"
|
||
],
|
||
"payPrice" => [
|
||
"num" => 163490.54,
|
||
"percent" => "-87.50"
|
||
],
|
||
"cost" => [
|
||
"num" => 72147.8,
|
||
"percent" => "-93.33"
|
||
],
|
||
"refundPrice" => [
|
||
"num" => 2321.81,
|
||
"percent" => "1447.87"
|
||
],
|
||
"refund" => [
|
||
"num" => 39,
|
||
"percent" => "8.33"
|
||
],
|
||
"payPercent" => [
|
||
"num" => "15.61",
|
||
"percent" => "-6.58"
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
|
||
/**
|
||
* 商品趋势
|
||
*/
|
||
public function get_trend()
|
||
{
|
||
$data = [
|
||
"xAxis" => [
|
||
"2024-05-06",
|
||
"2024-05-07",
|
||
"2024-05-08",
|
||
"2024-05-09",
|
||
"2024-05-10",
|
||
"2024-05-11",
|
||
"2024-05-12",
|
||
"2024-05-13",
|
||
"2024-05-14",
|
||
"2024-05-15",
|
||
"2024-05-16",
|
||
"2024-05-17",
|
||
"2024-05-18",
|
||
"2024-05-19",
|
||
"2024-05-20",
|
||
"2024-05-21",
|
||
"2024-05-22",
|
||
"2024-05-23",
|
||
"2024-05-24",
|
||
"2024-05-25",
|
||
"2024-05-26",
|
||
"2024-05-27",
|
||
"2024-05-28",
|
||
"2024-05-29",
|
||
"2024-05-30",
|
||
"2024-05-31",
|
||
"2024-06-01",
|
||
"2024-06-02",
|
||
"2024-06-03",
|
||
"2024-06-04"
|
||
],
|
||
"series" => [
|
||
[
|
||
"name" => "商品浏览量",
|
||
"data" => [
|
||
131,
|
||
275,
|
||
137,
|
||
100,
|
||
221,
|
||
76,
|
||
64,
|
||
83,
|
||
161,
|
||
125,
|
||
120,
|
||
971,
|
||
169,
|
||
84,
|
||
68,
|
||
153,
|
||
470,
|
||
1310,
|
||
621,
|
||
827,
|
||
113,
|
||
595,
|
||
485,
|
||
484,
|
||
535,
|
||
227,
|
||
714,
|
||
144,
|
||
1159,
|
||
731
|
||
],
|
||
"type" => "line",
|
||
"smooth" => "true",
|
||
"yAxisIndex" => 1
|
||
],
|
||
[
|
||
"name" => "商品访客量",
|
||
"data" => [
|
||
21,
|
||
26,
|
||
26,
|
||
32,
|
||
26,
|
||
14,
|
||
6,
|
||
13,
|
||
17,
|
||
26,
|
||
24,
|
||
18,
|
||
7,
|
||
6,
|
||
23,
|
||
23,
|
||
23,
|
||
33,
|
||
29,
|
||
61,
|
||
25,
|
||
103,
|
||
55,
|
||
45,
|
||
45,
|
||
30,
|
||
28,
|
||
25,
|
||
41,
|
||
21
|
||
],
|
||
"type" => "line",
|
||
"smooth" => "true",
|
||
"yAxisIndex" => 1
|
||
],
|
||
[
|
||
"name" => "支付金额",
|
||
"data" => [
|
||
53.6,
|
||
0.25,
|
||
1231.84,
|
||
0.8,
|
||
0,
|
||
10,
|
||
0,
|
||
0.66,
|
||
7919.2,
|
||
0,
|
||
8040.38,
|
||
0.01,
|
||
0,
|
||
0,
|
||
10.49,
|
||
0,
|
||
0.01,
|
||
599.01,
|
||
100100,
|
||
908.81,
|
||
0,
|
||
1887.06,
|
||
588,
|
||
184.3,
|
||
665.11,
|
||
0,
|
||
0,
|
||
219.2,
|
||
24.09,
|
||
16.99
|
||
],
|
||
"type" => "bar"
|
||
],
|
||
[
|
||
"name" => "退款金额",
|
||
"data" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
730.8,
|
||
49,
|
||
219,
|
||
0,
|
||
1323.01,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
],
|
||
"type" => "bar"
|
||
]
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
|
||
/**
|
||
* 获取商品排名数据
|
||
*/
|
||
public function get_product_ranking()
|
||
{
|
||
$data = [
|
||
[
|
||
"product_id" => 1661,
|
||
"visit" => "1331",
|
||
"user" => 119,
|
||
"cart" => "26",
|
||
"orders" => "22",
|
||
"pay" => "11",
|
||
"price" => "690.02",
|
||
"cost" => "0.00",
|
||
"profit" => "1.00",
|
||
"collect" => "4",
|
||
"changes" => "0.06",
|
||
"repeats" => "0.28",
|
||
"store_name" => "瞌睡兔 美式复古圆领卫衣外套女春秋款小个子宽松百搭休闲上衣",
|
||
"image" => "https://multi-store.crmeb.net/uploads/attach/2024/02/19/2f3f938d720fc4212216ab855808bf85.jpg",
|
||
"product_price" => "100.00",
|
||
"stock" => 16777213,
|
||
"is_show" => 1
|
||
],
|
||
[
|
||
"product_id" => 1670,
|
||
"visit" => "949",
|
||
"user" => 161,
|
||
"cart" => "20",
|
||
"orders" => "47",
|
||
"pay" => "34",
|
||
"price" => "4347.45",
|
||
"cost" => "0.00",
|
||
"profit" => "1.00",
|
||
"collect" => "2",
|
||
"changes" => "0.13",
|
||
"repeats" => "0.14",
|
||
"store_name" => "ECOK2024年春秋季美式复古美拉德风高级感撞色领拉链夹克外套女潮",
|
||
"image" => "https://multi-store.crmeb.net/uploads/attach/2024/02/19/5bf089c30da5bdddd815fbf2cba148e6.jpg",
|
||
"product_price" => "169.90",
|
||
"stock" => 2980,
|
||
"is_show" => 1
|
||
],
|
||
[
|
||
"product_id" => 2033,
|
||
"visit" => "743",
|
||
"user" => 139,
|
||
"cart" => "30",
|
||
"orders" => "52",
|
||
"pay" => "20",
|
||
"price" => "3930.50",
|
||
"cost" => "0.00",
|
||
"profit" => "1.00",
|
||
"collect" => "1",
|
||
"changes" => "0.04",
|
||
"repeats" => "0.50",
|
||
"store_name" => "【618抢先购】CT四色眼影盘新色枕边话哑光亮片粉棕彩妆官方正品",
|
||
"image" => "https://multi-store.crmeb.net/uploads/attach/2024/05/24/fc63ee052b9dc66bd70a1e013510ded2.jpg",
|
||
"product_price" => "490.00",
|
||
"stock" => 139994,
|
||
"is_show" => 1
|
||
],
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
|
||
//-------------------------------用户统计---------------------------------------//
|
||
/**
|
||
* 获取用户概况
|
||
*/
|
||
public function get_user_basic()
|
||
{
|
||
$data = [
|
||
"people" => [
|
||
"num" => 1086,
|
||
"last_num" => 20904,
|
||
"percent" => "-94.80"
|
||
],
|
||
"browse" => [
|
||
"num" => 11296,
|
||
"last_num" => 363632,
|
||
"percent" => "-96.89"
|
||
],
|
||
"newUser" => [
|
||
"num" => 391,
|
||
"last_num" => 21790,
|
||
"percent" => "-98.20"
|
||
],
|
||
"payPeople" => [
|
||
"num" => 84,
|
||
"last_num" => 1314,
|
||
"percent" => "-93.60"
|
||
],
|
||
"payPercent" => [
|
||
"num" => "7.73",
|
||
"last_num" => "6.28",
|
||
"percent" => "23.08"
|
||
],
|
||
"payUser" => [
|
||
"num" => 27,
|
||
"last_num" => 431,
|
||
"percent" => "-93.73"
|
||
],
|
||
"rechargePeople" => [
|
||
"num" => 13,
|
||
"last_num" => 121,
|
||
"percent" => "-89.25"
|
||
],
|
||
"payPrice" => [
|
||
"num" => 2042.04,
|
||
"last_num" => 10352.37,
|
||
"percent" => "-80.27"
|
||
],
|
||
"cumulativeUser" => [
|
||
"num" => 22852,
|
||
"last_num" => 21790,
|
||
"percent" => "4.87"
|
||
],
|
||
"cumulativePayUser" => [
|
||
"num" => 552,
|
||
"last_num" => 521,
|
||
"percent" => "5.95"
|
||
],
|
||
"cumulativeRechargePeople" => [
|
||
"num" => 134,
|
||
"last_num" => 121,
|
||
"percent" => "10.74"
|
||
],
|
||
"cumulativePayPeople" => [
|
||
"num" => 1380,
|
||
"last_num" => 1314,
|
||
"percent" => "5.02"
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
|
||
/**
|
||
* 获取用户趋势
|
||
*/
|
||
public function get_user_trend()
|
||
{
|
||
$data = [
|
||
"xAxis" => [
|
||
"2024-05-06",
|
||
"2024-05-07",
|
||
"2024-05-08",
|
||
"2024-05-09",
|
||
"2024-05-10",
|
||
"2024-05-11",
|
||
"2024-05-12",
|
||
"2024-05-13",
|
||
"2024-05-14",
|
||
"2024-05-15",
|
||
"2024-05-16",
|
||
"2024-05-17",
|
||
"2024-05-18",
|
||
"2024-05-19",
|
||
"2024-05-20",
|
||
"2024-05-21",
|
||
"2024-05-22",
|
||
"2024-05-23",
|
||
"2024-05-24",
|
||
"2024-05-25",
|
||
"2024-05-26",
|
||
"2024-05-27",
|
||
"2024-05-28",
|
||
"2024-05-29",
|
||
"2024-05-30",
|
||
"2024-05-31",
|
||
"2024-06-01",
|
||
"2024-06-02",
|
||
"2024-06-03",
|
||
"2024-06-04"
|
||
],
|
||
"series" => [
|
||
[
|
||
"name" => "新增用户数",
|
||
"value" => [
|
||
13,
|
||
15,
|
||
11,
|
||
20,
|
||
9,
|
||
8,
|
||
1,
|
||
6,
|
||
15,
|
||
20,
|
||
9,
|
||
13,
|
||
5,
|
||
2,
|
||
17,
|
||
19,
|
||
8,
|
||
12,
|
||
12,
|
||
22,
|
||
9,
|
||
32,
|
||
17,
|
||
16,
|
||
14,
|
||
17,
|
||
10,
|
||
5,
|
||
20,
|
||
7
|
||
]
|
||
],
|
||
[
|
||
"name" => "访客数",
|
||
"value" => [
|
||
44,
|
||
69,
|
||
59,
|
||
82,
|
||
58,
|
||
37,
|
||
27,
|
||
44,
|
||
43,
|
||
57,
|
||
54,
|
||
49,
|
||
24,
|
||
17,
|
||
42,
|
||
68,
|
||
55,
|
||
72,
|
||
52,
|
||
130,
|
||
45,
|
||
213,
|
||
108,
|
||
97,
|
||
84,
|
||
78,
|
||
54,
|
||
45,
|
||
94,
|
||
52
|
||
]
|
||
],
|
||
[
|
||
"name" => "成交用户数",
|
||
"value" => [
|
||
3,
|
||
4,
|
||
5,
|
||
5,
|
||
3,
|
||
3,
|
||
1,
|
||
3,
|
||
4,
|
||
7,
|
||
9,
|
||
5,
|
||
1,
|
||
1,
|
||
4,
|
||
4,
|
||
7,
|
||
6,
|
||
7,
|
||
8,
|
||
2,
|
||
14,
|
||
5,
|
||
5,
|
||
8,
|
||
3,
|
||
1,
|
||
4,
|
||
8,
|
||
4
|
||
]
|
||
],
|
||
[
|
||
"name" => "充值用户",
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
2,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
2,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
1,
|
||
2,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
0,
|
||
1,
|
||
1
|
||
]
|
||
],
|
||
[
|
||
"name" => "新增付费用户数",
|
||
"value" => [
|
||
0,
|
||
3,
|
||
2,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
4,
|
||
4,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
3,
|
||
3,
|
||
1,
|
||
0,
|
||
3,
|
||
2,
|
||
0,
|
||
1,
|
||
3,
|
||
1,
|
||
2,
|
||
3,
|
||
0
|
||
]
|
||
]
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
//-------------------------------交易统计---------------------------------------//
|
||
//当日订单金额
|
||
public function top_trade()
|
||
{
|
||
$data = [
|
||
"left" => [
|
||
"name" => "当日订单金额",
|
||
"x" => [
|
||
"00",
|
||
"01",
|
||
"02",
|
||
"03",
|
||
"04",
|
||
"05",
|
||
"06",
|
||
"07",
|
||
"08",
|
||
"09",
|
||
"10",
|
||
"11",
|
||
"12",
|
||
"13",
|
||
"14",
|
||
"15",
|
||
"16",
|
||
"17",
|
||
"18",
|
||
"19",
|
||
"20",
|
||
"21",
|
||
"22",
|
||
"23",
|
||
"24"
|
||
],
|
||
"series" => [
|
||
[
|
||
"money" => 279.47,
|
||
"value" => [
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"4.48",
|
||
"257.20",
|
||
"0.00",
|
||
"16.99",
|
||
"0.80",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00"
|
||
]
|
||
],
|
||
[
|
||
"money" => 10175.64,
|
||
"value" => [
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.01",
|
||
"0.00",
|
||
"0.00",
|
||
"40.00",
|
||
"0.10",
|
||
"9938.00",
|
||
"0.08",
|
||
"30.16",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"163.20",
|
||
"4.09",
|
||
"0.00",
|
||
"0.00"
|
||
]
|
||
]
|
||
]
|
||
],
|
||
"right" => [
|
||
"today" => [
|
||
"x" => [
|
||
"00",
|
||
"01",
|
||
"02",
|
||
"03",
|
||
"04",
|
||
"05",
|
||
"06",
|
||
"07",
|
||
"08",
|
||
"09",
|
||
"10",
|
||
"11",
|
||
"12",
|
||
"13",
|
||
"14",
|
||
"15",
|
||
"16",
|
||
"17",
|
||
"18",
|
||
"19",
|
||
"20",
|
||
"21",
|
||
"22",
|
||
"23",
|
||
"24"
|
||
],
|
||
"series" => [
|
||
[
|
||
"name" => "今日订单数",
|
||
"now_money" => 8,
|
||
"last_money" => 13,
|
||
"rate" => "-38.46",
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
4,
|
||
1,
|
||
0,
|
||
1,
|
||
2,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
]
|
||
],
|
||
[
|
||
"name" => "今日支付人数",
|
||
"now_money" => 5,
|
||
"last_money" => 8,
|
||
"rate" => "-37.50",
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
2,
|
||
1,
|
||
0,
|
||
1,
|
||
2,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
]
|
||
]
|
||
]
|
||
],
|
||
"month" => [
|
||
[
|
||
"name" => "本月订单数",
|
||
"now_money" => 30,
|
||
"last_money" => 285,
|
||
"rate" => "-89.47",
|
||
"value" => [
|
||
"2024-06-01" => 2,
|
||
"2024-06-02" => 7,
|
||
"2024-06-03" => 13,
|
||
"2024-06-04" => 8,
|
||
"2024-06-05" => 0,
|
||
"2024-06-06" => 0,
|
||
"2024-06-07" => 0,
|
||
"2024-06-08" => 0,
|
||
"2024-06-09" => 0,
|
||
"2024-06-10" => 0,
|
||
"2024-06-11" => 0,
|
||
"2024-06-12" => 0,
|
||
"2024-06-13" => 0,
|
||
"2024-06-14" => 0,
|
||
"2024-06-15" => 0,
|
||
"2024-06-16" => 0,
|
||
"2024-06-17" => 0,
|
||
"2024-06-18" => 0,
|
||
"2024-06-19" => 0,
|
||
"2024-06-20" => 0,
|
||
"2024-06-21" => 0,
|
||
"2024-06-22" => 0,
|
||
"2024-06-23" => 0,
|
||
"2024-06-24" => 0,
|
||
"2024-06-25" => 0,
|
||
"2024-06-26" => 0,
|
||
"2024-06-27" => 0,
|
||
"2024-06-28" => 0,
|
||
"2024-06-29" => 0,
|
||
"2024-06-30" => 0
|
||
]
|
||
],
|
||
[
|
||
"name" => "本月支付人数",
|
||
"now_money" => 15,
|
||
"last_money" => 79,
|
||
"rate" => "-81.01",
|
||
"value" => [
|
||
"2024-06-01" => 1,
|
||
"2024-06-02" => 4,
|
||
"2024-06-03" => 8,
|
||
"2024-06-04" => 5,
|
||
"2024-06-05" => 0,
|
||
"2024-06-06" => 0,
|
||
"2024-06-07" => 0,
|
||
"2024-06-08" => 0,
|
||
"2024-06-09" => 0,
|
||
"2024-06-10" => 0,
|
||
"2024-06-11" => 0,
|
||
"2024-06-12" => 0,
|
||
"2024-06-13" => 0,
|
||
"2024-06-14" => 0,
|
||
"2024-06-15" => 0,
|
||
"2024-06-16" => 0,
|
||
"2024-06-17" => 0,
|
||
"2024-06-18" => 0,
|
||
"2024-06-19" => 0,
|
||
"2024-06-20" => 0,
|
||
"2024-06-21" => 0,
|
||
"2024-06-22" => 0,
|
||
"2024-06-23" => 0,
|
||
"2024-06-24" => 0,
|
||
"2024-06-25" => 0,
|
||
"2024-06-26" => 0,
|
||
"2024-06-27" => 0,
|
||
"2024-06-28" => 0,
|
||
"2024-06-29" => 0,
|
||
"2024-06-30" => 0
|
||
]
|
||
]
|
||
]
|
||
]
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
|
||
//交易趋势
|
||
public function bottom_trade()
|
||
{
|
||
$data = [
|
||
"x" => [
|
||
"2024-05-06",
|
||
"2024-05-07",
|
||
"2024-05-08",
|
||
"2024-05-09",
|
||
"2024-05-10",
|
||
"2024-05-11",
|
||
"2024-05-12",
|
||
"2024-05-13",
|
||
"2024-05-14",
|
||
"2024-05-15",
|
||
"2024-05-16",
|
||
"2024-05-17",
|
||
"2024-05-18",
|
||
"2024-05-19",
|
||
"2024-05-20",
|
||
"2024-05-21",
|
||
"2024-05-22",
|
||
"2024-05-23",
|
||
"2024-05-24",
|
||
"2024-05-25",
|
||
"2024-05-26",
|
||
"2024-05-27",
|
||
"2024-05-28",
|
||
"2024-05-29",
|
||
"2024-05-30",
|
||
"2024-05-31",
|
||
"2024-06-01",
|
||
"2024-06-02",
|
||
"2024-06-03",
|
||
"2024-06-04"
|
||
],
|
||
"series" => [
|
||
[
|
||
"name" => "营业额",
|
||
"desc" => "商品支付金额、充值金额、购买付费会员金额、线下收银金额",
|
||
"money" => "3538021.24",
|
||
"type" => 1,
|
||
"rate" => 353802124,
|
||
"value" => [
|
||
"85.61",
|
||
"161.06",
|
||
"1215.65",
|
||
"38.96",
|
||
"324.79",
|
||
"214.88",
|
||
"228.82",
|
||
"34.24",
|
||
"8249.85",
|
||
"573.35",
|
||
"8586.24",
|
||
"10.19",
|
||
"90.19",
|
||
"105.40",
|
||
"62.59",
|
||
"1051.34",
|
||
"160.66",
|
||
"241651.20",
|
||
"111325.41",
|
||
"2085393.05",
|
||
"267.40",
|
||
"1063972.04",
|
||
"1217.31",
|
||
"582.40",
|
||
"757.02",
|
||
"597.00",
|
||
"0.08",
|
||
"609.40",
|
||
"10175.64",
|
||
"279.47"
|
||
]
|
||
],
|
||
[
|
||
"name" => "交易毛利金额",
|
||
"desc" => "交易毛利金额 = 营业额 - 支出金额",
|
||
"money" => "3408415.79",
|
||
"type" => 1,
|
||
"rate" => 340841579,
|
||
"value" => [
|
||
"32.01",
|
||
"79.21",
|
||
"194.81",
|
||
"38.16",
|
||
"324.79",
|
||
"204.88",
|
||
"228.82",
|
||
"31.88",
|
||
"330.64",
|
||
"553.64",
|
||
"545.58",
|
||
"1.28",
|
||
"90.19",
|
||
"105.40",
|
||
"44.00",
|
||
"1043.16",
|
||
"45.94",
|
||
"240254.48",
|
||
"10346.41",
|
||
"2080946.30",
|
||
"189.00",
|
||
"1060654.82",
|
||
"629.30",
|
||
"398.10",
|
||
"91.70",
|
||
"597.00",
|
||
"0.08",
|
||
"0.10",
|
||
"10151.63",
|
||
"262.48"
|
||
]
|
||
],
|
||
[
|
||
"name" => "商品支付金额",
|
||
"desc" => "选定条件下,用户购买商品的实际支付金额,包括微信支付、余额支付、支付宝支付、线下支付金额(拼团商品在成团之后计入,线下支付订单在后台确认支付后计入)",
|
||
"money" => 157433.34,
|
||
"type" => 1,
|
||
"rate" => 15743334,
|
||
"value" => [
|
||
"85.61",
|
||
"161.06",
|
||
"1215.65",
|
||
"38.96",
|
||
"324.69",
|
||
"214.88",
|
||
"228.82",
|
||
"34.24",
|
||
"8249.85",
|
||
"573.35",
|
||
"8586.24",
|
||
"10.19",
|
||
"90.19",
|
||
"105.40",
|
||
"62.59",
|
||
"1051.34",
|
||
"160.66",
|
||
"1693.20",
|
||
"111325.41",
|
||
"5365.05",
|
||
"189.00",
|
||
"3448.64",
|
||
"1217.31",
|
||
"582.40",
|
||
"757.02",
|
||
"597.00",
|
||
"0.08",
|
||
"609.40",
|
||
"10175.64",
|
||
"279.47"
|
||
]
|
||
],
|
||
[
|
||
"name" => "购买会员金额",
|
||
"desc" => "选定条件下,用户成功购买付费会员的金额",
|
||
"money" => 0,
|
||
"type" => 1,
|
||
"rate" => 0,
|
||
"value" => [
|
||
0,
|
||
"0.00",
|
||
"0.00",
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"0.00",
|
||
"0.00",
|
||
0,
|
||
"0.00",
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
0,
|
||
"0.00",
|
||
"0.00",
|
||
0,
|
||
0,
|
||
"0.00",
|
||
0,
|
||
"0.00",
|
||
"0.00",
|
||
0
|
||
]
|
||
],
|
||
[
|
||
"name" => "充值金额",
|
||
"desc" => "选定条件下,用户成功充值的金额",
|
||
"money" => "3380587.90",
|
||
"type" => 1,
|
||
"rate" => 338058790,
|
||
"value" => [
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.10",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"239958.00",
|
||
"0.00",
|
||
"2080028.00",
|
||
"78.40",
|
||
"1060523.40",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00",
|
||
"0.00"
|
||
]
|
||
],
|
||
[
|
||
"name" => "线下收银金额",
|
||
"desc" => "选定条件下,用户在线下扫码支付的金额",
|
||
"money" => 0,
|
||
"type" => 0,
|
||
"rate" => 0,
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
]
|
||
],
|
||
[
|
||
"name" => "支出金额",
|
||
"desc" => "余额支付金额、支付佣金金额",
|
||
"money" => "129605.45",
|
||
"type" => 1,
|
||
"rate" => 12960545,
|
||
"value" => [
|
||
"53.60",
|
||
"81.85",
|
||
"1020.84",
|
||
"0.80",
|
||
"0.00",
|
||
"10.00",
|
||
"0.00",
|
||
"2.36",
|
||
"7919.21",
|
||
"19.71",
|
||
"8040.66",
|
||
"8.91",
|
||
"0.00",
|
||
"0.00",
|
||
"18.59",
|
||
"8.18",
|
||
"114.72",
|
||
"1396.72",
|
||
"100979.00",
|
||
"4446.75",
|
||
"78.40",
|
||
"3317.22",
|
||
"588.01",
|
||
"184.30",
|
||
"665.32",
|
||
"0.00",
|
||
"0.00",
|
||
"609.30",
|
||
"24.01",
|
||
"16.99"
|
||
]
|
||
],
|
||
[
|
||
"name" => "余额支付金额",
|
||
"desc" => "用户下单时使用余额实际支付的金额",
|
||
"money" => "128943.25",
|
||
"type" => 0,
|
||
"rate" => 1289432500,
|
||
"value" => [
|
||
"53.60",
|
||
"81.85",
|
||
"1020.84",
|
||
"0.80",
|
||
"0.00",
|
||
"10.00",
|
||
"0.00",
|
||
"2.36",
|
||
"7919.21",
|
||
"19.71",
|
||
"8040.66",
|
||
"8.91",
|
||
"0.00",
|
||
"0.00",
|
||
"18.59",
|
||
"8.18",
|
||
"114.72",
|
||
"1396.72",
|
||
"100979.00",
|
||
"4416.75",
|
||
"0.00",
|
||
"2763.42",
|
||
"588.01",
|
||
"184.30",
|
||
"665.32",
|
||
"0.00",
|
||
"0.00",
|
||
"609.30",
|
||
"24.01",
|
||
"16.99"
|
||
]
|
||
],
|
||
[
|
||
"name" => "支付佣金金额",
|
||
"desc" => "后台给推广员支付的推广佣金,以实际支付为准",
|
||
"money" => 662.2,
|
||
"type" => 0,
|
||
"rate" => 66220,
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"30.00",
|
||
"78.40",
|
||
"553.80",
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
]
|
||
],
|
||
[
|
||
"name" => "商品退款金额",
|
||
"desc" => "用户成功退款的商品金额",
|
||
"money" => 2321.81,
|
||
"type" => 0,
|
||
"rate" => 232181,
|
||
"value" => [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"0.00",
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"0.00",
|
||
"730.80",
|
||
"49.00",
|
||
"219.00",
|
||
0,
|
||
"1323.01",
|
||
"0.00",
|
||
0,
|
||
"0.00",
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
"0.00"
|
||
]
|
||
]
|
||
],
|
||
];
|
||
return $this->data($data);
|
||
}
|
||
}
|