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
c5f455c3
Commit
c5f455c3
authored
Mar 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘标签
parent
d2822e56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
Label.php
application/api_broker/controller/Label.php
+27
-4
route.php
application/route.php
+3
-3
No files found.
application/api_broker/controller/Label.php
View file @
c5f455c3
<?php
<?php
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
* User: fuju
* User: fu
ju
* Date: 2018/2/6
* Date: 2018/2/6
* Time: 15:03
* Time: 15:03
*/
*/
namespace
app\
index
\controller
;
namespace
app\
api_broker
\controller
;
use
app\api_broker\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\GLabels
;
use
app\model\GLabels
;
use
think\Session
;
use
think\Session
;
...
@@ -54,6 +53,9 @@ class Label extends Basic
...
@@ -54,6 +53,9 @@ class Label extends Basic
* 获取打电话的标签
* 获取打电话的标签
*
*
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getLabelsList
()
{
public
function
getLabelsList
()
{
$result
[
'code'
]
=
200
;
$result
[
'code'
]
=
200
;
...
@@ -67,4 +69,24 @@ class Label extends Basic
...
@@ -67,4 +69,24 @@ class Label extends Basic
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
/**
* 楼盘标签
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getLabelsShopList
()
{
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$labels
=
new
GLabels
();
$field
=
'id,name,create_time'
;
$where
[
'type'
]
=
0
;
$result
[
'data'
][
'list'
]
=
$labels
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$result
[
'data'
][
'total'
]
=
$labels
->
getTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
}
\ No newline at end of file
application/route.php
View file @
c5f455c3
...
@@ -323,9 +323,8 @@ Route::group('broker', [
...
@@ -323,9 +323,8 @@ Route::group('broker', [
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]
],
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]
],
'houseEdit'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
'getLabelsShopList'
=>
[
'api_broker/label/getLabelsShopList'
,
[
'method'
=>
'get'
]],
//编辑商铺
]);
]);
//Route::miss('api/index/miss');//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ 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