Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
8698e6c6
Commit
8698e6c6
authored
Nov 14, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成新用户总数 、用户参与度 统计 缺少页面显示
parent
88bd208a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
65 deletions
+141
-65
StatisticsServiceContract.php
app/Contracts/StatisticsServiceContract.php
+2
-0
StatisticsController.php
app/Http/Controllers/StatisticsController.php
+18
-1
StatisticsService.php
app/Services/StatisticsService.php
+119
-64
web.php
routes/web.php
+2
-0
No files found.
app/Contracts/StatisticsServiceContract.php
View file @
8698e6c6
...
...
@@ -20,6 +20,8 @@ interface StatisticsServiceContract
public
function
UserRetention
();
public
function
AverageUserOperation
();
public
function
PageRetentionTime
();
public
function
NewUser
();
public
function
UserEngagement
();
}
\ No newline at end of file
app/Http/Controllers/StatisticsController.php
View file @
8698e6c6
...
...
@@ -80,17 +80,34 @@ class StatisticsController extends Controller
}
// 平均操作
public
function
AverageUserOperation
()
{
$data
=
$this
->
mStatistics
->
AverageUserOperation
();
return
$data
;
}
// 页面停留时间
public
function
RetentionTime
()
{
$data
=
$this
->
mStatistics
->
PageRetentionTime
();
return
$data
;
}
// 新用户
public
function
NewUsers
()
{
$data
=
$this
->
mStatistics
->
NewUser
();
return
$data
;
}
// 用户参与度
public
function
UserEngagement
()
{
$data
=
$this
->
mStatistics
->
UserEngagement
();
return
$data
;
}
}
app/Services/StatisticsService.php
View file @
8698e6c6
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
8698e6c6
...
...
@@ -88,6 +88,8 @@ Route::group(['prefix'=> 'statistics'],function (){
Route
::
get
(
'user_retention'
,
'StatisticsController@UserRetention'
)
->
name
(
'statistics.UserRetention'
);
Route
::
get
(
'average_user_operation'
,
'StatisticsController@AverageUserOperation'
)
->
name
(
'statistics.AverageUserOperation'
);
Route
::
get
(
'retention_time'
,
'StatisticsController@RetentionTime'
)
->
name
(
'statistics.RetentionTime'
);
Route
::
get
(
'new_user'
,
'StatisticsController@NewUsers'
)
->
name
(
'statistics.NewUser'
);
Route
::
get
(
'user_engagement'
,
'StatisticsController@UserEngagement'
)
->
name
(
'statistics.UserEngagement'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment