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
8404249e
Commit
8404249e
authored
Mar 01, 2018
by
zfc
Committed by
hujun
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签列表接口
parent
756dd394
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
5 deletions
+48
-5
Client.php
application/api_broker/controller/Client.php
+25
-0
Label.php
application/index/controller/Label.php
+12
-4
Basic.php
application/index/extend/Basic.php
+0
-1
u_label_index.html
application/index/view/label/u_label_index.html
+11
-0
No files found.
application/api_broker/controller/Client.php
View file @
8404249e
...
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\model\Agents
;
use
app\model\ULabels
;
use
app\model\Users
;
use
app\model\UPhoneFollowPp
;
...
...
@@ -225,4 +226,28 @@ class Client extends Basic
$data
[
'page'
]
=
$pageNo
;
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
/**
* 客户标签
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getULabelsListApp
()
{
$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
ULabels
();
$field
=
'id,name,create_time'
;
$where
[
'type'
]
=
1
;
$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'
]);
}
}
application/index/controller/Label.php
View file @
8404249e
...
...
@@ -96,10 +96,13 @@ class Label extends Basic
*/
public
function
updateULabel
(){
$group_id
=
$this
->
request
->
param
(
'id'
);
$table
=
New
ULabels
;
if
(
$this
->
request
->
isPost
())
{
$data
=
input
(
'post.'
);
$data
[
'operation_id'
]
=
Session
::
get
(
"userinfo.id"
);
//操作人id
if
(
$table
->
repetition
(
'name'
,
$data
[
'name'
])
&&
empty
(
$data
[
'id'
])){
return
$this
->
response
(
100
,
'url存在重复值'
);
}
...
...
@@ -113,7 +116,6 @@ class Label extends Basic
$id
=
$data
[
'id'
];
}
//新增或者编辑数据
//prt($data)
if
(
$table
->
editData
(
$data
,
$id
))
{
return
$this
->
response
(
200
,
'成功'
);
}
else
{
...
...
@@ -140,15 +142,20 @@ class Label extends Basic
public
function
getULabelsList
()
{
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
//获取当前模块可操作按钮start********************************
$userRule
=
Session
::
get
(
'userRule'
);
$result
[
'data'
][
'cz'
]
=
$userRule
[
'cz'
];
//获取当前模块可操作按钮end**********************************
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
1
0
:
$this
->
params
[
'pageSize'
];
$labels
=
new
GLabels
()
;
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
1
5
:
$this
->
params
[
'pageSize'
];
$labels
=
New
ULabels
;
$field
=
'id,name,create_time'
;
$where
[
'type'
]
=
0
;
$where
[
'type'
]
=
1
;
$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/index/extend/Basic.php
View file @
8404249e
...
...
@@ -78,7 +78,6 @@ class Basic extends Controller
public
function
userAuth
(
$requestPath
){
$session
=
Session
::
get
(
"userinfo.nav"
);
//prt($session);
$rule
=
0
;
if
(
$session
!=
NULL
)
{
//判断当前控制器用户是否拥有进入权限
...
...
application/index/view/label/u_label_index.html
0 → 100644
View file @
8404249e
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<body>
</body>
</html>
\ 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