Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
b79baded
Commit
b79baded
authored
Jul 07, 2017
by
夏彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加收藏和浏览记录的接口
parent
1c0eecdb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
0 deletions
+80
-0
ucenter_favorite.php
example/ucenter_favorite.php
+26
-0
BrowsingHistory.php
src/ucenter/BrowsingHistory.php
+21
-0
Favorite.php
src/ucenter/Favorite.php
+33
-0
No files found.
example/ucenter_favorite.php
0 → 100644
View file @
b79baded
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 06/07/2017
* Time: 1:47 PM
*/
use
internalApi\ucenter\Favorite
;
require
__DIR__
.
'/_init.php'
;
Favorite
::
setDebug
();
$userId
=
1
;
$title
=
1
;
$img
=
1
;
$sourceUrl
=
1
;
$from
=
'xue'
;
$type
=
'course'
;
$sourceId
=
3
;
//$result = Favorite::add($userId,$title,$img,$sourceUrl,$from,$type,$sourceId);
//$result = Favorite::delete(2);
$result
=
Favorite
::
isFavorite
(
'xue'
,
'course'
,[
2
,
3
,
4
]);
print_r
(
$result
);
\ No newline at end of file
src/ucenter/BrowsingHistory.php
0 → 100644
View file @
b79baded
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 06/07/2017
* Time: 8:01 PM
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
class
BrowsingHistory
extends
Client
{
public
static
function
add
(
$userId
,
$title
,
$img
,
$sourceUrl
,
$from
,
$type
,
$sourceId
)
{
return
self
::
call
(
'browsingHistory.add'
,
compact
(
'userId'
,
'title'
,
'img'
,
'sourceUrl'
,
'from'
,
'type'
,
'sourceId'
));
}
}
\ No newline at end of file
src/ucenter/Favorite.php
0 → 100644
View file @
b79baded
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 06/07/2017
* Time: 1:45 PM
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
class
Favorite
extends
Client
{
public
static
function
add
(
$userId
,
$title
,
$img
,
$sourceUrl
,
$from
,
$type
,
$sourceId
)
{
return
self
::
call
(
'favorite.add'
,
compact
(
'userId'
,
'title'
,
'img'
,
'sourceUrl'
,
'from'
,
'type'
,
'sourceId'
));
}
public
static
function
delete
(
$from
,
$type
,
$sourceId
,
$userId
)
{
return
self
::
call
(
'favorite.delete'
,
compact
(
'from'
,
'type'
,
'sourceId'
,
'userId'
));
}
public
static
function
isFavorite
(
$from
,
$type
,
$sourceId
,
$userId
)
{
return
self
::
call
(
'favorite.isFavorite'
,
compact
(
'from'
,
'type'
,
'sourceId'
,
'userId'
));
}
}
\ No newline at end of file
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