Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
3c16af35
Commit
3c16af35
authored
Apr 01, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
踢人
parent
178fa674
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
api/Appapi/Api/User.php
+25
-0
api/Appapi/Domain/User.php
+6
-0
api/Appapi/Model/User.php
+20
-0
No files found.
api/Appapi/Api/User.php
View file @
3c16af35
...
@@ -109,6 +109,11 @@ class Api_User extends PhalApi_Api {
...
@@ -109,6 +109,11 @@ class Api_User extends PhalApi_Api {
'touid'
=>
array
(
'name'
=>
'touid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'对方ID'
),
'touid'
=>
array
(
'name'
=>
'touid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'对方ID'
),
),
),
'attentList'
=>
array
(
'uid'
=>
array
(
'name'
=>
'uid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'用户ID'
),
'token'
=>
array
(
'name'
=>
'token'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'用户token'
),
),
'isBlacked'
=>
array
(
'isBlacked'
=>
array
(
'uid'
=>
array
(
'name'
=>
'uid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'用户ID'
),
'uid'
=>
array
(
'name'
=>
'uid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'用户ID'
),
'touid'
=>
array
(
'name'
=>
'touid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'对方ID'
),
'touid'
=>
array
(
'name'
=>
'touid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'对方ID'
),
...
@@ -1003,6 +1008,26 @@ class Api_User extends PhalApi_Api {
...
@@ -1003,6 +1008,26 @@ class Api_User extends PhalApi_Api {
return
$rs
;
return
$rs
;
}
}
public
function
attentList
()
{
$rs
=
array
(
'code'
=>
0
,
'msg'
=>
''
,
'info'
=>
array
());
$uid
=
checkNull
(
$this
->
uid
);
$token
=
checkNull
(
$this
->
token
);
$checkToken
=
checkToken
(
$uid
,
$token
);
if
(
$checkToken
==
700
){
$rs
[
'code'
]
=
$checkToken
;
$rs
[
'msg'
]
=
'您的登陆状态失效,请重新登陆!'
;
return
$rs
;
}
$domain
=
new
Domain_User
();
$result
=
$domain
->
attentList
(
$uid
);
$rs
[
'info'
][
0
]
=
$result
;
return
$rs
;
}
/**
/**
* 判断是否关注
* 判断是否关注
* @desc 用于判断是否关注
* @desc 用于判断是否关注
...
...
api/Appapi/Domain/User.php
View file @
3c16af35
...
@@ -119,6 +119,12 @@ class Domain_User {
...
@@ -119,6 +119,12 @@ class Domain_User {
return
$rs
;
return
$rs
;
}
}
public
function
attentList
(
$uid
)
{
$model
=
new
Model_User
();
$rs
=
$model
->
attentList
(
$uid
);
return
$rs
;
}
public
function
setBlack
(
$uid
,
$touid
)
{
public
function
setBlack
(
$uid
,
$touid
)
{
$rs
=
array
();
$rs
=
array
();
...
...
api/Appapi/Model/User.php
View file @
3c16af35
...
@@ -354,6 +354,26 @@ class Model_User extends PhalApi_Model_NotORM
...
@@ -354,6 +354,26 @@ class Model_User extends PhalApi_Model_NotORM
}
}
}
}
public
function
attentList
(
$uid
)
{
$start
=
strtotime
(
date
(
"Y-m-d"
,
strtotime
(
"-15 day"
)));
$end
=
strtotime
(
date
(
'Y-m-d 23:59:59'
));
$info
=
DI
()
->
notorm
->
users_attention
->
select
(
"touid"
)
->
where
(
"uid =
{
$uid
}
and between addtime
{
$start
}
and
{
$end
}
"
)
->
order
(
'addtime desc'
)
->
fetchAll
();
foreach
(
$info
as
$k
=>
$v
)
{
$userinfo
=
getUserInfo
(
$v
[
'touid'
]);
$v
[
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
$v
[
'avatar'
]
=
$userinfo
[
'avatar'
];
$v
[
'avatar_thumb'
]
=
$userinfo
[
'avatar_thumb'
];
$v
[
'level'
]
=
$userinfo
[
'level'
];
$v
[
'level_anchor'
]
=
$userinfo
[
'level_anchor'
];
$v
[
'isattent'
]
=
isAttention
(
$v
[
'touid'
],
$uid
);
$info
[
$k
]
=
$v
;
}
return
$info
;
}
/* 拉黑 */
/* 拉黑 */
public
function
setBlack
(
$uid
,
$touid
)
public
function
setBlack
(
$uid
,
$touid
)
{
{
...
...
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