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
836a7438
Commit
836a7438
authored
Feb 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进跟进标签
parent
f6d87bc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
2 deletions
+77
-2
Label.php
application/api_broker/controller/Label.php
+72
-0
Label.php
application/index/controller/Label.php
+1
-1
route.php
application/route.php
+4
-1
No files found.
application/api_broker/controller/Label.php
0 → 100644
View file @
836a7438
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/2/6
* Time: 15:03
*/
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\GLabels
;
use
think\Session
;
class
Label
extends
Basic
{
/**
* 添加标签
*
* @return \think\Response|\think\response\View
*/
public
function
index
(){
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
params
[
'name'
])
{
$labels
=
new
GLabels
();
$data
[
'name'
]
=
$this
->
params
[
'name'
];
$data
[
'operation_id'
]
=
Session
::
get
(
'userId'
);
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$data
[
'type'
]
=
$this
->
params
[
'type'
];
if
(
$this
->
params
[
'id'
])
{
$result
[
'data'
]
=
$labels
->
save
(
$data
,
[
'id'
=>
$this
->
params
[
'id'
]]);
}
else
{
$result
[
'data'
]
=
$labels
->
save
(
$data
);
}
}
else
{
$result
[
'code'
]
=
101
;
$result
[
'msg'
]
=
'name is null'
;
}
$return
=
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
else
{
//商铺添加页面
$return
=
view
(
'index'
);
}
return
$return
;
}
/**
* 获取打电话的标签
*
* @return \think\Response
*/
public
function
getLabelsList
()
{
$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
=
'*'
;
$where
[
'type'
]
=
1
;
$result
[
'data'
]
=
$labels
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
\ No newline at end of file
application/index/controller/Label.php
View file @
836a7438
...
...
@@ -57,7 +57,7 @@ class Label extends Basic
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$labels
=
new
GLabels
();
$field
=
'*'
;
$where
=
''
;
$where
[
'type'
]
=
0
;
$result
[
'data'
]
=
$labels
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
...
...
application/route.php
View file @
836a7438
...
...
@@ -215,7 +215,9 @@ Route::group('broker', [
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'get'
]
],
//经纪人登陆
'editClient'
=>
[
'api_broker/Client/editClient'
,
[
'method'
=>
'get|post'
]
],
//添加和编辑客户
'getBroker'
=>
[
'api_broker/broker/getBroker'
,[
'method'
=>
'get'
]],
'getBroker'
=>
[
'api_broker/broker/getBroker'
,[
'method'
=>
'get'
]],
//获取经纪人列表
'labelEdit'
=>
[
'index/broker/index'
,[
'method'
=>
'get|post'
]],
//编辑标签
'getLabelsList'
=>
[
'index/broker/getLabelsList'
,[
'method'
=>
'get'
]],
//标签列表
]);
//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