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
a8ddb631
Commit
a8ddb631
authored
Mar 04, 2019
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1004b207
4406394e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
11 deletions
+51
-11
ucenter_elascontent.php
example/ucenter_elascontent.php
+14
-10
ElasContent.php
src/ucenter/ElasContent.php
+37
-1
No files found.
example/ucenter_elascontent.php
View file @
a8ddb631
...
@@ -11,13 +11,17 @@ use internalApi\ucenter\ElasContent;
...
@@ -11,13 +11,17 @@ use internalApi\ucenter\ElasContent;
require
__DIR__
.
'/_init.php'
;
require
__DIR__
.
'/_init.php'
;
ElasContent
::
setDebug
();
ElasContent
::
setDebug
();
$id
=
1
;
//ElasContent::newreplace(5, "测试标题1", "内容", ['//imgs1', 'imgs2'], 'http://www.baidu.com', 'bbs', 10, [
$title
=
'131212312312231313'
;
// '洗衣机',
$content
=
'13123'
;
//
$pic
=
'12321'
;
//], 8, 9, 1551601307, 38, 1551601307, [
$url
=
'12312'
;
// 'a' => 1,
$from
=
'bbs'
;
// 'b' => 2
$createAt
=
1762734
;
//]);
$extra
=
[
'a'
=>
2222
];
//ElasContent::update(5,'bbs',[
//ElasContent::replace($id,$title,$content,$pic,$url,$from,$createAt,$extra);
// 'title'=>'夏彬 修改',
ElasContent
::
delete
(
1
,
'bbs'
);
// 'tags'=>[
\ No newline at end of file
// 'aas','夏彬','夏彬','1'
// ]
//]);
ElasContent
::
delete
(
5
,
'bbs'
);
src/ucenter/ElasContent.php
View file @
a8ddb631
...
@@ -31,6 +31,42 @@ class ElasContent extends Client
...
@@ -31,6 +31,42 @@ class ElasContent extends Client
}
}
/**
* @param integer $id 数据id 学院的courseId bbs的thread id
* @param string $title 标题
* @param string $contentData 纯文本内容 过滤掉富文本部分
* @param array $imgs 图片列表
* @param string $url 地址
* @param string $from 来源 bbs xue
* @param integer $hot 热度
* @param array $tags 标签数组
* @param integer $like_num 点赞数
* @param integer $comment_num 评论数
* @param integer $order_time 排序时间
* @param integer $uid 用户中心uid
* @param integer $createdAt
* @param array $extra
* @return mixed
* @throws \internalApi\base\ApiException
* @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
){
return
self
::
call
(
'elasContent.newreplace'
,
compact
(
'id'
,
'title'
,
'contentData'
,
'imgs'
,
'url'
,
'from'
,
'hot'
,
'tags'
,
'like_num'
,
'comment_num'
,
'order_time'
,
'uid'
,
'createdAt'
,
'extra'
));
}
/**
* @param integer $id 数据id
* @param string $from 来源 bbs xue
* @param array $data 修改的数据
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
update
(
$id
,
$from
,
$data
){
return
self
::
call
(
'elasContent.update'
,
compact
(
'id'
,
'from'
,
'data'
));
}
/**
/**
* delete
* delete
* @param $id
* @param $id
...
@@ -44,4 +80,4 @@ class ElasContent extends Client
...
@@ -44,4 +80,4 @@ class ElasContent extends Client
}
}
\ 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