Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cof_vip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
houdong
cof_vip
Commits
c5eeff40
Commit
c5eeff40
authored
Nov 29, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
记录点击大赛列表的日志
parent
e8c92d20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
IndexAction.class.php
app/Lib/Action/Vip/IndexAction.class.php
+15
-0
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+16
-0
index.html
app/Tpl/Vip/PkTop/index.html
+7
-1
No files found.
app/Lib/Action/Vip/IndexAction.class.php
View file @
c5eeff40
...
...
@@ -1169,9 +1169,24 @@ class IndexAction extends IdentityAction {
$this
->
assign
(
'gid'
,
$this
->
GID
);
$gList
=
D
(
'Niu'
)
->
getMoreDs
(
$userId
,
'www'
);
$this
->
assign
(
'gList'
,
$gList
);
$this
->
dianjiLog
();
$this
->
display
();
}
public
function
dianjiLog
(){
$gid
=
$this
->
GID
;
$userId
=
$this
->
user
[
'userID'
];
if
(
$userId
){
$where
=
[
'user_id'
=>
$userId
,
'add_time'
=>
[
'egt'
,
strtotime
(
'today'
)],
'model'
=>
MODULE_NAME
,
'action'
=>
'moreDs'
,
'param1'
=>
$gid
];
$count
=
M
(
'ClickLog'
)
->
where
(
$where
)
->
count
();
if
(
!
$count
){
$data
=
[
'user_id'
=>
$userId
,
'user_name'
=>
$this
->
user
[
'userName'
],
'model'
=>
MODULE_NAME
,
'action'
=>
'moreDs'
,
'add_time'
=>
time
(),
'client'
=>
'WindowsPc'
,
'day'
=>
date
(
'Ymd'
,
time
()),
'param1'
=>
$gid
];
M
(
'ClickLog'
)
->
add
(
$data
);
}
}
}
// public function bmOtherGroup(){
// $userId = $this->user['userID'];
// $userName = $this->user['userName'];
...
...
app/Lib/Action/Vip/PkTopAction.class.php
View file @
c5eeff40
...
...
@@ -1222,6 +1222,22 @@ class PkTopAction extends IdentityAction{
$this
->
ajaxReturn
([
'status'
=>
1
,
'joinStatus'
=>
$res
[
0
],
'userId'
=>
$userId
,
'debug'
=>
$res
[
0
],
'info'
=>
$info
]);
}
public
function
dianjiLog
(){
$gid
=
$this
->
GID
;
$userId
=
$this
->
user
[
'userID'
];
if
(
$userId
){
$where
=
[
'user_id'
=>
$userId
,
'add_time'
=>
[
'egt'
,
strtotime
(
'today'
)],
'model'
=>
MODULE_NAME
,
'action'
=>
'moreDs'
,
'param1'
=>
$gid
];
$count
=
M
(
'ClickLog'
)
->
where
(
$where
)
->
count
();
if
(
!
$count
){
$data
=
[
'user_id'
=>
$userId
,
'user_name'
=>
$this
->
user
[
'userName'
],
'model'
=>
MODULE_NAME
,
'action'
=>
'moreDs'
,
'add_time'
=>
time
(),
'client'
=>
getSys
(),
'day'
=>
date
(
'Ymd'
,
time
()),
'param1'
=>
$gid
];
M
(
'ClickLog'
)
->
add
(
$data
);
}
}
$this
->
ajaxReturn
([
'status'
=>
1
,
'debug'
=>
'用户id:'
.
$userId
.
',旧数据条数'
.
$count
]);
}
}
?>
...
...
app/Tpl/Vip/PkTop/index.html
View file @
c5eeff40
...
...
@@ -443,9 +443,15 @@
// if(i == 1){
// slider.reloadSlider();
// }
if
(
i
==
2
){
$
(
'.selectNow'
).
eq
(
1
).
click
();
}
//点击量统计
if
(
i
==
3
){
$
.
get
(
'/PkTop/dianjiLog'
,{},
function
(
e
){
console
.
log
(
'记录点击日志'
);
},
'json'
);
$
(
'.selectNow'
).
eq
(
1
).
click
();
}
})
});
...
...
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