Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
fcceb6f4
Commit
fcceb6f4
authored
Apr 18, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开盘广场 用户置顶权限
parent
354bc04d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
SquareService.php
application/api_broker/service/SquareService.php
+28
-6
No files found.
application/api_broker/service/SquareService.php
View file @
fcceb6f4
...
...
@@ -179,6 +179,12 @@ class SquareService
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
}
/**
* 开盘广场文章详情
* @param $params
* @param $agent_id
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getSquareInfo
(
$params
,
$agent_id
){
$field
=
'Square.id,'
;
...
...
@@ -200,9 +206,8 @@ class SquareService
$agent
=
$this
->
redis
->
getRedisCache
(
2
,
$res
[
'agent_id'
])
;
$res
[
'name'
]
=
$agent
[
'name'
];
//权限
$vip
=
new
VipService
();
//0:有权限 1:无权限
$res
[
'is_can_edit'
]
=
$vip
->
vip
(
$agent_id
,
'editSquare'
);
//用户置顶权限
$res
[
'user_competence'
]
=
$this
->
userCompetence
(
$agent_id
);
return
$res
;
}
...
...
@@ -297,6 +302,12 @@ class SquareService
}
}
/**
* 评论详情
* @param $params
* @param $agent_id
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getCommenInfo
(
$params
,
$agent_id
){
$field
=
'Comment.id,Comment.comment,Comment.create_time,Comment.agent_id'
;
//
$get_params
[
'Comment.id'
]
=
$params
[
'id'
];
...
...
@@ -305,12 +316,23 @@ class SquareService
$agent
=
$this
->
redis
->
getRedisCache
(
2
,
$res
[
'agent_id'
])
;
$res
[
'name'
]
=
$agent
[
'name'
];
$res
[
'image_path'
]
=
AGENTHEADERIMGURL
.
$agent
[
'img'
];
//'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg';
//权限
$
vip
=
new
VipService
();
//0:有权限 1:无权限
$res
[
'is_can_edit'
]
=
$vip
->
vip
(
$agent_id
,
'editSquare'
);
//
用户置顶
权限
$
res
[
'user_competence'
]
=
$this
->
userCompetence
(
$agent_id
);
return
$res
;
}
/**
* 用户置顶权限
* @param $agent_id
* @return mixed
*/
public
function
userCompetence
(
$agent_id
){
$vip
=
new
VipService
();
//0:有权限 1:无权限
$user_competence
[
'set_top'
]
=
$vip
->
vip
(
$agent_id
,
'SquareSetTop'
);
return
$user_competence
;
}
/**
* 评论置顶
* @param $params
...
...
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