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
c2b9c1f1
Commit
c2b9c1f1
authored
Jul 11, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表权限控制
parent
22e1cb4c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
37 deletions
+7
-37
Member.php
application/index/controller/Member.php
+5
-35
user.js
public/resource/js/user.js
+1
-1
user_template_tpl.html
public/resource/template/user_template_tpl.html
+1
-1
No files found.
application/index/controller/Member.php
View file @
c2b9c1f1
...
...
@@ -253,6 +253,11 @@ class Member extends Basic{
try
{
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'current_agent_id'
]
=
$this
->
userId
;
}
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
,
$type
);
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
101
,
'内部错误,获取客户失败!请联系运营。'
);
...
...
@@ -266,41 +271,6 @@ class Member extends Basic{
return
$return
;
}
/**
* 新增客户
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public
function
user_add
()
{
$params
=
$this
->
request
->
param
();
$status
=
101
;
$data
=
$msg
=
''
;
if
(
empty
(
$params
[
'id'
]))
{
$user_data
=
$this
->
user
->
get
([
'user_phone'
=>
$params
[
'user_phone'
]]);
}
else
{
$user_data
=
$this
->
user
->
get
(
$params
[
'id'
]);
}
if
(
!
check_phone
(
$params
[
'user_phone'
]))
{
return
$this
->
response
(
$status
,
'手机号错误'
);
}
if
(
empty
(
$user_data
)
&&
$params
[
'type'
]
==
'add'
)
{
$this
->
user
->
edit
(
$data
);
if
(
$this
->
user
->
id
)
{
$status
=
200
;
$data
=
[
'id'
=>
$this
->
user
->
id
];
$msg
=
'添加用户成功'
;
}
else
{
$msg
=
'新增用户失败'
;
}
}
return
$this
->
response
(
$status
,
$msg
,
$data
);
}
/**
* 添加跟进
*
...
...
public/resource/js/user.js
View file @
c2b9c1f1
...
...
@@ -713,7 +713,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
$
.
ajax
({
url
:
'/index/
user_add
'
,
url
:
'/index/
pcEditClient
'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
...
...
public/resource/template/user_template_tpl.html
View file @
c2b9c1f1
...
...
@@ -26,7 +26,7 @@
[
%
if
(
it
[
item
][
'first_login_time'
]
!=
null
){
%
]
[
%=
it
[
item
][
"first_login_time"
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
((
check_auth
(
'auth_vip '
)
&&
it
[
item
][
'vip'
])
||
(
it
[
item
][
'agent_id'
]
==
it
[
item
][
'current_agent_id'
]))
{
%
]
[
%
if
((
check_auth
(
'auth_vip '
)
&&
it
[
item
][
'vip'
])
||
(
it
[
item
][
'agent_id'
]
==
it
[
item
][
'current_agent_id'
])
||
(
check_auth
(
'index/pcEditClient'
))
)
{
%
]
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
phone
=
'[%= it[item]["user_phone"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
>
详细信息
<
/a
>
...
...
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