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
4ef336d3
Commit
4ef336d3
authored
Mar 13, 2019
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4a7fa487
d619257b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
ucenter_elascontent.php
example/ucenter_elascontent.php
+8
-8
ucenter_label.php
example/ucenter_label.php
+1
-1
ElasContent.php
src/ucenter/ElasContent.php
+15
-2
No files found.
example/ucenter_elascontent.php
View file @
4ef336d3
...
@@ -11,17 +11,17 @@ use internalApi\ucenter\ElasContent;
...
@@ -11,17 +11,17 @@ use internalApi\ucenter\ElasContent;
require
__DIR__
.
'/_init.php'
;
require
__DIR__
.
'/_init.php'
;
ElasContent
::
setDebug
();
ElasContent
::
setDebug
();
//ElasContent::newreplace(5, "测试标题1", "内容", ['//imgs1', 'imgs2'],
'http://www.baidu.com', 'bbs', 10, [
ElasContent
::
newreplace
(
5
,
"测试标题1"
,
"内容"
,
[],
1
,
'http://www.baidu.com'
,
'bbs'
,
10
,
[
//
'洗衣机',
'洗衣机'
,
//
//
], 8, 9, 1551601307, 38, 1551601307, [
],
8
,
9
,
1551601307
,
38
,
1551601307
,
[
//
'a' => 1,
'a'
=>
1
,
//
'b' => 2
'b'
=>
2
//
]);
]);
//ElasContent::update(5,'bbs',[
//ElasContent::update(5,'bbs',[
// 'title'=>'夏彬 修改',
// 'title'=>'夏彬 修改',
// 'tags'=>[
// 'tags'=>[
// 'aas','夏彬','夏彬','1'
// 'aas','夏彬','夏彬','1'
// ]
// ]
//]);
//]);
ElasContent
::
delete
(
5
,
'bbs'
);
//
ElasContent::delete(5,'bbs');
example/ucenter_label.php
View file @
4ef336d3
...
@@ -15,5 +15,5 @@ require __DIR__.'/_init.php';
...
@@ -15,5 +15,5 @@ require __DIR__.'/_init.php';
Label
::
setDebug
();
Label
::
setDebug
();
//$info = Group::getPotentialGroupMemberList('worker-71318');
//$info = Group::getPotentialGroupMemberList('worker-71318');
$info
=
Label
::
getLabels
(
Label
::
TYPE_BRAND
);
$info
=
Label
::
getLabels
(
[
Label
::
TYPE_BRAND
,
Label
::
TYPE_CATEGORY
]
);
print_r
(
$info
);
print_r
(
$info
);
src/ucenter/ElasContent.php
View file @
4ef336d3
...
@@ -39,6 +39,7 @@ class ElasContent extends Client
...
@@ -39,6 +39,7 @@ class ElasContent extends Client
* @param string $url 地址
* @param string $url 地址
* @param string $from 来源 bbs xue
* @param string $from 来源 bbs xue
* @param integer $hot 热度
* @param integer $hot 热度
* @param integer $fid 版块id
* @param array $tags 标签数组
* @param array $tags 标签数组
* @param integer $like_num 点赞数
* @param integer $like_num 点赞数
* @param integer $comment_num 评论数
* @param integer $comment_num 评论数
...
@@ -50,8 +51,8 @@ class ElasContent extends Client
...
@@ -50,8 +51,8 @@ class ElasContent extends Client
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
* @throws \internalApi\base\ClientException
*/
*/
public
static
function
newreplace
(
$id
,
$title
,
$contentData
,
$imgs
,
$url
,
$from
,
$hot
,
$tags
,
$like_num
,
$comment_num
,
$order_time
,
$uid
,
$createdAt
,
$extra
){
public
static
function
newreplace
(
$id
,
$title
,
$contentData
,
$imgs
,
$
fid
,
$
url
,
$from
,
$hot
,
$tags
,
$like_num
,
$comment_num
,
$order_time
,
$uid
,
$createdAt
,
$extra
){
return
self
::
call
(
'elasContent.newreplace'
,
compact
(
'id'
,
'title'
,
'contentData'
,
'imgs'
,
'url'
,
'from'
,
'hot'
,
'tags'
,
'like_num'
,
'comment_num'
,
'order_time'
,
'uid'
,
'createdAt'
,
'extra'
));
return
self
::
call
(
'elasContent.newreplace'
,
compact
(
'id'
,
'title'
,
'contentData'
,
'imgs'
,
'
fid'
,
'
url'
,
'from'
,
'hot'
,
'tags'
,
'like_num'
,
'comment_num'
,
'order_time'
,
'uid'
,
'createdAt'
,
'extra'
));
}
}
...
@@ -67,6 +68,18 @@ class ElasContent extends Client
...
@@ -67,6 +68,18 @@ class ElasContent extends Client
return
self
::
call
(
'elasContent.update'
,
compact
(
'id'
,
'from'
,
'data'
));
return
self
::
call
(
'elasContent.update'
,
compact
(
'id'
,
'from'
,
'data'
));
}
}
/**
* @param integer $id 数据id
* @param string $from 来源 bbs xue
* @param array $data 修改的数据 ['like_num'=>1]
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
increase
(
$id
,
$from
,
$data
){
return
self
::
call
(
'elasContent.increase'
,
compact
(
'id'
,
'from'
,
'data'
));
}
/**
/**
* delete
* delete
* @param $id
* @param $id
...
...
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